diff --git a/agent/agent-bootstrap/gradle.lockfile b/agent/agent-bootstrap/gradle.lockfile index f7008dabb39..9a07a89fecc 100644 --- a/agent/agent-bootstrap/gradle.lockfile +++ b/agent/agent-bootstrap/gradle.lockfile @@ -11,10 +11,10 @@ com.google.guava:guava-bom:31.1-jre=runtimeClasspath com.squareup.moshi:moshi:1.11.0=runtimeClasspath com.squareup.okio:okio:1.17.5=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath diff --git a/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java b/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java index 036a6be44d9..64d32f8f2e5 100644 --- a/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java +++ b/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java @@ -46,6 +46,7 @@ private static Set buildDurationClientView() { Set view = new HashSet<>(durationAlwaysInclude); view.add(SemanticAttributes.NET_PEER_NAME); view.add(SemanticAttributes.NET_PEER_PORT); + view.add(SemanticAttributes.NET_SOCK_PEER_ADDR); return view; } @@ -57,7 +58,8 @@ private static Set buildDurationServerView() { // - we prefer http.route (which is scrubbed) over http.target (which is not scrubbed). Set view = new HashSet<>(durationAlwaysInclude); view.add(SemanticAttributes.HTTP_SCHEME); - view.add(SemanticAttributes.HTTP_HOST); + view.add(SemanticAttributes.NET_HOST_NAME); + view.add(SemanticAttributes.NET_HOST_PORT); view.add(SemanticAttributes.HTTP_ROUTE); // START APPLICATION INSIGHTS MODIFICATIONS view.add(SemanticAttributes.HTTP_USER_AGENT); @@ -70,10 +72,10 @@ private static Set buildActiveRequestsView() { // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md#attributes Set view = new HashSet<>(); view.add(SemanticAttributes.HTTP_METHOD); - view.add(SemanticAttributes.HTTP_HOST); view.add(SemanticAttributes.HTTP_SCHEME); view.add(SemanticAttributes.HTTP_FLAVOR); - view.add(SemanticAttributes.HTTP_SERVER_NAME); + view.add(SemanticAttributes.NET_HOST_NAME); + view.add(SemanticAttributes.NET_HOST_PORT); return view; } diff --git a/agent/agent-for-testing/gradle.lockfile b/agent/agent-for-testing/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/agent-for-testing/gradle.lockfile +++ b/agent/agent-for-testing/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile b/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile index e7b76837ada..b4212d0caa8 100644 --- a/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile +++ b/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile @@ -6,10 +6,10 @@ com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.errorprone:error_prone_annotations:2.18.0=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath diff --git a/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile b/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile index e7b76837ada..b4212d0caa8 100644 --- a/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile +++ b/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile @@ -6,10 +6,10 @@ com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.errorprone:error_prone_annotations:2.18.0=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath diff --git a/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile b/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile +++ b/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/agent-profiler/agent-alerting-api/gradle.lockfile b/agent/agent-profiler/agent-alerting-api/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/agent-profiler/agent-alerting-api/gradle.lockfile +++ b/agent/agent-profiler/agent-alerting-api/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/agent-profiler/agent-alerting/gradle.lockfile b/agent/agent-profiler/agent-alerting/gradle.lockfile index a0a13c8a9b0..9e05e8fc6fc 100644 --- a/agent/agent-profiler/agent-alerting/gradle.lockfile +++ b/agent/agent-profiler/agent-alerting/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath diff --git a/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile b/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile +++ b/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/agent-tooling/gradle.lockfile b/agent/agent-tooling/gradle.lockfile index 7363d25f006..b95435966d3 100644 --- a/agent/agent-tooling/gradle.lockfile +++ b/agent/agent-tooling/gradle.lockfile @@ -50,13 +50,13 @@ io.netty:netty-transport-native-epoll:4.1.89.Final=runtimeClasspath io.netty:netty-transport-native-kqueue:4.1.89.Final=runtimeClasspath io.netty:netty-transport-native-unix-common:4.1.89.Final=runtimeClasspath io.netty:netty-transport:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath -io.projectreactor.netty:reactor-netty-core:1.1.2=runtimeClasspath -io.projectreactor.netty:reactor-netty-http:1.1.2=runtimeClasspath -io.projectreactor:reactor-core:3.5.2=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.projectreactor.netty:reactor-netty-core:1.1.3=runtimeClasspath +io.projectreactor.netty:reactor-netty-http:1.1.3=runtimeClasspath +io.projectreactor:reactor-core:3.5.3=runtimeClasspath net.java.dev.jna:jna-platform:5.12.1=runtimeClasspath net.java.dev.jna:jna:5.12.1=runtimeClasspath net.minidev:accessors-smart:2.4.8=runtimeClasspath diff --git a/agent/agent/gradle.lockfile b/agent/agent/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/agent/gradle.lockfile +++ b/agent/agent/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/azure-monitor-exporter/gradle.lockfile b/agent/azure-monitor-exporter/gradle.lockfile index 2f64d3aae5a..14b166e1c00 100644 --- a/agent/azure-monitor-exporter/gradle.lockfile +++ b/agent/azure-monitor-exporter/gradle.lockfile @@ -40,13 +40,13 @@ io.netty:netty-transport-native-epoll:4.1.89.Final=runtimeClasspath io.netty:netty-transport-native-kqueue:4.1.89.Final=runtimeClasspath io.netty:netty-transport-native-unix-common:4.1.89.Final=runtimeClasspath io.netty:netty-transport:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath -io.projectreactor.netty:reactor-netty-core:1.1.2=runtimeClasspath -io.projectreactor.netty:reactor-netty-http:1.1.2=runtimeClasspath -io.projectreactor:reactor-core:3.5.2=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.projectreactor.netty:reactor-netty-core:1.1.3=runtimeClasspath +io.projectreactor.netty:reactor-netty-http:1.1.3=runtimeClasspath +io.projectreactor:reactor-core:3.5.3=runtimeClasspath net.java.dev.jna:jna-platform:5.6.0=runtimeClasspath net.java.dev.jna:jna:5.6.0=runtimeClasspath net.minidev:accessors-smart:2.4.8=runtimeClasspath diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/OperationNames.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/OperationNames.java index 38b216e4056..7992159eae2 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/OperationNames.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/OperationNames.java @@ -12,13 +12,7 @@ public static String getOperationName(ReadableSpan span) { if (operationName != null) { return operationName; } - - String spanName = span.getName(); - String httpMethod = span.getAttribute(SemanticAttributes.HTTP_METHOD); - if (httpMethod != null && !httpMethod.isEmpty() && spanName.startsWith("/")) { - return httpMethod + " " + spanName; - } - return spanName; + return span.getName(); } private OperationNames() {} diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java index 27d3b106e63..b6e490d2a1f 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java @@ -22,8 +22,59 @@ // because the module that contains that class is not stable, // so don't want to take a dependency on it public final class SemanticAttributes { - /** The URL of the OpenTelemetry schema for these keys and values. */ - public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.13.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.17.0"; + + /** + * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of + * the exception should be preferred over the static type in languages that support it. + */ + public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); + + /** The exception message. */ + public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); + + /** + * A stacktrace as a string in the natural representation for the language runtime. The + * representation is to be determined and documented by each language SIG. + */ + public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); + + /** The name identifies the event. */ + public static final AttributeKey EVENT_NAME = stringKey("event.name"); + + /** + * The domain identifies the business context for the events. + * + *

Notes: + * + *

    + *
  • Events across different domains may have same {@code event.name}, yet be unrelated + * events. + *
+ */ + public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); + + /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); + + /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); + + /** + * Deprecated, use the {@code otel.scope.name} attribute. + * + * @deprecated Deprecated, use the `otel.scope.name` attribute. + */ + @Deprecated + public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); + + /** + * Deprecated, use the {@code otel.scope.version} attribute. + * + * @deprecated Deprecated, use the `otel.scope.version` attribute. + */ + @Deprecated + public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); /** * The full invoked ARN as provided on the {@code Context} passed to the function ({@code @@ -242,42 +293,14 @@ public final class SemanticAttributes { public static final AttributeKey DB_SQL_TABLE = stringKey("db.sql.table"); /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of - * the exception should be preferred over the static type in languages that support it. + * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status + * code is UNSET. */ - public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); + public static final AttributeKey OTEL_STATUS_CODE = stringKey("otel.status_code"); - /** The exception message. */ - public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); - - /** - * A stacktrace as a string in the natural representation for the language runtime. The - * representation is to be determined and documented by each language SIG. - */ - public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); - - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the - * exception is escaping the scope of the span. - * - *

