diff --git a/buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 b/buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 index 3aefed6..427b245 100644 --- a/buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 +++ b/buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 @@ -1,7 +1,5 @@ {%- 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 @@ -13,9 +11,7 @@ package io.opentelemetry.semconv.incubating; @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 experimental -%} {%- if metric is deprecated -%} {%- if metric.deprecated.note == "Uncategorized." -%} {%- set deprecated_javadoc = "@deprecated" -%} @@ -40,7 +36,6 @@ public final class {{ my_class_name }} { @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 ~ "#" -%} @@ -50,7 +45,6 @@ public final class {{ my_class_name }} { @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 %} diff --git a/buildscripts/templates/registry/java/weaver.yaml b/buildscripts/templates/registry/java/weaver.yaml index 7605bed..cc65188 100644 --- a/buildscripts/templates/registry/java/weaver.yaml +++ b/buildscripts/templates/registry/java/weaver.yaml @@ -29,17 +29,17 @@ templates: }) application_mode: each file_name: "{{ctx.root_namespace | pascal_case}}Attributes.java" - # - pattern: SemanticMetrics.java.j2 - # filter: > - # semconv_grouped_metrics({ - # "exclude_root_namespace": $excluded_namespaces, - # "exclude_stability": ["experimental", "deprecated"] - # }) | map({ - # root_namespace: .root_namespace, - # metrics: .metrics - # }) - # application_mode: each - # file_name: "{{ctx.root_namespace | pascal_case}}Metrics.java" + - pattern: SemanticMetrics.java.j2 + filter: > + semconv_grouped_metrics({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["experimental", "deprecated"] + }) | map({ + root_namespace: .root_namespace, + metrics: .metrics + }) + application_mode: each + file_name: "{{ctx.root_namespace | pascal_case}}Metrics.java" text_maps: java_enum_type: int: long diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt index 26bef55..e61c326 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt @@ -1,2 +1,82 @@ Comparing source compatibility of opentelemetry-semconv-1.42.0-SNAPSHOT.jar against opentelemetry-semconv-1.42.0.jar -No changes. \ No newline at end of file ++++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.DbMetrics (not serializable) + +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. + +++ NEW SUPERCLASS: java.lang.Object + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String DB_CLIENT_OPERATION_DURATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String DB_CLIENT_OPERATION_DURATION_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String DB_CLIENT_OPERATION_DURATION_DESCRIPTION ++++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.HttpMetrics (not serializable) + +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. + +++ NEW SUPERCLASS: java.lang.Object + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_CLIENT_REQUEST_DURATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_SERVER_REQUEST_DURATION_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_SERVER_REQUEST_DURATION_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_CLIENT_REQUEST_DURATION_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_SERVER_REQUEST_DURATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_CLIENT_REQUEST_DURATION_UNIT ++++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.JvmMetrics (not serializable) + +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. + +++ NEW SUPERCLASS: java.lang.Object + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_UNLOADED_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_AFTER_LAST_GC_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_UNLOADED_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_GC_DURATION_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_AFTER_LAST_GC_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_LOADED_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_GC_DURATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_UNLOADED_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_RECENT_UTILIZATION_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_LOADED_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_RECENT_UTILIZATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_COUNT_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_AFTER_LAST_GC_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_LIMIT_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_THREAD_COUNT_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_LOADED_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_THREAD_COUNT_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_COUNT_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_COMMITTED_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_COUNT_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_COUNT_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_TIME_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_COUNT_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_GC_DURATION_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_TIME_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_COMMITTED_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_TIME_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_COMMITTED_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_COUNT_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_RECENT_UTILIZATION_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_THREAD_COUNT_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_LIMIT_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_LIMIT_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_NAME ++++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.KestrelMetrics (not serializable) + +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. + +++ NEW SUPERCLASS: java.lang.Object + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_TLS_HANDSHAKES_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_TLS_HANDSHAKE_DURATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_REQUESTS_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_UPGRADED_CONNECTIONS_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_CONNECTIONS_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_TLS_HANDSHAKES_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_CONNECTION_DURATION_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_CONNECTIONS_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_UPGRADED_CONNECTIONS_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_REQUESTS_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_UPGRADED_CONNECTIONS_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_REJECTED_CONNECTIONS_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_CONNECTIONS_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_TLS_HANDSHAKE_DURATION_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_REJECTED_CONNECTIONS_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_CONNECTIONS_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_TLS_HANDSHAKES_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_CONNECTION_DURATION_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_CONNECTION_DURATION_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_CONNECTIONS_NAME + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_REQUESTS_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_TLS_HANDSHAKE_DURATION_DESCRIPTION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_CONNECTIONS_UNIT + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_REJECTED_CONNECTIONS_DESCRIPTION diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingMetrics.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingMetrics.java index 3041e02..0aa3e9a 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingMetrics.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingMetrics.java @@ -372,13 +372,30 @@ public final class DbIncubatingMetrics { public static final String DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE_DESCRIPTION = "Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead."; - /** Name of the {@code db.client.operation.duration} metric. */ + /** + * Name of the {@code db.client.operation.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbMetrics#DB_CLIENT_OPERATION_DURATION_NAME} constant. + */ + @Deprecated public static final String DB_CLIENT_OPERATION_DURATION_NAME = "db.client.operation.duration"; - /** Unit of the {@code db.client.operation.duration} metric. */ - public static final String DB_CLIENT_OPERATION_DURATION_UNIT = "s"; + /** + * Unit of the {@code db.client.operation.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbMetrics#DB_CLIENT_OPERATION_DURATION_UNIT} constant. + */ + @Deprecated public static final String DB_CLIENT_OPERATION_DURATION_UNIT = "s"; - /** Description of the {@code db.client.operation.duration} metric. */ + /** + * Description of the {@code db.client.operation.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbMetrics#DB_CLIENT_OPERATION_DURATION_DESCRIPTION} constant. + */ + @Deprecated public static final String DB_CLIENT_OPERATION_DURATION_DESCRIPTION = "Duration of database client operations."; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingMetrics.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingMetrics.java index a74a963..4650607 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingMetrics.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingMetrics.java @@ -50,13 +50,30 @@ public final class HttpIncubatingMetrics { public static final String HTTP_CLIENT_REQUEST_BODY_SIZE_DESCRIPTION = "Size of HTTP client request bodies."; - /** Name of the {@code http.client.request.duration} metric. */ + /** + * Name of the {@code http.client.request.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.HttpMetrics#HTTP_CLIENT_REQUEST_DURATION_NAME} constant. + */ + @Deprecated public static final String HTTP_CLIENT_REQUEST_DURATION_NAME = "http.client.request.duration"; - /** Unit of the {@code http.client.request.duration} metric. */ - public static final String HTTP_CLIENT_REQUEST_DURATION_UNIT = "s"; - - /** Description of the {@code http.client.request.duration} metric. */ + /** + * Unit of the {@code http.client.request.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.HttpMetrics#HTTP_CLIENT_REQUEST_DURATION_UNIT} constant. + */ + @Deprecated public static final String HTTP_CLIENT_REQUEST_DURATION_UNIT = "s"; + + /** + * Description of the {@code http.client.request.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.HttpMetrics#HTTP_CLIENT_REQUEST_DURATION_DESCRIPTION} constant. + */ + @Deprecated public static final String HTTP_CLIENT_REQUEST_DURATION_DESCRIPTION = "Duration of HTTP client requests."; @@ -90,13 +107,30 @@ public final class HttpIncubatingMetrics { public static final String HTTP_SERVER_REQUEST_BODY_SIZE_DESCRIPTION = "Size of HTTP server request bodies."; - /** Name of the {@code http.server.request.duration} metric. */ + /** + * Name of the {@code http.server.request.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.HttpMetrics#HTTP_SERVER_REQUEST_DURATION_NAME} constant. + */ + @Deprecated public static final String HTTP_SERVER_REQUEST_DURATION_NAME = "http.server.request.duration"; - /** Unit of the {@code http.server.request.duration} metric. */ - public static final String HTTP_SERVER_REQUEST_DURATION_UNIT = "s"; - - /** Description of the {@code http.server.request.duration} metric. */ + /** + * Unit of the {@code http.server.request.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.HttpMetrics#HTTP_SERVER_REQUEST_DURATION_UNIT} constant. + */ + @Deprecated public static final String HTTP_SERVER_REQUEST_DURATION_UNIT = "s"; + + /** + * Description of the {@code http.server.request.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.HttpMetrics#HTTP_SERVER_REQUEST_DURATION_DESCRIPTION} constant. + */ + @Deprecated public static final String HTTP_SERVER_REQUEST_DURATION_DESCRIPTION = "Duration of HTTP server requests."; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingMetrics.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingMetrics.java index 70f9baf..80e296d 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingMetrics.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingMetrics.java @@ -61,62 +61,159 @@ public final class JvmIncubatingMetrics { public static final String JVM_BUFFER_MEMORY_USED_DESCRIPTION = "Measure of memory used by buffers."; - /** Name of the {@code jvm.class.count} metric. */ - public static final String JVM_CLASS_COUNT_NAME = "jvm.class.count"; + /** + * Name of the {@code jvm.class.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_COUNT_NAME} constant. + */ + @Deprecated public static final String JVM_CLASS_COUNT_NAME = "jvm.class.count"; - /** Unit of the {@code jvm.class.count} metric. */ - public static final String JVM_CLASS_COUNT_UNIT = "{class}"; + /** + * Unit of the {@code jvm.class.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_COUNT_UNIT} constant. + */ + @Deprecated public static final String JVM_CLASS_COUNT_UNIT = "{class}"; - /** Description of the {@code jvm.class.count} metric. */ + /** + * Description of the {@code jvm.class.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_COUNT_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_CLASS_COUNT_DESCRIPTION = "Number of classes currently loaded."; - /** Name of the {@code jvm.class.loaded} metric. */ - public static final String JVM_CLASS_LOADED_NAME = "jvm.class.loaded"; + /** + * Name of the {@code jvm.class.loaded} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_LOADED_NAME} constant. + */ + @Deprecated public static final String JVM_CLASS_LOADED_NAME = "jvm.class.loaded"; - /** Unit of the {@code jvm.class.loaded} metric. */ - public static final String JVM_CLASS_LOADED_UNIT = "{class}"; + /** + * Unit of the {@code jvm.class.loaded} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_LOADED_UNIT} constant. + */ + @Deprecated public static final String JVM_CLASS_LOADED_UNIT = "{class}"; - /** Description of the {@code jvm.class.loaded} metric. */ + /** + * Description of the {@code jvm.class.loaded} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_LOADED_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_CLASS_LOADED_DESCRIPTION = "Number of classes loaded since JVM start."; - /** Name of the {@code jvm.class.unloaded} metric. */ - public static final String JVM_CLASS_UNLOADED_NAME = "jvm.class.unloaded"; + /** + * Name of the {@code jvm.class.unloaded} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_UNLOADED_NAME} constant. + */ + @Deprecated public static final String JVM_CLASS_UNLOADED_NAME = "jvm.class.unloaded"; - /** Unit of the {@code jvm.class.unloaded} metric. */ - public static final String JVM_CLASS_UNLOADED_UNIT = "{class}"; + /** + * Unit of the {@code jvm.class.unloaded} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_UNLOADED_UNIT} constant. + */ + @Deprecated public static final String JVM_CLASS_UNLOADED_UNIT = "{class}"; - /** Description of the {@code jvm.class.unloaded} metric. */ + /** + * Description of the {@code jvm.class.unloaded} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CLASS_UNLOADED_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_CLASS_UNLOADED_DESCRIPTION = "Number of classes unloaded since JVM start."; - /** Name of the {@code jvm.cpu.count} metric. */ - public static final String JVM_CPU_COUNT_NAME = "jvm.cpu.count"; + /** + * Name of the {@code jvm.cpu.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_COUNT_NAME} constant. + */ + @Deprecated public static final String JVM_CPU_COUNT_NAME = "jvm.cpu.count"; - /** Unit of the {@code jvm.cpu.count} metric. */ - public static final String JVM_CPU_COUNT_UNIT = "{cpu}"; + /** + * Unit of the {@code jvm.cpu.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_COUNT_UNIT} constant. + */ + @Deprecated public static final String JVM_CPU_COUNT_UNIT = "{cpu}"; - /** Description of the {@code jvm.cpu.count} metric. */ + /** + * Description of the {@code jvm.cpu.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_COUNT_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_CPU_COUNT_DESCRIPTION = "Number of processors available to the Java virtual machine."; - /** Name of the {@code jvm.cpu.recent_utilization} metric. */ + /** + * Name of the {@code jvm.cpu.recent_utilization} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_RECENT_UTILIZATION_NAME} constant. + */ + @Deprecated public static final String JVM_CPU_RECENT_UTILIZATION_NAME = "jvm.cpu.recent_utilization"; - /** Unit of the {@code jvm.cpu.recent_utilization} metric. */ - public static final String JVM_CPU_RECENT_UTILIZATION_UNIT = "1"; + /** + * Unit of the {@code jvm.cpu.recent_utilization} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_RECENT_UTILIZATION_UNIT} constant. + */ + @Deprecated public static final String JVM_CPU_RECENT_UTILIZATION_UNIT = "1"; - /** Description of the {@code jvm.cpu.recent_utilization} metric. */ + /** + * Description of the {@code jvm.cpu.recent_utilization} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_RECENT_UTILIZATION_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_CPU_RECENT_UTILIZATION_DESCRIPTION = "Recent CPU utilization for the process as reported by the JVM."; - /** Name of the {@code jvm.cpu.time} metric. */ - public static final String JVM_CPU_TIME_NAME = "jvm.cpu.time"; + /** + * Name of the {@code jvm.cpu.time} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_TIME_NAME} constant. + */ + @Deprecated public static final String JVM_CPU_TIME_NAME = "jvm.cpu.time"; - /** Unit of the {@code jvm.cpu.time} metric. */ - public static final String JVM_CPU_TIME_UNIT = "s"; + /** + * Unit of the {@code jvm.cpu.time} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_TIME_UNIT} constant. + */ + @Deprecated public static final String JVM_CPU_TIME_UNIT = "s"; - /** Description of the {@code jvm.cpu.time} metric. */ + /** + * Description of the {@code jvm.cpu.time} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_CPU_TIME_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_CPU_TIME_DESCRIPTION = "CPU time used by the process as reported by the JVM."; @@ -140,23 +237,55 @@ public final class JvmIncubatingMetrics { public static final String JVM_FILE_DESCRIPTOR_LIMIT_DESCRIPTION = "Measure of max open file descriptors as reported by the JVM."; - /** Name of the {@code jvm.gc.duration} metric. */ - public static final String JVM_GC_DURATION_NAME = "jvm.gc.duration"; + /** + * Name of the {@code jvm.gc.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_GC_DURATION_NAME} constant. + */ + @Deprecated public static final String JVM_GC_DURATION_NAME = "jvm.gc.duration"; - /** Unit of the {@code jvm.gc.duration} metric. */ - public static final String JVM_GC_DURATION_UNIT = "s"; + /** + * Unit of the {@code jvm.gc.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_GC_DURATION_UNIT} constant. + */ + @Deprecated public static final String JVM_GC_DURATION_UNIT = "s"; - /** Description of the {@code jvm.gc.duration} metric. */ + /** + * Description of the {@code jvm.gc.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_GC_DURATION_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_GC_DURATION_DESCRIPTION = "Duration of JVM garbage collection actions."; - /** Name of the {@code jvm.memory.committed} metric. */ - public static final String JVM_MEMORY_COMMITTED_NAME = "jvm.memory.committed"; + /** + * Name of the {@code jvm.memory.committed} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_COMMITTED_NAME} constant. + */ + @Deprecated public static final String JVM_MEMORY_COMMITTED_NAME = "jvm.memory.committed"; - /** Unit of the {@code jvm.memory.committed} metric. */ - public static final String JVM_MEMORY_COMMITTED_UNIT = "By"; + /** + * Unit of the {@code jvm.memory.committed} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_COMMITTED_UNIT} constant. + */ + @Deprecated public static final String JVM_MEMORY_COMMITTED_UNIT = "By"; - /** Description of the {@code jvm.memory.committed} metric. */ + /** + * Description of the {@code jvm.memory.committed} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_COMMITTED_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_MEMORY_COMMITTED_DESCRIPTION = "Measure of memory committed."; /** Name of the {@code jvm.memory.init} metric. */ @@ -168,31 +297,79 @@ public final class JvmIncubatingMetrics { /** Description of the {@code jvm.memory.init} metric. */ public static final String JVM_MEMORY_INIT_DESCRIPTION = "Measure of initial memory requested."; - /** Name of the {@code jvm.memory.limit} metric. */ - public static final String JVM_MEMORY_LIMIT_NAME = "jvm.memory.limit"; + /** + * Name of the {@code jvm.memory.limit} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_LIMIT_NAME} constant. + */ + @Deprecated public static final String JVM_MEMORY_LIMIT_NAME = "jvm.memory.limit"; - /** Unit of the {@code jvm.memory.limit} metric. */ - public static final String JVM_MEMORY_LIMIT_UNIT = "By"; + /** + * Unit of the {@code jvm.memory.limit} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_LIMIT_UNIT} constant. + */ + @Deprecated public static final String JVM_MEMORY_LIMIT_UNIT = "By"; - /** Description of the {@code jvm.memory.limit} metric. */ + /** + * Description of the {@code jvm.memory.limit} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_LIMIT_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_MEMORY_LIMIT_DESCRIPTION = "Measure of max obtainable memory."; - /** Name of the {@code jvm.memory.used} metric. */ - public static final String JVM_MEMORY_USED_NAME = "jvm.memory.used"; + /** + * Name of the {@code jvm.memory.used} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_USED_NAME} constant. + */ + @Deprecated public static final String JVM_MEMORY_USED_NAME = "jvm.memory.used"; - /** Unit of the {@code jvm.memory.used} metric. */ - public static final String JVM_MEMORY_USED_UNIT = "By"; + /** + * Unit of the {@code jvm.memory.used} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_USED_UNIT} constant. + */ + @Deprecated public static final String JVM_MEMORY_USED_UNIT = "By"; - /** Description of the {@code jvm.memory.used} metric. */ - public static final String JVM_MEMORY_USED_DESCRIPTION = "Measure of memory used."; + /** + * Description of the {@code jvm.memory.used} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_USED_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_MEMORY_USED_DESCRIPTION = "Measure of memory used."; - /** Name of the {@code jvm.memory.used_after_last_gc} metric. */ + /** + * Name of the {@code jvm.memory.used_after_last_gc} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_USED_AFTER_LAST_GC_NAME} constant. + */ + @Deprecated public static final String JVM_MEMORY_USED_AFTER_LAST_GC_NAME = "jvm.memory.used_after_last_gc"; - /** Unit of the {@code jvm.memory.used_after_last_gc} metric. */ - public static final String JVM_MEMORY_USED_AFTER_LAST_GC_UNIT = "By"; + /** + * Unit of the {@code jvm.memory.used_after_last_gc} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_USED_AFTER_LAST_GC_UNIT} constant. + */ + @Deprecated public static final String JVM_MEMORY_USED_AFTER_LAST_GC_UNIT = "By"; - /** Description of the {@code jvm.memory.used_after_last_gc} metric. */ + /** + * Description of the {@code jvm.memory.used_after_last_gc} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_MEMORY_USED_AFTER_LAST_GC_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_MEMORY_USED_AFTER_LAST_GC_DESCRIPTION = "Measure of memory used, as measured after the most recent garbage collection event on this pool."; @@ -216,13 +393,29 @@ public final class JvmIncubatingMetrics { public static final String JVM_SYSTEM_CPU_UTILIZATION_DESCRIPTION = "Recent CPU utilization for the whole system as reported by the JVM."; - /** Name of the {@code jvm.thread.count} metric. */ - public static final String JVM_THREAD_COUNT_NAME = "jvm.thread.count"; + /** + * Name of the {@code jvm.thread.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_THREAD_COUNT_NAME} constant. + */ + @Deprecated public static final String JVM_THREAD_COUNT_NAME = "jvm.thread.count"; - /** Unit of the {@code jvm.thread.count} metric. */ - public static final String JVM_THREAD_COUNT_UNIT = "{thread}"; + /** + * Unit of the {@code jvm.thread.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_THREAD_COUNT_UNIT} constant. + */ + @Deprecated public static final String JVM_THREAD_COUNT_UNIT = "{thread}"; - /** Description of the {@code jvm.thread.count} metric. */ + /** + * Description of the {@code jvm.thread.count} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.JvmMetrics#JVM_THREAD_COUNT_DESCRIPTION} constant. + */ + @Deprecated public static final String JVM_THREAD_COUNT_DESCRIPTION = "Number of executing platform threads."; private JvmIncubatingMetrics() {} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/KestrelIncubatingMetrics.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/KestrelIncubatingMetrics.java index ad8a8d9..51131fc 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/KestrelIncubatingMetrics.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/KestrelIncubatingMetrics.java @@ -9,83 +9,220 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2 @SuppressWarnings("unused") public final class KestrelIncubatingMetrics { - /** Name of the {@code kestrel.active_connections} metric. */ + /** + * Name of the {@code kestrel.active_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_ACTIVE_CONNECTIONS_NAME} constant. + */ + @Deprecated public static final String KESTREL_ACTIVE_CONNECTIONS_NAME = "kestrel.active_connections"; - /** Unit of the {@code kestrel.active_connections} metric. */ - public static final String KESTREL_ACTIVE_CONNECTIONS_UNIT = "{connection}"; - - /** Description of the {@code kestrel.active_connections} metric. */ + /** + * Unit of the {@code kestrel.active_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_ACTIVE_CONNECTIONS_UNIT} constant. + */ + @Deprecated public static final String KESTREL_ACTIVE_CONNECTIONS_UNIT = "{connection}"; + + /** + * Description of the {@code kestrel.active_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_ACTIVE_CONNECTIONS_DESCRIPTION} constant. + */ + @Deprecated public static final String KESTREL_ACTIVE_CONNECTIONS_DESCRIPTION = "Number of connections that are currently active on the server."; - /** Name of the {@code kestrel.active_tls_handshakes} metric. */ + /** + * Name of the {@code kestrel.active_tls_handshakes} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_ACTIVE_TLS_HANDSHAKES_NAME} constant. + */ + @Deprecated public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_NAME = "kestrel.active_tls_handshakes"; - /** Unit of the {@code kestrel.active_tls_handshakes} metric. */ - public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_UNIT = "{handshake}"; - - /** Description of the {@code kestrel.active_tls_handshakes} metric. */ + /** + * Unit of the {@code kestrel.active_tls_handshakes} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_ACTIVE_TLS_HANDSHAKES_UNIT} constant. + */ + @Deprecated public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_UNIT = "{handshake}"; + + /** + * Description of the {@code kestrel.active_tls_handshakes} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_ACTIVE_TLS_HANDSHAKES_DESCRIPTION} + * constant. + */ + @Deprecated public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_DESCRIPTION = "Number of TLS handshakes that are currently in progress on the server."; - /** Name of the {@code kestrel.connection.duration} metric. */ + /** + * Name of the {@code kestrel.connection.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_CONNECTION_DURATION_NAME} constant. + */ + @Deprecated public static final String KESTREL_CONNECTION_DURATION_NAME = "kestrel.connection.duration"; - /** Unit of the {@code kestrel.connection.duration} metric. */ - public static final String KESTREL_CONNECTION_DURATION_UNIT = "s"; - - /** Description of the {@code kestrel.connection.duration} metric. */ + /** + * Unit of the {@code kestrel.connection.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_CONNECTION_DURATION_UNIT} constant. + */ + @Deprecated public static final String KESTREL_CONNECTION_DURATION_UNIT = "s"; + + /** + * Description of the {@code kestrel.connection.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_CONNECTION_DURATION_DESCRIPTION} constant. + */ + @Deprecated public static final String KESTREL_CONNECTION_DURATION_DESCRIPTION = "The duration of connections on the server."; - /** Name of the {@code kestrel.queued_connections} metric. */ + /** + * Name of the {@code kestrel.queued_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_QUEUED_CONNECTIONS_NAME} constant. + */ + @Deprecated public static final String KESTREL_QUEUED_CONNECTIONS_NAME = "kestrel.queued_connections"; - /** Unit of the {@code kestrel.queued_connections} metric. */ - public static final String KESTREL_QUEUED_CONNECTIONS_UNIT = "{connection}"; - - /** Description of the {@code kestrel.queued_connections} metric. */ + /** + * Unit of the {@code kestrel.queued_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_QUEUED_CONNECTIONS_UNIT} constant. + */ + @Deprecated public static final String KESTREL_QUEUED_CONNECTIONS_UNIT = "{connection}"; + + /** + * Description of the {@code kestrel.queued_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_QUEUED_CONNECTIONS_DESCRIPTION} constant. + */ + @Deprecated public static final String KESTREL_QUEUED_CONNECTIONS_DESCRIPTION = "Number of connections that are currently queued and are waiting to start."; - /** Name of the {@code kestrel.queued_requests} metric. */ - public static final String KESTREL_QUEUED_REQUESTS_NAME = "kestrel.queued_requests"; - - /** Unit of the {@code kestrel.queued_requests} metric. */ - public static final String KESTREL_QUEUED_REQUESTS_UNIT = "{request}"; - - /** Description of the {@code kestrel.queued_requests} metric. */ + /** + * Name of the {@code kestrel.queued_requests} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_QUEUED_REQUESTS_NAME} constant. + */ + @Deprecated public static final String KESTREL_QUEUED_REQUESTS_NAME = "kestrel.queued_requests"; + + /** + * Unit of the {@code kestrel.queued_requests} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_QUEUED_REQUESTS_UNIT} constant. + */ + @Deprecated public static final String KESTREL_QUEUED_REQUESTS_UNIT = "{request}"; + + /** + * Description of the {@code kestrel.queued_requests} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_QUEUED_REQUESTS_DESCRIPTION} constant. + */ + @Deprecated public static final String KESTREL_QUEUED_REQUESTS_DESCRIPTION = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start."; - /** Name of the {@code kestrel.rejected_connections} metric. */ + /** + * Name of the {@code kestrel.rejected_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_REJECTED_CONNECTIONS_NAME} constant. + */ + @Deprecated public static final String KESTREL_REJECTED_CONNECTIONS_NAME = "kestrel.rejected_connections"; - /** Unit of the {@code kestrel.rejected_connections} metric. */ - public static final String KESTREL_REJECTED_CONNECTIONS_UNIT = "{connection}"; - - /** Description of the {@code kestrel.rejected_connections} metric. */ + /** + * Unit of the {@code kestrel.rejected_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_REJECTED_CONNECTIONS_UNIT} constant. + */ + @Deprecated public static final String KESTREL_REJECTED_CONNECTIONS_UNIT = "{connection}"; + + /** + * Description of the {@code kestrel.rejected_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_REJECTED_CONNECTIONS_DESCRIPTION} constant. + */ + @Deprecated public static final String KESTREL_REJECTED_CONNECTIONS_DESCRIPTION = "Number of connections rejected by the server."; - /** Name of the {@code kestrel.tls_handshake.duration} metric. */ + /** + * Name of the {@code kestrel.tls_handshake.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_TLS_HANDSHAKE_DURATION_NAME} constant. + */ + @Deprecated public static final String KESTREL_TLS_HANDSHAKE_DURATION_NAME = "kestrel.tls_handshake.duration"; - /** Unit of the {@code kestrel.tls_handshake.duration} metric. */ - public static final String KESTREL_TLS_HANDSHAKE_DURATION_UNIT = "s"; - - /** Description of the {@code kestrel.tls_handshake.duration} metric. */ + /** + * Unit of the {@code kestrel.tls_handshake.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_TLS_HANDSHAKE_DURATION_UNIT} constant. + */ + @Deprecated public static final String KESTREL_TLS_HANDSHAKE_DURATION_UNIT = "s"; + + /** + * Description of the {@code kestrel.tls_handshake.duration} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_TLS_HANDSHAKE_DURATION_DESCRIPTION} + * constant. + */ + @Deprecated public static final String KESTREL_TLS_HANDSHAKE_DURATION_DESCRIPTION = "The duration of TLS handshakes on the server."; - /** Name of the {@code kestrel.upgraded_connections} metric. */ + /** + * Name of the {@code kestrel.upgraded_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_UPGRADED_CONNECTIONS_NAME} constant. + */ + @Deprecated public static final String KESTREL_UPGRADED_CONNECTIONS_NAME = "kestrel.upgraded_connections"; - /** Unit of the {@code kestrel.upgraded_connections} metric. */ - public static final String KESTREL_UPGRADED_CONNECTIONS_UNIT = "{connection}"; - - /** Description of the {@code kestrel.upgraded_connections} metric. */ + /** + * Unit of the {@code kestrel.upgraded_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_UPGRADED_CONNECTIONS_UNIT} constant. + */ + @Deprecated public static final String KESTREL_UPGRADED_CONNECTIONS_UNIT = "{connection}"; + + /** + * Description of the {@code kestrel.upgraded_connections} metric. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.KestrelMetrics#KESTREL_UPGRADED_CONNECTIONS_DESCRIPTION} constant. + */ + @Deprecated public static final String KESTREL_UPGRADED_CONNECTIONS_DESCRIPTION = "Number of connections that are currently upgraded (WebSockets). ."; diff --git a/semconv/src/main/java/io/opentelemetry/semconv/DbMetrics.java b/semconv/src/main/java/io/opentelemetry/semconv/DbMetrics.java new file mode 100644 index 0000000..db12adc --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/DbMetrics.java @@ -0,0 +1,23 @@ +/* + * 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 DbMetrics { + /** Name of the {@code db.client.operation.duration} metric. */ + public static final String DB_CLIENT_OPERATION_DURATION_NAME = "db.client.operation.duration"; + + /** Unit of the {@code db.client.operation.duration} metric. */ + public static final String DB_CLIENT_OPERATION_DURATION_UNIT = "s"; + + /** Description of the {@code db.client.operation.duration} metric. */ + public static final String DB_CLIENT_OPERATION_DURATION_DESCRIPTION = + "Duration of database client operations."; + + private DbMetrics() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/HttpMetrics.java b/semconv/src/main/java/io/opentelemetry/semconv/HttpMetrics.java new file mode 100644 index 0000000..b79858e --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/HttpMetrics.java @@ -0,0 +1,33 @@ +/* + * 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 HttpMetrics { + /** Name of the {@code http.client.request.duration} metric. */ + public static final String HTTP_CLIENT_REQUEST_DURATION_NAME = "http.client.request.duration"; + + /** Unit of the {@code http.client.request.duration} metric. */ + public static final String HTTP_CLIENT_REQUEST_DURATION_UNIT = "s"; + + /** Description of the {@code http.client.request.duration} metric. */ + public static final String HTTP_CLIENT_REQUEST_DURATION_DESCRIPTION = + "Duration of HTTP client requests."; + + /** Name of the {@code http.server.request.duration} metric. */ + public static final String HTTP_SERVER_REQUEST_DURATION_NAME = "http.server.request.duration"; + + /** Unit of the {@code http.server.request.duration} metric. */ + public static final String HTTP_SERVER_REQUEST_DURATION_UNIT = "s"; + + /** Description of the {@code http.server.request.duration} metric. */ + public static final String HTTP_SERVER_REQUEST_DURATION_DESCRIPTION = + "Duration of HTTP server requests."; + + private HttpMetrics() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/JvmMetrics.java b/semconv/src/main/java/io/opentelemetry/semconv/JvmMetrics.java new file mode 100644 index 0000000..73e9e79 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/JvmMetrics.java @@ -0,0 +1,128 @@ +/* + * 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 JvmMetrics { + /** Name of the {@code jvm.class.count} metric. */ + public static final String JVM_CLASS_COUNT_NAME = "jvm.class.count"; + + /** Unit of the {@code jvm.class.count} metric. */ + public static final String JVM_CLASS_COUNT_UNIT = "{class}"; + + /** Description of the {@code jvm.class.count} metric. */ + public static final String JVM_CLASS_COUNT_DESCRIPTION = "Number of classes currently loaded."; + + /** Name of the {@code jvm.class.loaded} metric. */ + public static final String JVM_CLASS_LOADED_NAME = "jvm.class.loaded"; + + /** Unit of the {@code jvm.class.loaded} metric. */ + public static final String JVM_CLASS_LOADED_UNIT = "{class}"; + + /** Description of the {@code jvm.class.loaded} metric. */ + public static final String JVM_CLASS_LOADED_DESCRIPTION = + "Number of classes loaded since JVM start."; + + /** Name of the {@code jvm.class.unloaded} metric. */ + public static final String JVM_CLASS_UNLOADED_NAME = "jvm.class.unloaded"; + + /** Unit of the {@code jvm.class.unloaded} metric. */ + public static final String JVM_CLASS_UNLOADED_UNIT = "{class}"; + + /** Description of the {@code jvm.class.unloaded} metric. */ + public static final String JVM_CLASS_UNLOADED_DESCRIPTION = + "Number of classes unloaded since JVM start."; + + /** Name of the {@code jvm.cpu.count} metric. */ + public static final String JVM_CPU_COUNT_NAME = "jvm.cpu.count"; + + /** Unit of the {@code jvm.cpu.count} metric. */ + public static final String JVM_CPU_COUNT_UNIT = "{cpu}"; + + /** Description of the {@code jvm.cpu.count} metric. */ + public static final String JVM_CPU_COUNT_DESCRIPTION = + "Number of processors available to the Java virtual machine."; + + /** Name of the {@code jvm.cpu.recent_utilization} metric. */ + public static final String JVM_CPU_RECENT_UTILIZATION_NAME = "jvm.cpu.recent_utilization"; + + /** Unit of the {@code jvm.cpu.recent_utilization} metric. */ + public static final String JVM_CPU_RECENT_UTILIZATION_UNIT = "1"; + + /** Description of the {@code jvm.cpu.recent_utilization} metric. */ + public static final String JVM_CPU_RECENT_UTILIZATION_DESCRIPTION = + "Recent CPU utilization for the process as reported by the JVM."; + + /** Name of the {@code jvm.cpu.time} metric. */ + public static final String JVM_CPU_TIME_NAME = "jvm.cpu.time"; + + /** Unit of the {@code jvm.cpu.time} metric. */ + public static final String JVM_CPU_TIME_UNIT = "s"; + + /** Description of the {@code jvm.cpu.time} metric. */ + public static final String JVM_CPU_TIME_DESCRIPTION = + "CPU time used by the process as reported by the JVM."; + + /** Name of the {@code jvm.gc.duration} metric. */ + public static final String JVM_GC_DURATION_NAME = "jvm.gc.duration"; + + /** Unit of the {@code jvm.gc.duration} metric. */ + public static final String JVM_GC_DURATION_UNIT = "s"; + + /** Description of the {@code jvm.gc.duration} metric. */ + public static final String JVM_GC_DURATION_DESCRIPTION = + "Duration of JVM garbage collection actions."; + + /** Name of the {@code jvm.memory.committed} metric. */ + public static final String JVM_MEMORY_COMMITTED_NAME = "jvm.memory.committed"; + + /** Unit of the {@code jvm.memory.committed} metric. */ + public static final String JVM_MEMORY_COMMITTED_UNIT = "By"; + + /** Description of the {@code jvm.memory.committed} metric. */ + public static final String JVM_MEMORY_COMMITTED_DESCRIPTION = "Measure of memory committed."; + + /** Name of the {@code jvm.memory.limit} metric. */ + public static final String JVM_MEMORY_LIMIT_NAME = "jvm.memory.limit"; + + /** Unit of the {@code jvm.memory.limit} metric. */ + public static final String JVM_MEMORY_LIMIT_UNIT = "By"; + + /** Description of the {@code jvm.memory.limit} metric. */ + public static final String JVM_MEMORY_LIMIT_DESCRIPTION = "Measure of max obtainable memory."; + + /** Name of the {@code jvm.memory.used} metric. */ + public static final String JVM_MEMORY_USED_NAME = "jvm.memory.used"; + + /** Unit of the {@code jvm.memory.used} metric. */ + public static final String JVM_MEMORY_USED_UNIT = "By"; + + /** Description of the {@code jvm.memory.used} metric. */ + public static final String JVM_MEMORY_USED_DESCRIPTION = "Measure of memory used."; + + /** Name of the {@code jvm.memory.used_after_last_gc} metric. */ + public static final String JVM_MEMORY_USED_AFTER_LAST_GC_NAME = "jvm.memory.used_after_last_gc"; + + /** Unit of the {@code jvm.memory.used_after_last_gc} metric. */ + public static final String JVM_MEMORY_USED_AFTER_LAST_GC_UNIT = "By"; + + /** Description of the {@code jvm.memory.used_after_last_gc} metric. */ + public static final String JVM_MEMORY_USED_AFTER_LAST_GC_DESCRIPTION = + "Measure of memory used, as measured after the most recent garbage collection event on this pool."; + + /** Name of the {@code jvm.thread.count} metric. */ + public static final String JVM_THREAD_COUNT_NAME = "jvm.thread.count"; + + /** Unit of the {@code jvm.thread.count} metric. */ + public static final String JVM_THREAD_COUNT_UNIT = "{thread}"; + + /** Description of the {@code jvm.thread.count} metric. */ + public static final String JVM_THREAD_COUNT_DESCRIPTION = "Number of executing platform threads."; + + private JvmMetrics() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/KestrelMetrics.java b/semconv/src/main/java/io/opentelemetry/semconv/KestrelMetrics.java new file mode 100644 index 0000000..fe8f248 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/KestrelMetrics.java @@ -0,0 +1,93 @@ +/* + * 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 KestrelMetrics { + /** Name of the {@code kestrel.active_connections} metric. */ + public static final String KESTREL_ACTIVE_CONNECTIONS_NAME = "kestrel.active_connections"; + + /** Unit of the {@code kestrel.active_connections} metric. */ + public static final String KESTREL_ACTIVE_CONNECTIONS_UNIT = "{connection}"; + + /** Description of the {@code kestrel.active_connections} metric. */ + public static final String KESTREL_ACTIVE_CONNECTIONS_DESCRIPTION = + "Number of connections that are currently active on the server."; + + /** Name of the {@code kestrel.active_tls_handshakes} metric. */ + public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_NAME = "kestrel.active_tls_handshakes"; + + /** Unit of the {@code kestrel.active_tls_handshakes} metric. */ + public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_UNIT = "{handshake}"; + + /** Description of the {@code kestrel.active_tls_handshakes} metric. */ + public static final String KESTREL_ACTIVE_TLS_HANDSHAKES_DESCRIPTION = + "Number of TLS handshakes that are currently in progress on the server."; + + /** Name of the {@code kestrel.connection.duration} metric. */ + public static final String KESTREL_CONNECTION_DURATION_NAME = "kestrel.connection.duration"; + + /** Unit of the {@code kestrel.connection.duration} metric. */ + public static final String KESTREL_CONNECTION_DURATION_UNIT = "s"; + + /** Description of the {@code kestrel.connection.duration} metric. */ + public static final String KESTREL_CONNECTION_DURATION_DESCRIPTION = + "The duration of connections on the server."; + + /** Name of the {@code kestrel.queued_connections} metric. */ + public static final String KESTREL_QUEUED_CONNECTIONS_NAME = "kestrel.queued_connections"; + + /** Unit of the {@code kestrel.queued_connections} metric. */ + public static final String KESTREL_QUEUED_CONNECTIONS_UNIT = "{connection}"; + + /** Description of the {@code kestrel.queued_connections} metric. */ + public static final String KESTREL_QUEUED_CONNECTIONS_DESCRIPTION = + "Number of connections that are currently queued and are waiting to start."; + + /** Name of the {@code kestrel.queued_requests} metric. */ + public static final String KESTREL_QUEUED_REQUESTS_NAME = "kestrel.queued_requests"; + + /** Unit of the {@code kestrel.queued_requests} metric. */ + public static final String KESTREL_QUEUED_REQUESTS_UNIT = "{request}"; + + /** Description of the {@code kestrel.queued_requests} metric. */ + public static final String KESTREL_QUEUED_REQUESTS_DESCRIPTION = + "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start."; + + /** Name of the {@code kestrel.rejected_connections} metric. */ + public static final String KESTREL_REJECTED_CONNECTIONS_NAME = "kestrel.rejected_connections"; + + /** Unit of the {@code kestrel.rejected_connections} metric. */ + public static final String KESTREL_REJECTED_CONNECTIONS_UNIT = "{connection}"; + + /** Description of the {@code kestrel.rejected_connections} metric. */ + public static final String KESTREL_REJECTED_CONNECTIONS_DESCRIPTION = + "Number of connections rejected by the server."; + + /** Name of the {@code kestrel.tls_handshake.duration} metric. */ + public static final String KESTREL_TLS_HANDSHAKE_DURATION_NAME = "kestrel.tls_handshake.duration"; + + /** Unit of the {@code kestrel.tls_handshake.duration} metric. */ + public static final String KESTREL_TLS_HANDSHAKE_DURATION_UNIT = "s"; + + /** Description of the {@code kestrel.tls_handshake.duration} metric. */ + public static final String KESTREL_TLS_HANDSHAKE_DURATION_DESCRIPTION = + "The duration of TLS handshakes on the server."; + + /** Name of the {@code kestrel.upgraded_connections} metric. */ + public static final String KESTREL_UPGRADED_CONNECTIONS_NAME = "kestrel.upgraded_connections"; + + /** Unit of the {@code kestrel.upgraded_connections} metric. */ + public static final String KESTREL_UPGRADED_CONNECTIONS_UNIT = "{connection}"; + + /** Description of the {@code kestrel.upgraded_connections} metric. */ + public static final String KESTREL_UPGRADED_CONNECTIONS_DESCRIPTION = + "Number of connections that are currently upgraded (WebSockets). ."; + + private KestrelMetrics() {} +}