Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{%- set my_class_name = ctx.root_namespace | pascal_case ~ "IncubatingMetrics" -%}

/*
* 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 -%}
{%- if metric is experimental -%}
{%- if metric is deprecated -%}
{%- set deprecated_javadoc = "@deprecated " ~ metric.deprecated.note -%}
{%- else -%}
{%- set deprecated_javadoc = "" -%}
{%- endif %}

/** Name of the {@code {{ metric.metric_name }}} metric. */
{%- 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. */
{%- 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. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
{%- elif metric is stable -%}
{%- set stable_class_name = ctx.root_namespace | pascal_case ~ "Metrics" -%}
{%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "#" ~ (metric.metric_name | replace(".", "_") | screaming_snake_case) -%}

/**
* Name of the {@code {{ metric.metric_name }}} metric.
*
* @deprecated deprecated in favor of stable {@link {{ stable_class_link }}_NAME} constant.
*/
@Deprecated public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}";

/**
* Unit of the {@code {{ metric.metric_name }}} metric.
*
* @deprecated deprecated in favor of stable {@link {{ stable_class_link }}_UNIT} constant.
*/
@Deprecated public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}";

/**
* Description of the {@code {{ metric.metric_name }}} metric.
*
* @deprecated deprecated in favor of stable {@link {{ stable_class_link }}_DESCRIPTION} constant.
*/
@Deprecated public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
{%- endif -%}
{%- endfor %}

private {{ my_class_name }}() {}
}
11 changes: 11 additions & 0 deletions buildscripts/templates/registry/incubating_java/weaver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ templates:
})
application_mode: each
file_name: "{{ctx.root_namespace | pascal_case}}IncubatingAttributes.java"
- pattern: IncubatingSemanticMetrics.java.j2
filter: >
semconv_grouped_metrics({
"exclude_root_namespace": $excluded_namespaces,
"exclude_stability": []
}) | map({
root_namespace: .root_namespace,
metrics: .metrics
})
application_mode: each
file_name: "{{ctx.root_namespace | pascal_case}}IncubatingMetrics.java"
text_maps:
java_enum_type:
int: long
Expand Down
39 changes: 39 additions & 0 deletions buildscripts/templates/registry/java/SemanticMetrics.java.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{%- 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 stable -%}
{%- if metric is deprecated -%}
{%- set deprecated_javadoc = "@deprecated " ~ metric.deprecated.note -%}
{%- endif %}

/** Name of the {@code {{ metric.metric_name }}} metric. */
{%- 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. */
{%- 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. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
{%- endif -%}
{%- endfor %}

private {{ my_class_name }}() {}
}
11 changes: 11 additions & 0 deletions buildscripts/templates/registry/java/weaver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +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"
text_maps:
java_enum_type:
int: long
Expand Down
82 changes: 81 additions & 1 deletion docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,82 @@
Comparing source compatibility of opentelemetry-semconv-1.37.0-SNAPSHOT.jar against opentelemetry-semconv-1.37.0.jar
No changes.
+++ 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
+++ 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_SERVER_REQUEST_DURATION_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_CLIENT_REQUEST_DURATION
+++ 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_CLIENT_REQUEST_DURATION_UNIT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String HTTP_SERVER_REQUEST_DURATION
+++ 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_GC_DURATION_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_LOADED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_LOADED_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_LIMIT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED
+++ 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_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_CPU_TIME
+++ 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_GC_DURATION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_UNLOADED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CLASS_COUNT_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_COMMITTED
+++ 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_GC_DURATION_UNIT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_MEMORY_USED_AFTER_LAST_GC
+++ 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_CLASS_COUNT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_RECENT_UTILIZATION
+++ 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_THREAD_COUNT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String JVM_CPU_COUNT
+++ 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 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_UPGRADED_CONNECTIONS_UNIT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_CONNECTIONS_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_CONNECTIONS
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_TLS_HANDSHAKES
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_TLS_HANDSHAKES_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_ACTIVE_CONNECTIONS
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_CONNECTIONS_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_REJECTED_CONNECTIONS
+++ 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_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_TLS_HANDSHAKE_DURATION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_CONNECTION_DURATION_DESCRIPTION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_QUEUED_REQUESTS
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_CONNECTION_DURATION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_CONNECTION_DURATION_UNIT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String KESTREL_UPGRADED_CONNECTIONS
+++ 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* 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() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* 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 CICD 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 CICD system by state.";

private CicdIncubatingMetrics() {}
}
Loading