Notes: - * - *

    - *
  • An exception is considered to have escaped (or left) the scope of a span, if that span is - * ended while the exception is still logically "in flight". This may be actually - * "in flight" in some languages (e.g. if the exception is passed to a Context - * manager's {@code __exit__} method in Python) but will usually be caught at the point of - * recording the exception in most languages. - *
  • It is usually not possible to determine at the point where an exception is thrown whether - * it will escape the scope of a span. However, it is trivial to know that an exception will - * escape, if one checks for an active exception just before ending the span, as done in the - * example above. - *
  • It follows that an exception may still escape the scope of the span even if the {@code - * exception.escaped} attribute was not set or set to false, since the event might have been - * recorded at a time where it was not clear whether the exception will escape. - *
- */ - public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); + /** Description of the Status if it has a value, otherwise not set. */ + public static final AttributeKey OTEL_STATUS_DESCRIPTION = + stringKey("otel.status_description"); /** * Type of the trigger which caused this function execution. @@ -376,6 +399,31 @@ public final class SemanticAttributes { */ public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); + /** The unique identifier of the feature flag. */ + public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); + + /** The name of the service provider that performs the flag evaluation. */ + public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = + stringKey("feature_flag.provider_name"); + + /** + * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of + * the value can be used. + * + *

Notes: + * + *

    + *
  • A semantic identifier, commonly referred to as a variant, provides a means for referring + * to a value without including the value itself. This can provide additional context for + * understanding the meaning behind a value. For example, the variant {@code red} maybe be + * used for the value {@code #c05543}. + *
  • A stringified version of the value can be used in situations where a semantic identifier + * is unavailable. String representation of the value should be determined by the + * implementer. + *
+ */ + public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); + /** Transport protocol used. See note below. */ public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); @@ -527,6 +575,12 @@ public final class SemanticAttributes { */ public static final AttributeKey CODE_LINENO = longKey("code.lineno"); + /** + * The column number in {@code code.filepath} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function}. + */ + public static final AttributeKey CODE_COLUMN = longKey("code.column"); + /** HTTP request method. */ public static final AttributeKey HTTP_METHOD = stringKey("http.method"); @@ -584,8 +638,18 @@ public final class SemanticAttributes { */ public static final AttributeKey HTTP_URL = stringKey("http.url"); - /** The ordinal number of request re-sending attempt. */ - public static final AttributeKey HTTP_RETRY_COUNT = longKey("http.retry_count"); + /** + * The ordinal number of request resending attempt (for any reason, including redirects). + * + *

Notes: + * + *

    + *
  • The resend count SHOULD be updated each time an HTTP request gets resent by the client, + * regardless of what was the cause of the resending (e.g. redirection, authorization + * failure, 503 Server Unavailable, network issues, or any other). + *
+ */ + public static final AttributeKey HTTP_RESEND_COUNT = longKey("http.resend_count"); /** The URI scheme identifying the used protocol. */ public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); @@ -733,81 +797,170 @@ public final class SemanticAttributes { */ public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); - /** A string identifying the messaging system. */ - public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); + /** + * A value used by the messaging system as an identifier for the message, represented as a string. + */ + public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); /** - * The message destination name. This might be equal to the span name but is required - * nevertheless. + * The conversation ID identifying the conversation to which the + * message belongs, represented as a string. Sometimes called "Correlation ID". */ - public static final AttributeKey MESSAGING_DESTINATION = - stringKey("messaging.destination"); + public static final AttributeKey MESSAGING_MESSAGE_CONVERSATION_ID = + stringKey("messaging.message.conversation_id"); + + /** + * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is + * unknown whether the compressed or uncompressed payload size is reported. + */ + public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = + longKey("messaging.message.payload_size_bytes"); + + /** The compressed size of the message payload in bytes. */ + public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = + longKey("messaging.message.payload_compressed_size_bytes"); + + /** + * The message destination name + * + *

Notes: + * + *

    + *
  • Destination name SHOULD uniquely identify a specific queue, topic or other entity within + * the broker. If the broker does not have such notion, the destination name SHOULD uniquely + * identify the broker. + *
+ */ + public static final AttributeKey MESSAGING_DESTINATION_NAME = + stringKey("messaging.destination.name"); /** The kind of message destination */ public static final AttributeKey MESSAGING_DESTINATION_KIND = - stringKey("messaging.destination_kind"); + stringKey("messaging.destination.kind"); - /** A boolean that is true if the message destination is temporary. */ - public static final AttributeKey MESSAGING_TEMP_DESTINATION = - booleanKey("messaging.temp_destination"); + /** + * Low cardinality representation of the messaging destination name + * + *

Notes: + * + *

    + *
  • Destination names could be constructed from templates. An example would be a destination + * name involving a user name or product id. Although the destination name in this case is + * of high cardinality, the underlying template is of low cardinality and can be effectively + * used for grouping and aggregation. + *
+ */ + public static final AttributeKey MESSAGING_DESTINATION_TEMPLATE = + stringKey("messaging.destination.template"); - /** The name of the transport protocol. */ - public static final AttributeKey MESSAGING_PROTOCOL = stringKey("messaging.protocol"); + /** + * A boolean that is true if the message destination is temporary and might not exist anymore + * after messages are processed. + */ + public static final AttributeKey MESSAGING_DESTINATION_TEMPORARY = + booleanKey("messaging.destination.temporary"); - /** The version of the transport protocol. */ - public static final AttributeKey MESSAGING_PROTOCOL_VERSION = - stringKey("messaging.protocol_version"); + /** + * A boolean that is true if the message destination is anonymous (could be unnamed or have + * auto-generated name). + */ + public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = + booleanKey("messaging.destination.anonymous"); + + /** + * The message source name + * + *

Notes: + * + *

    + *
  • Source name SHOULD uniquely identify a specific queue, topic, or other entity within the + * broker. If the broker does not have such notion, the source name SHOULD uniquely identify + * the broker. + *
+ */ + public static final AttributeKey MESSAGING_SOURCE_NAME = + stringKey("messaging.source.name"); - /** Connection string. */ - public static final AttributeKey MESSAGING_URL = stringKey("messaging.url"); + /** The kind of message source */ + public static final AttributeKey MESSAGING_SOURCE_KIND = + stringKey("messaging.source.kind"); /** - * A value used by the messaging system as an identifier for the message, represented as a string. + * Low cardinality representation of the messaging source name + * + *

Notes: + * + *

    + *
  • Source names could be constructed from templates. An example would be a source name + * involving a user name or product id. Although the source name in this case is of high + * cardinality, the underlying template is of low cardinality and can be effectively used + * for grouping and aggregation. + *
*/ - public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message_id"); + public static final AttributeKey MESSAGING_SOURCE_TEMPLATE = + stringKey("messaging.source.template"); /** - * The conversation ID identifying the conversation to which the - * message belongs, represented as a string. Sometimes called "Correlation ID". + * A boolean that is true if the message source is temporary and might not exist anymore after + * messages are processed. */ - public static final AttributeKey MESSAGING_CONVERSATION_ID = - stringKey("messaging.conversation_id"); + public static final AttributeKey MESSAGING_SOURCE_TEMPORARY = + booleanKey("messaging.source.temporary"); /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is - * unknown whether the compressed or uncompressed payload size is reported. + * A boolean that is true if the message source is anonymous (could be unnamed or have + * auto-generated name). */ - public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = - longKey("messaging.message_payload_size_bytes"); + public static final AttributeKey MESSAGING_SOURCE_ANONYMOUS = + booleanKey("messaging.source.anonymous"); - /** The compressed size of the message payload in bytes. */ - public static final AttributeKey MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = - longKey("messaging.message_payload_compressed_size_bytes"); + /** A string identifying the messaging system. */ + public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); /** - * A string identifying the kind of message consumption as defined in the Operation names section above. If the operation is - * "send", this attribute MUST NOT be set, since the operation can be inferred from the - * span kind in that case. + * A string identifying the kind of messaging operation as defined in the Operation names section above. + * + *

