diff --git a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 index 4b1a81e18ea..de1e904face 100644 --- a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 +++ b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 @@ -274,6 +274,35 @@ public final class {{class}} { public static final AttributeKey MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = longKey("messaging.rocketmq.delay_time_level"); + /** + * The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). + * @deprecated This item has been moved, use {@link ResourceAttributes#OTEL_SCOPE_NAME} instead. + */ + @Deprecated + public static final AttributeKey OTEL_SCOPE_NAME = ResourceAttributes.OTEL_SCOPE_NAME; + + /** + * The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). + * @deprecated This item has been moved, use {@link ResourceAttributes#OTEL_SCOPE_VERSION} instead. + */ + @Deprecated + public static final AttributeKey OTEL_SCOPE_VERSION = ResourceAttributes.OTEL_SCOPE_VERSION; + + /** + * The execution ID of the current function execution. + * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use {@link SemanticAttributes#FAAS_INVOCATION_ID} instead. + */ + @Deprecated + public static final AttributeKey FAAS_EXECUTION = stringKey("faas.execution"); + + /** + * Value of the HTTP + * User-Agent header sent by the client. + * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. + */ + @Deprecated + public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); + {% endif %} {%- if class == "ResourceAttributes" %} @@ -285,6 +314,51 @@ public final class {{class}} { @Deprecated public static final String GCP_OPENSHIFT = "gcp_openshift"; + /** + * Full user-agent string provided by the browser + * + *

Notes: + * + *

    + *
  • The user-agent value SHOULD be provided only from browsers that do not have a mechanism + * to retrieve brands and platform individually from the User-Agent Client Hints API. To + * retrieve the value, the legacy {@code navigator.userAgent} API can be used. + *
+ * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. + */ + @Deprecated + public static final AttributeKey BROWSER_USER_AGENT = stringKey("browser.user_agent"); + + /** + * The unique ID of the single function that this runtime instance executes. + * + *

Notes: + * + *

    + *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so + * consider setting {@code faas.id} as a span attribute instead. + *
  • The exact value to use for {@code faas.id} depends on the cloud provider: + *
  • AWS Lambda: The function ARN. + * Take care not to use the "invoked ARN" directly but replace any alias + * suffix with the resolved function version, as the same runtime instance may be + * invokable with multiple different aliases. + *
  • GCP: The URI of the resource + *
  • Azure: The Fully + * Qualified Resource ID of the invoked function, not the function app, having + * the form {@code + * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. + * This means that a span attribute MUST be used, as an Azure function app can host multiple + * functions that would usually share a TracerProvider. + *
+ * @deprecated This item has been removed in 1.19.0 version of the semantic conventions. Use {@link ResourceAttributes#CLOUD_RESOURCE_ID} instead. + */ + @Deprecated + public static final AttributeKey FAAS_ID = stringKey("faas.id"); + {% endif %} private {{class}}() {} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java index cc71833d122..fc7b18d0af8 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java @@ -862,5 +862,53 @@ private TelemetrySdkLanguageValues() {} */ @Deprecated public static final String GCP_OPENSHIFT = "gcp_openshift"; + /** + * Full user-agent string provided by the browser + * + *

Notes: + * + *

    + *
  • The user-agent value SHOULD be provided only from browsers that do not have a mechanism + * to retrieve brands and platform individually from the User-Agent Client Hints API. To + * retrieve the value, the legacy {@code navigator.userAgent} API can be used. + *
+ * + * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use + * {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. + */ + @Deprecated + public static final AttributeKey BROWSER_USER_AGENT = stringKey("browser.user_agent"); + + /** + * The unique ID of the single function that this runtime instance executes. + * + *

Notes: + * + *

    + *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so + * consider setting {@code faas.id} as a span attribute instead. + *
  • The exact value to use for {@code faas.id} depends on the cloud provider: + *
  • AWS Lambda: The function ARN. + * Take care not to use the "invoked ARN" directly but replace any alias + * suffix with the resolved function version, as the same runtime instance may be + * invokable with multiple different aliases. + *
  • GCP: The URI of the resource + *
  • Azure: The Fully + * Qualified Resource ID of the invoked function, not the function app, having + * the form {@code + * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. + * This means that a span attribute MUST be used, as an Azure function app can host multiple + * functions that would usually share a TracerProvider. + *
+ * + * @deprecated This item has been removed in 1.19.0 version of the semantic conventions. Use + * {@link ResourceAttributes#CLOUD_RESOURCE_ID} instead. + */ + @Deprecated public static final AttributeKey FAAS_ID = stringKey("faas.id"); + private ResourceAttributes() {} } diff --git a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java index 31f0229ff83..2ca2ee5ce12 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java @@ -1801,5 +1801,41 @@ private RpcConnectRpcErrorCodeValues() {} public static final AttributeKey MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = longKey("messaging.rocketmq.delay_time_level"); + /** + * The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). + * + * @deprecated This item has been moved, use {@link ResourceAttributes#OTEL_SCOPE_NAME} instead. + */ + @Deprecated + public static final AttributeKey OTEL_SCOPE_NAME = ResourceAttributes.OTEL_SCOPE_NAME; + + /** + * The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). + * + * @deprecated This item has been moved, use {@link ResourceAttributes#OTEL_SCOPE_VERSION} + * instead. + */ + @Deprecated + public static final AttributeKey OTEL_SCOPE_VERSION = + ResourceAttributes.OTEL_SCOPE_VERSION; + + /** + * The execution ID of the current function execution. + * + * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use + * {@link SemanticAttributes#FAAS_INVOCATION_ID} instead. + */ + @Deprecated public static final AttributeKey FAAS_EXECUTION = stringKey("faas.execution"); + + /** + * Value of the HTTP + * User-Agent header sent by the client. + * + * @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use + * {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead. + */ + @Deprecated + public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); + private SemanticAttributes() {} }