-
Notifications
You must be signed in to change notification settings - Fork 33
Generate incubating metric name, unit, and description constants #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jack-berg
merged 4 commits into
open-telemetry:main
from
ADITYA-CODE-SOURCE:metric-constants
Jun 17, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
80985e6
Generate incubating metric name, unit, and description constants
ADITYA-CODE-SOURCE 0cda88d
Merge branch 'main' of https://github.com/open-telemetry/semantic-con…
jack-berg 5a7a5f5
Use javadoc formatter, publish stable metric constants, link deprecat…
jack-berg 7082e29
Disable stable metric constant generation
jack-berg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| {%- set my_class_name = ctx.root_namespace | pascal_case ~ "IncubatingMetrics" -%} | ||
| {# Uncomment when stable metric constants are enabled in buildscripts/templates/registry/java/weaver.yaml: | ||
| {%- set stable_class_name = ctx.root_namespace | pascal_case ~ "Metrics" -%} | ||
| #} | ||
|
|
||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| package io.opentelemetry.semconv.incubating; | ||
|
|
||
| // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 | ||
| @SuppressWarnings("unused") | ||
| public final class {{ my_class_name }} { | ||
| {%- for metric in ctx.metrics -%} | ||
| {# When stable metric constants are enabled, change `metric is experimental or metric is stable` | ||
| to `metric is experimental` and uncomment the elif block below. #} | ||
| {%- if metric is experimental or metric is stable -%} | ||
| {%- if metric is deprecated -%} | ||
| {%- if metric.deprecated.note == "Uncategorized." -%} | ||
| {%- set deprecated_javadoc = "@deprecated" -%} | ||
| {%- else -%} | ||
| {%- set deprecated_javadoc = "@deprecated " ~ metric.deprecated.note -%} | ||
| {%- endif -%} | ||
| {%- else -%} | ||
| {%- set deprecated_javadoc = "" -%} | ||
| {%- endif -%} | ||
| {{ ["Name of the {@code " ~ metric.metric_name ~ "} metric.", deprecated_javadoc] | comment }} | ||
| {%- if metric is deprecated -%} | ||
| @Deprecated | ||
| {% endif %} | ||
| public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}"; | ||
| {{ ["Unit of the {@code " ~ metric.metric_name ~ "} metric.", deprecated_javadoc] | comment }} | ||
| {%- if metric is deprecated -%} | ||
| @Deprecated | ||
| {% endif %} | ||
| public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}"; | ||
| {{ ["Description of the {@code " ~ metric.metric_name ~ "} metric.", deprecated_javadoc] | comment }} | ||
| {%- if metric is deprecated -%} | ||
| @Deprecated | ||
| {% endif %} | ||
| public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}"; | ||
| {# Uncomment when stable metric constants are enabled in buildscripts/templates/registry/java/weaver.yaml: | ||
| {%- elif metric is stable -%} | ||
| {%- set field_prefix = metric.metric_name | replace(".", "_") | screaming_snake_case -%} | ||
| {%- set stable_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "#" -%} | ||
| {{ ["Name of the {@code " ~ metric.metric_name ~ "} metric.", "@deprecated deprecated in favor of stable {@link " ~ stable_link ~ field_prefix ~ "_NAME} constant."] | comment }} | ||
| @Deprecated public static final String {{ field_prefix }}_NAME = "{{ metric.metric_name }}"; | ||
| {{ ["Unit of the {@code " ~ metric.metric_name ~ "} metric.", "@deprecated deprecated in favor of stable {@link " ~ stable_link ~ field_prefix ~ "_UNIT} constant."] | comment }} | ||
| @Deprecated public static final String {{ field_prefix }}_UNIT = "{{ metric.unit }}"; | ||
| {{ ["Description of the {@code " ~ metric.metric_name ~ "} metric.", "@deprecated deprecated in favor of stable {@link " ~ stable_link ~ field_prefix ~ "_DESCRIPTION} constant."] | comment }} | ||
| @Deprecated public static final String {{ field_prefix }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}"; | ||
| #} | ||
| {%- endif %} | ||
| {%- endfor %} | ||
|
|
||
| private {{ my_class_name }}() {} | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
buildscripts/templates/registry/java/SemanticMetrics.java.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| {%- set my_class_name = ctx.root_namespace | pascal_case ~ "Metrics" -%} | ||
|
|
||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| package io.opentelemetry.semconv; | ||
|
|
||
| // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/java/SemanticMetrics.java.j2 | ||
| @SuppressWarnings("unused") | ||
| public final class {{ my_class_name }} { | ||
| {%- for metric in ctx.metrics -%} | ||
| {%- if metric is deprecated -%} | ||
| {%- if metric.deprecated.note == "Uncategorized." -%} | ||
| {%- set deprecated_javadoc = "@deprecated" -%} | ||
| {%- else -%} | ||
| {%- set deprecated_javadoc = "@deprecated " ~ metric.deprecated.note -%} | ||
| {%- endif -%} | ||
| {%- else -%} | ||
| {%- set deprecated_javadoc = "" -%} | ||
| {%- endif -%} | ||
| {{ ["Name of the {@code " ~ metric.metric_name ~ "} metric.", deprecated_javadoc] | comment }} | ||
| {%- if metric is deprecated -%} | ||
| @Deprecated | ||
| {% endif %} | ||
| public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}"; | ||
| {{ ["Unit of the {@code " ~ metric.metric_name ~ "} metric.", deprecated_javadoc] | comment }} | ||
| {%- if metric is deprecated -%} | ||
| @Deprecated | ||
| {% endif %} | ||
| public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}"; | ||
| {{ ["Description of the {@code " ~ metric.metric_name ~ "} metric.", deprecated_javadoc] | comment }} | ||
| {%- if metric is deprecated -%} | ||
| @Deprecated | ||
| {% endif %} | ||
| public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}"; | ||
| {%- endfor %} | ||
|
|
||
| private {{ my_class_name }}() {} | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingMetrics.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.semconv.incubating; | ||
|
|
||
| // DO NOT EDIT, this is an Auto-generated file from | ||
| // buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 | ||
| @SuppressWarnings("unused") | ||
| public final class AzureIncubatingMetrics { | ||
| /** Name of the {@code azure.cosmosdb.client.active_instance.count} metric. */ | ||
| public static final String AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT_NAME = | ||
| "azure.cosmosdb.client.active_instance.count"; | ||
|
|
||
| /** Unit of the {@code azure.cosmosdb.client.active_instance.count} metric. */ | ||
| public static final String AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT_UNIT = "{instance}"; | ||
|
|
||
| /** Description of the {@code azure.cosmosdb.client.active_instance.count} metric. */ | ||
| public static final String AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT_DESCRIPTION = | ||
| "Number of active client instances."; | ||
|
|
||
| /** Name of the {@code azure.cosmosdb.client.operation.request_charge} metric. */ | ||
| public static final String AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE_NAME = | ||
| "azure.cosmosdb.client.operation.request_charge"; | ||
|
|
||
| /** Unit of the {@code azure.cosmosdb.client.operation.request_charge} metric. */ | ||
| public static final String AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE_UNIT = "{request_unit}"; | ||
|
|
||
| /** Description of the {@code azure.cosmosdb.client.operation.request_charge} metric. */ | ||
| public static final String AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE_DESCRIPTION = | ||
| "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation."; | ||
|
|
||
| private AzureIncubatingMetrics() {} | ||
| } |
63 changes: 63 additions & 0 deletions
63
...v-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingMetrics.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.semconv.incubating; | ||
|
|
||
| // DO NOT EDIT, this is an Auto-generated file from | ||
| // buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 | ||
| @SuppressWarnings("unused") | ||
| public final class CicdIncubatingMetrics { | ||
| /** Name of the {@code cicd.pipeline.run.active} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_ACTIVE_NAME = "cicd.pipeline.run.active"; | ||
|
|
||
| /** Unit of the {@code cicd.pipeline.run.active} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_ACTIVE_UNIT = "{run}"; | ||
|
|
||
| /** Description of the {@code cicd.pipeline.run.active} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_ACTIVE_DESCRIPTION = | ||
| "The number of pipeline runs currently active in the system by state."; | ||
|
|
||
| /** Name of the {@code cicd.pipeline.run.duration} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_DURATION_NAME = "cicd.pipeline.run.duration"; | ||
|
|
||
| /** Unit of the {@code cicd.pipeline.run.duration} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_DURATION_UNIT = "s"; | ||
|
|
||
| /** Description of the {@code cicd.pipeline.run.duration} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_DURATION_DESCRIPTION = | ||
| "Duration of a pipeline run grouped by pipeline, state and result."; | ||
|
|
||
| /** Name of the {@code cicd.pipeline.run.errors} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_ERRORS_NAME = "cicd.pipeline.run.errors"; | ||
|
|
||
| /** Unit of the {@code cicd.pipeline.run.errors} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_ERRORS_UNIT = "{error}"; | ||
|
|
||
| /** Description of the {@code cicd.pipeline.run.errors} metric. */ | ||
| public static final String CICD_PIPELINE_RUN_ERRORS_DESCRIPTION = | ||
| "The number of errors encountered in pipeline runs (eg. compile, test failures)."; | ||
|
|
||
| /** Name of the {@code cicd.system.errors} metric. */ | ||
| public static final String CICD_SYSTEM_ERRORS_NAME = "cicd.system.errors"; | ||
|
|
||
| /** Unit of the {@code cicd.system.errors} metric. */ | ||
| public static final String CICD_SYSTEM_ERRORS_UNIT = "{error}"; | ||
|
|
||
| /** Description of the {@code cicd.system.errors} metric. */ | ||
| public static final String CICD_SYSTEM_ERRORS_DESCRIPTION = | ||
| "The number of errors in a component of the CI/CD system (eg. controller, scheduler, agent)."; | ||
|
|
||
| /** Name of the {@code cicd.worker.count} metric. */ | ||
| public static final String CICD_WORKER_COUNT_NAME = "cicd.worker.count"; | ||
|
|
||
| /** Unit of the {@code cicd.worker.count} metric. */ | ||
| public static final String CICD_WORKER_COUNT_UNIT = "{count}"; | ||
|
|
||
| /** Description of the {@code cicd.worker.count} metric. */ | ||
| public static final String CICD_WORKER_COUNT_DESCRIPTION = | ||
| "The number of workers on the CI/CD system by state."; | ||
|
|
||
| private CicdIncubatingMetrics() {} | ||
| } |
136 changes: 136 additions & 0 deletions
136
...ubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingMetrics.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.semconv.incubating; | ||
|
|
||
| // DO NOT EDIT, this is an Auto-generated file from | ||
| // buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 | ||
| @SuppressWarnings("unused") | ||
| public final class ContainerIncubatingMetrics { | ||
| /** Name of the {@code container.cpu.time} metric. */ | ||
| public static final String CONTAINER_CPU_TIME_NAME = "container.cpu.time"; | ||
|
|
||
| /** Unit of the {@code container.cpu.time} metric. */ | ||
| public static final String CONTAINER_CPU_TIME_UNIT = "s"; | ||
|
|
||
| /** Description of the {@code container.cpu.time} metric. */ | ||
| public static final String CONTAINER_CPU_TIME_DESCRIPTION = "CPU time consumed."; | ||
|
|
||
| /** Name of the {@code container.cpu.usage} metric. */ | ||
| public static final String CONTAINER_CPU_USAGE_NAME = "container.cpu.usage"; | ||
|
|
||
| /** Unit of the {@code container.cpu.usage} metric. */ | ||
| public static final String CONTAINER_CPU_USAGE_UNIT = "{cpu}"; | ||
|
|
||
| /** Description of the {@code container.cpu.usage} metric. */ | ||
| public static final String CONTAINER_CPU_USAGE_DESCRIPTION = | ||
| "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs."; | ||
|
|
||
| /** Name of the {@code container.disk.io} metric. */ | ||
| public static final String CONTAINER_DISK_IO_NAME = "container.disk.io"; | ||
|
|
||
| /** Unit of the {@code container.disk.io} metric. */ | ||
| public static final String CONTAINER_DISK_IO_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.disk.io} metric. */ | ||
| public static final String CONTAINER_DISK_IO_DESCRIPTION = "Disk bytes for the container."; | ||
|
|
||
| /** Name of the {@code container.filesystem.available} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_AVAILABLE_NAME = "container.filesystem.available"; | ||
|
|
||
| /** Unit of the {@code container.filesystem.available} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_AVAILABLE_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.filesystem.available} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_AVAILABLE_DESCRIPTION = | ||
| "Container filesystem available bytes."; | ||
|
|
||
| /** Name of the {@code container.filesystem.capacity} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_CAPACITY_NAME = "container.filesystem.capacity"; | ||
|
|
||
| /** Unit of the {@code container.filesystem.capacity} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_CAPACITY_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.filesystem.capacity} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_CAPACITY_DESCRIPTION = | ||
| "Container filesystem capacity."; | ||
|
|
||
| /** Name of the {@code container.filesystem.usage} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_USAGE_NAME = "container.filesystem.usage"; | ||
|
|
||
| /** Unit of the {@code container.filesystem.usage} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_USAGE_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.filesystem.usage} metric. */ | ||
| public static final String CONTAINER_FILESYSTEM_USAGE_DESCRIPTION = "Container filesystem usage."; | ||
|
|
||
| /** Name of the {@code container.memory.available} metric. */ | ||
| public static final String CONTAINER_MEMORY_AVAILABLE_NAME = "container.memory.available"; | ||
|
|
||
| /** Unit of the {@code container.memory.available} metric. */ | ||
| public static final String CONTAINER_MEMORY_AVAILABLE_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.memory.available} metric. */ | ||
| public static final String CONTAINER_MEMORY_AVAILABLE_DESCRIPTION = "Container memory available."; | ||
|
|
||
| /** Name of the {@code container.memory.paging.faults} metric. */ | ||
| public static final String CONTAINER_MEMORY_PAGING_FAULTS_NAME = "container.memory.paging.faults"; | ||
|
|
||
| /** Unit of the {@code container.memory.paging.faults} metric. */ | ||
| public static final String CONTAINER_MEMORY_PAGING_FAULTS_UNIT = "{fault}"; | ||
|
|
||
| /** Description of the {@code container.memory.paging.faults} metric. */ | ||
| public static final String CONTAINER_MEMORY_PAGING_FAULTS_DESCRIPTION = | ||
| "Container memory paging faults."; | ||
|
|
||
| /** Name of the {@code container.memory.rss} metric. */ | ||
| public static final String CONTAINER_MEMORY_RSS_NAME = "container.memory.rss"; | ||
|
|
||
| /** Unit of the {@code container.memory.rss} metric. */ | ||
| public static final String CONTAINER_MEMORY_RSS_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.memory.rss} metric. */ | ||
| public static final String CONTAINER_MEMORY_RSS_DESCRIPTION = "Container memory RSS."; | ||
|
|
||
| /** Name of the {@code container.memory.usage} metric. */ | ||
| public static final String CONTAINER_MEMORY_USAGE_NAME = "container.memory.usage"; | ||
|
|
||
| /** Unit of the {@code container.memory.usage} metric. */ | ||
| public static final String CONTAINER_MEMORY_USAGE_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.memory.usage} metric. */ | ||
| public static final String CONTAINER_MEMORY_USAGE_DESCRIPTION = "Memory usage of the container."; | ||
|
|
||
| /** Name of the {@code container.memory.working_set} metric. */ | ||
| public static final String CONTAINER_MEMORY_WORKING_SET_NAME = "container.memory.working_set"; | ||
|
|
||
| /** Unit of the {@code container.memory.working_set} metric. */ | ||
| public static final String CONTAINER_MEMORY_WORKING_SET_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.memory.working_set} metric. */ | ||
| public static final String CONTAINER_MEMORY_WORKING_SET_DESCRIPTION = | ||
| "Container memory working set."; | ||
|
|
||
| /** Name of the {@code container.network.io} metric. */ | ||
| public static final String CONTAINER_NETWORK_IO_NAME = "container.network.io"; | ||
|
|
||
| /** Unit of the {@code container.network.io} metric. */ | ||
| public static final String CONTAINER_NETWORK_IO_UNIT = "By"; | ||
|
|
||
| /** Description of the {@code container.network.io} metric. */ | ||
| public static final String CONTAINER_NETWORK_IO_DESCRIPTION = "Network bytes for the container."; | ||
|
|
||
| /** Name of the {@code container.uptime} metric. */ | ||
| public static final String CONTAINER_UPTIME_NAME = "container.uptime"; | ||
|
|
||
| /** Unit of the {@code container.uptime} metric. */ | ||
| public static final String CONTAINER_UPTIME_UNIT = "s"; | ||
|
|
||
| /** Description of the {@code container.uptime} metric. */ | ||
| public static final String CONTAINER_UPTIME_DESCRIPTION = | ||
| "The time the container has been running."; | ||
|
|
||
| private ContainerIncubatingMetrics() {} | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trask's code in from #317 has additional logic to add deprecated javadoc tags which link to the stable class if available. This will be necessary once we enable enable generation of stable classes.
I pushed a commit which ports those changes to this branch: jack-berg@0ef14f8
Should probably just leave the code, but comment out the bit that makes the linking work with a TODO reminder to enable when generation of stable classes is enabled.
Speaking of which, given our experience with generating attribute constants, I'm much less worried about us getting the generation pattern wrong in some key way we'll regret. @trask / @laurit WDYT about just enabling generation of stable metrics out of the gate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jack-berg — this is very helpful.
I can bring over the deprecated-javadoc logic from #317 as you suggested.
On the broader question of enabling stable metrics in this PR as well, I’m happy to follow whichever direction you all prefer. The stable path is already scaffolded, so I can either keep this incubating-only for now or fold stable generation into this PR if that seems like the better direction.