Notes: + * + *

    + *
  • If a custom value is used, it MUST be of low cardinality. + *
*/ public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); + /** + * The number of messages sent, received, or processed in the scope of the batching operation. + * + *

Notes: + * + *

    + *
  • Instrumentations SHOULD NOT set {@code messaging.batch.message_count} on spans that + * operate with a single message. When a messaging client library supports both batch and + * single-message API for the same operation, instrumentations SHOULD use {@code + * messaging.batch.message_count} for batching APIs and SHOULD NOT use it for single-message + * APIs. + *
+ */ + public static final AttributeKey MESSAGING_BATCH_MESSAGE_COUNT = + longKey("messaging.batch.message_count"); + /** * The identifier for the consumer receiving a message. For Kafka, set it to {@code - * {messaging.kafka.consumer_group} - {messaging.kafka.client_id}}, if both are present, or only - * {@code messaging.kafka.consumer_group}. For brokers, such as RabbitMQ and Artemis, set it to + * {messaging.kafka.consumer.group} - {messaging.kafka.client_id}}, if both are present, or only + * {@code messaging.kafka.consumer.group}. For brokers, such as RabbitMQ and Artemis, set it to * the {@code client_id} of the client consuming the message. */ public static final AttributeKey MESSAGING_CONSUMER_ID = - stringKey("messaging.consumer_id"); + stringKey("messaging.consumer.id"); /** RabbitMQ message routing key. */ - public static final AttributeKey MESSAGING_RABBITMQ_ROUTING_KEY = - stringKey("messaging.rabbitmq.routing_key"); + public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = + stringKey("messaging.rabbitmq.destination.routing_key"); /** * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the - * same partition. They differ from {@code messaging.message_id} in that they're not unique. If + * same partition. They differ from {@code messaging.message.id} in that they're not unique. If * the key is {@code null}, the attribute MUST NOT be set. * *

Notes: @@ -818,26 +971,34 @@ public final class SemanticAttributes { * */ public static final AttributeKey MESSAGING_KAFKA_MESSAGE_KEY = - stringKey("messaging.kafka.message_key"); + stringKey("messaging.kafka.message.key"); /** * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not * producers. */ public static final AttributeKey MESSAGING_KAFKA_CONSUMER_GROUP = - stringKey("messaging.kafka.consumer_group"); + stringKey("messaging.kafka.consumer.group"); /** Client Id for the Consumer or Producer that is handling the message. */ public static final AttributeKey MESSAGING_KAFKA_CLIENT_ID = stringKey("messaging.kafka.client_id"); /** Partition the message is sent to. */ - public static final AttributeKey MESSAGING_KAFKA_PARTITION = - longKey("messaging.kafka.partition"); + public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = + longKey("messaging.kafka.destination.partition"); + + /** Partition the message is received from. */ + public static final AttributeKey MESSAGING_KAFKA_SOURCE_PARTITION = + longKey("messaging.kafka.source.partition"); + + /** The offset of a record in the corresponding Kafka partition. */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_OFFSET = + longKey("messaging.kafka.message.offset"); /** A boolean that is true if the message is a tombstone. */ - public static final AttributeKey MESSAGING_KAFKA_TOMBSTONE = - booleanKey("messaging.kafka.tombstone"); + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_TOMBSTONE = + booleanKey("messaging.kafka.message.tombstone"); /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = @@ -854,17 +1015,34 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_ID = stringKey("messaging.rocketmq.client_id"); + /** + * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = + longKey("messaging.rocketmq.message.delivery_timestamp"); + + /** The delay time level for delay message, which determines the message delay time. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = + longKey("messaging.rocketmq.message.delay_time_level"); + + /** + * It is essential for FIFO message. Messages that belong to the same message group are always + * processed one by one within the same consumer group. + */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = + stringKey("messaging.rocketmq.message.group"); + /** Type of message. */ public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = - stringKey("messaging.rocketmq.message_type"); + stringKey("messaging.rocketmq.message.type"); /** The secondary classifier of message besides topic. */ public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = - stringKey("messaging.rocketmq.message_tag"); + stringKey("messaging.rocketmq.message.tag"); /** Key(s) of message, another way to mark message besides message id. */ public static final AttributeKey> MESSAGING_ROCKETMQ_MESSAGE_KEYS = - stringArrayKey("messaging.rocketmq.message_keys"); + stringArrayKey("messaging.rocketmq.message.keys"); /** Model of message consumption. This only applies to consumer spans. */ public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = @@ -954,7 +1132,41 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = longKey("message.uncompressed_size"); + /** + * SHOULD be set to true if the exception event is recorded at a point where it is known that the + * exception is escaping the scope of the span. + * + *

Notes: + * + *

    + *
  • An exception is considered to have escaped (or left) the scope of a span, if that span is + * ended while the exception is still logically "in flight". This may be actually + * "in flight" in some languages (e.g. if the exception is passed to a Context + * manager's {@code __exit__} method in Python) but will usually be caught at the point of + * recording the exception in most languages. + *
  • It is usually not possible to determine at the point where an exception is thrown whether + * it will escape the scope of a span. However, it is trivial to know that an exception will + * escape, if one checks for an active exception just before ending the span, as done in the + * example above. + *
  • It follows that an exception may still escape the scope of the span even if the {@code + * exception.escaped} attribute was not set or set to false, since the event might have been + * recorded at a time where it was not clear whether the exception will escape. + *
+ */ + public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); + // Enum definitions + public static final class EventDomainValues { + /** Events from browser apps. */ + public static final String BROWSER = "browser"; + /** Events from mobile apps. */ + public static final String DEVICE = "device"; + /** Events from Kubernetes. */ + public static final String K8S = "k8s"; + + private EventDomainValues() {} + } + public static final class OpentracingRefTypeValues { /** The parent Span depends on the child Span in some capacity. */ public static final String CHILD_OF = "child_of"; @@ -1061,6 +1273,8 @@ public static final class DbSystemValues { public static final String COCKROACHDB = "cockroachdb"; /** OpenSearch. */ public static final String OPENSEARCH = "opensearch"; + /** ClickHouse. */ + public static final String CLICKHOUSE = "clickhouse"; private DbSystemValues() {} } @@ -1092,6 +1306,18 @@ public static final class DbCassandraConsistencyLevelValues { private DbCassandraConsistencyLevelValues() {} } + public static final class OtelStatusCodeValues { + /** + * The operation has been validated by an Application developer or Operator to have completed + * successfully. + */ + public static final String OK = "OK"; + /** The operation contains an error. */ + public static final String ERROR = "ERROR"; + + private OtelStatusCodeValues() {} + } + public static final class FaasTriggerValues { /** A response to some data source operation such as a database or filesystem read/write. */ public static final String DATASOURCE = "datasource"; @@ -1266,7 +1492,18 @@ public static final class MessagingDestinationKindValues { private MessagingDestinationKindValues() {} } + public static final class MessagingSourceKindValues { + /** A message received from a queue. */ + public static final String QUEUE = "queue"; + /** A message received from a topic. */ + public static final String TOPIC = "topic"; + + private MessagingSourceKindValues() {} + } + public static final class MessagingOperationValues { + /** publish. */ + public static final String PUBLISH = "publish"; /** receive. */ public static final String RECEIVE = "receive"; /** process. */ @@ -1419,14 +1656,132 @@ private MessageTypeValues() {} @Deprecated public static final AttributeKey HTTP_HOST = stringKey("http.host"); /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. + * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use + * {@link SemanticAttributes#NET_SOCK_PEER_ADDR} instead. */ @Deprecated public static final AttributeKey NET_PEER_IP = stringKey("net.peer.ip"); /** - * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. + * @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use + * {@link SemanticAttributes#NET_SOCK_HOST_ADDR} instead. */ @Deprecated public static final AttributeKey NET_HOST_IP = stringKey("net.host.ip"); + /** + * The ordinal number of request re-sending attempt. + * + * @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link + * SemanticAttributes#HTTP_RESEND_COUNT} instead. + */ + @Deprecated public static final AttributeKey HTTP_RETRY_COUNT = longKey("http.retry_count"); + + /** + * A string identifying the messaging system. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_DESTINATION_NAME} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_DESTINATION = + stringKey("messaging.destination"); + + /** + * A boolean that is true if the message destination is temporary. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_DESTINATION_TEMPORARY} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_TEMP_DESTINATION = + booleanKey("messaging.temp_destination"); + + /** + * The name of the transport protocol. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. There is no + * replacement. + */ + @Deprecated + public static final AttributeKey MESSAGING_PROTOCOL = stringKey("messaging.protocol"); + + /** + * The version of the transport protocol. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. There is no + * replacement. + */ + @Deprecated + public static final AttributeKey MESSAGING_PROTOCOL_VERSION = + stringKey("messaging.protocol_version"); + + /** + * Connection string. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. There is no + * replacement. + */ + @Deprecated public static final AttributeKey MESSAGING_URL = stringKey("messaging.url"); + + /** + * The conversation ID identifying the conversation to which the + * message belongs, represented as a string. Sometimes called "Correlation ID". + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_MESSAGE_CONVERSATION_ID} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_CONVERSATION_ID = + stringKey("messaging.conversation_id"); + + /** + * RabbitMQ message routing key. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_RABBITMQ_ROUTING_KEY = + stringKey("messaging.rabbitmq.routing_key"); + + /** + * Partition the message is received from. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_KAFKA_SOURCE_PARTITION} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_KAFKA_PARTITION = + longKey("messaging.kafka.partition"); + + /** + * A boolean that is true if the message is a tombstone. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_KAFKA_MESSAGE_TOMBSTONE} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_KAFKA_TOMBSTONE = + booleanKey("messaging.kafka.tombstone"); + + /** + * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_ROCKETMQ_DELIVERY_TIMESTAMP = + longKey("messaging.rocketmq.delivery_timestamp"); + + /** + * The delay time level for delay message, which determines the message delay time. + * + * @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link + * SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL} instead. + */ + @Deprecated + public static final AttributeKey MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = + longKey("messaging.rocketmq.delay_time_level"); + private SemanticAttributes() {} } diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java index cc9aba10633..cc7886d2712 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java @@ -178,16 +178,7 @@ private TelemetryItem exportRemoteDependency(SpanData span, boolean inProc, long private static final Set DEFAULT_HTTP_SPAN_NAMES = new HashSet<>( - asList( - "HTTP OPTIONS", - "HTTP GET", - "HTTP HEAD", - "HTTP POST", - "HTTP PUT", - "HTTP DELETE", - "HTTP TRACE", - "HTTP CONNECT", - "HTTP PATCH")); + asList("OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", "PATCH")); // the backend product prefers more detailed (but possibly infinite cardinality) name for http // dependencies @@ -594,14 +585,6 @@ public static String getHttpUrlFromServerSpan(Attributes attributes) { return null; } String host = attributes.get(SemanticAttributes.NET_HOST_NAME); - if (host == null) { - // fall back to deprecated http.host if available - host = attributes.get(SemanticAttributes.HTTP_HOST); - if (host == null) { - return null; - } - return scheme + "://" + host + target; - } Long port = attributes.get(SemanticAttributes.NET_HOST_PORT); if (port != null && port > 0) { return scheme + "://" + host + ":" + port + target; @@ -642,7 +625,7 @@ private static String getMessagingTargetSource(Attributes attributes) { String source = nullAwareConcat( getTargetOrNull(attributes, 0), - attributes.get(SemanticAttributes.MESSAGING_DESTINATION), + attributes.get(SemanticAttributes.MESSAGING_DESTINATION_NAME), "/"); if (source != null) { return source; @@ -661,13 +644,7 @@ private static String getOperationName(SpanData span) { if (operationName != null) { return operationName; } - - String spanName = span.getName(); - String httpMethod = span.getAttributes().get(SemanticAttributes.HTTP_METHOD); - if (httpMethod != null && !httpMethod.isEmpty() && spanName.startsWith("/")) { - return httpMethod + " " + spanName; - } - return spanName; + return span.getName(); } private static String nullAwareConcat( @@ -815,6 +792,7 @@ static void applyCommonTags(MappingsBuilder mappingsBuilder) { applyConnectionStringAndRoleNameOverrides(mappingsBuilder); } + @SuppressWarnings("deprecation") // used to emit warning to users private static final WarningLogger connectionStringAttributeNoLongerSupported = new WarningLogger( SpanDataMapper.class, @@ -824,6 +802,8 @@ static void applyCommonTags(MappingsBuilder mappingsBuilder) { + " \"connectionStringOverrides\" configuration, or reach out to" + " https://github.com/microsoft/ApplicationInsights-Java/issues if you have a" + " different use case."); + + @SuppressWarnings("deprecation") // used to emit warning to users private static final WarningLogger roleNameAttributeNoLongerSupported = new WarningLogger( SpanDataMapper.class, @@ -833,6 +813,8 @@ static void applyCommonTags(MappingsBuilder mappingsBuilder) { + " \"roleNameOverrides\" configuration, or reach out to" + " https://github.com/microsoft/ApplicationInsights-Java/issues if you have a" + " different use case."); + + @SuppressWarnings("deprecation") // used to emit warning to users private static final WarningLogger roleInstanceAttributeNoLongerSupported = new WarningLogger( SpanDataMapper.class, @@ -841,6 +823,8 @@ static void applyCommonTags(MappingsBuilder mappingsBuilder) { + " is incompatible with pre-aggregated standard metrics. Please reach out to" + " https://github.com/microsoft/ApplicationInsights-Java/issues if you have a use" + " case for this."); + + @SuppressWarnings("deprecation") // used to emit warning to users private static final WarningLogger instrumentationKeyAttributeNoLongerSupported = new WarningLogger( SpanDataMapper.class, @@ -851,6 +835,7 @@ static void applyCommonTags(MappingsBuilder mappingsBuilder) { + " https://github.com/microsoft/ApplicationInsights-Java/issues if you have a" + " different use case."); + @SuppressWarnings("deprecation") // used to emit warning to users static void applyConnectionStringAndRoleNameOverrides(MappingsBuilder mappingsBuilder) { mappingsBuilder .exact( diff --git a/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile b/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile +++ b/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile b/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile +++ b/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/instrumentation/azure-functions/gradle.lockfile b/agent/instrumentation/azure-functions/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/instrumentation/azure-functions/gradle.lockfile +++ b/agent/instrumentation/azure-functions/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/instrumentation/methods/gradle.lockfile b/agent/instrumentation/methods/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/instrumentation/methods/gradle.lockfile +++ b/agent/instrumentation/methods/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java b/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java index e39f2c3d50a..3b1717f5b06 100644 --- a/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java +++ b/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java @@ -33,6 +33,7 @@ public final class MethodSingletons { GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, CodeSpanNameExtractor.create(codeAttributesGetter)) + .setInstrumentationVersion("1.23.0-alpha-applicationinsights") .addAttributesExtractor(CodeAttributesExtractor.create(codeAttributesGetter)) // START APPLICATION INSIGHTS MODIFICATIONS .buildInstrumenter(new MethodSpanKindExtractor()); diff --git a/agent/instrumentation/micrometer-1.0/gradle.lockfile b/agent/instrumentation/micrometer-1.0/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/agent/instrumentation/micrometer-1.0/gradle.lockfile +++ b/agent/instrumentation/micrometer-1.0/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/agent/runtime-attach/gradle.lockfile b/agent/runtime-attach/gradle.lockfile index a5713b0b707..d5bfeb7ac93 100644 --- a/agent/runtime-attach/gradle.lockfile +++ b/agent/runtime-attach/gradle.lockfile @@ -6,10 +6,10 @@ com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath io.opentelemetry.contrib:opentelemetry-runtime-attach-core:1.18.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath net.bytebuddy:byte-buddy-agent:1.11.18=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath diff --git a/classic-sdk/core/gradle.lockfile b/classic-sdk/core/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/classic-sdk/core/gradle.lockfile +++ b/classic-sdk/core/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/classic-sdk/web/gradle.lockfile b/classic-sdk/web/gradle.lockfile index f0f38d650fa..aa9ba0bebc8 100644 --- a/classic-sdk/web/gradle.lockfile +++ b/classic-sdk/web/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath empty= diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index 9b55d574d86..80ff6022410 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -11,9 +11,9 @@ data class DependencySet(val group: String, val version: String, val modules: Li val dependencyVersions = hashMapOf() rootProject.extra["versions"] = dependencyVersions -val otelVersion = "1.22.0" -val otelInstrumentationVersion = "1.22.1" -val otelInstrumentationAlphaVersion = "1.22.1-alpha" +val otelVersion = "1.23.1" +val otelInstrumentationVersion = "1.23.0" +val otelInstrumentationAlphaVersion = "1.23.0-alpha" val otelContribAlphaVersion = "1.18.0-alpha" rootProject.extra["otelVersion"] = otelVersion diff --git a/etw/java/gradle.lockfile b/etw/java/gradle.lockfile index a0a13c8a9b0..9e05e8fc6fc 100644 --- a/etw/java/gradle.lockfile +++ b/etw/java/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.9=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.89.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.22.1-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.22.1=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.22.0-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.22.0=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.23.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.23.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.17.6=runtimeClasspath diff --git a/smoke-tests/apps/JettyNativeHandler/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/JettyNativeHandlerTest.java b/smoke-tests/apps/JettyNativeHandler/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/JettyNativeHandlerTest.java index 7bd04d20aed..80a41f1befe 100644 --- a/smoke-tests/apps/JettyNativeHandler/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/JettyNativeHandlerTest.java +++ b/smoke-tests/apps/JettyNativeHandler/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/JettyNativeHandlerTest.java @@ -28,7 +28,7 @@ abstract class JettyNativeHandlerTest { void doSimpleTest() throws Exception { Telemetry telemetry = testing.getTelemetry(0); - assertThat(telemetry.rd.getName()).isEqualTo("HTTP GET"); + assertThat(telemetry.rd.getName()).isEqualTo("GET"); assertThat(telemetry.rd.getUrl()).matches("http://localhost:[0-9]+/path"); assertThat(telemetry.rd.getResponseCode()).isEqualTo("200"); assertThat(telemetry.rd.getSuccess()).isTrue();