From a9dd1ae1089600b389d2af6333ecd215b3ed98b9 Mon Sep 17 00:00:00 2001 From: otelbot <197425009+otelbot@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:12:41 +0000 Subject: [PATCH 1/4] Update the semantic conventions version to 1.40.0 --- CHANGELOG.md | 3 + build.gradle.kts | 3 +- .../incubating/DbIncubatingAttributes.java | 5 + .../incubating/ErrorIncubatingAttributes.java | 5 +- .../ExceptionIncubatingAttributes.java | 10 + .../FeatureFlagIncubatingAttributes.java | 11 +- .../incubating/GcpIncubatingAttributes.java | 18 ++ .../incubating/GenAiIncubatingAttributes.java | 55 ++++- .../incubating/HttpIncubatingAttributes.java | 11 +- .../incubating/K8sIncubatingAttributes.java | 199 ++++++++++++++++++ .../MessageIncubatingAttributes.java | 18 +- .../OpenaiIncubatingAttributes.java | 21 ++ .../OracleCloudIncubatingAttributes.java | 30 +++ .../OracleIncubatingAttributes.java | 80 +++++++ .../incubating/PprofIncubatingAttributes.java | 23 ++ .../incubating/RpcIncubatingAttributes.java | 37 +++- .../ServiceIncubatingAttributes.java | 39 ++++ .../SystemIncubatingAttributes.java | 4 +- .../incubating/UrlIncubatingAttributes.java | 16 ++ .../opentelemetry/semconv/DbAttributes.java | 5 + .../semconv/ExceptionAttributes.java | 14 +- .../opentelemetry/semconv/HttpAttributes.java | 11 +- .../io/opentelemetry/semconv/SchemaUrls.java | 2 + .../semconv/ServiceAttributes.java | 51 +++++ .../opentelemetry/semconv/UrlAttributes.java | 16 ++ 25 files changed, 658 insertions(+), 29 deletions(-) create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleCloudIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleIncubatingAttributes.java diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ab8159..570ed877 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Bump to semconv v1.40.0 + ([#PRNUM](https://github.com/open-telemetry/semantic-conventions-java/pull/PRNUM)) + ## Version 1.39.0 (2026-01-28) * Bump to semconv v1.39.0 diff --git a/build.gradle.kts b/build.gradle.kts index 04e498c6..e87dd3c5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,9 +11,10 @@ val snapshot = true // end // The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes -var semanticConventionsVersion = "1.39.0" +var semanticConventionsVersion = "1.40.0" val schemaUrlVersions = listOf( semanticConventionsVersion, + "1.39.0", "1.38.0", "1.37.0", "1.36.0", diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java index 58fabbac..54a95bab 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java @@ -425,6 +425,11 @@ public final class DbIncubatingAttributes { * href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query * summary section. * + *

For batch operations, if the individual operations are known to have the same query summary + * then that query summary SHOULD be used prepended by {@code BATCH }, otherwise {@code + * db.query.summary} SHOULD be {@code BATCH} or some other database system specific term if more + * applicable. + * * @deprecated deprecated in favor of stable {@link * io.opentelemetry.semconv.DbAttributes#DB_QUERY_SUMMARY} attribute. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java index 983e7b49..fcd907e0 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java @@ -24,8 +24,11 @@ public final class ErrorIncubatingAttributes { * *

{@code error.message} is NOT RECOMMENDED for metrics or spans due to its unbounded * cardinality and overlap with span status. + * + * @deprecated Use domain-specific error message attribute. For example, use {@code + * feature_flag.error.message} for feature flag errors. */ - public static final AttributeKey ERROR_MESSAGE = stringKey("error.message"); + @Deprecated public static final AttributeKey ERROR_MESSAGE = stringKey("error.message"); /** * Describes a class of error the operation ended with. diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java index 740d51b6..24328107 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java @@ -16,6 +16,16 @@ public final class ExceptionIncubatingAttributes { /** * The exception message. * + *

Notes: + * + *

+ * + * [!WARNING] + * + *

This attribute may contain sensitive information. + * + *

+ * * @deprecated deprecated in favor of stable {@link * io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_MESSAGE} attribute. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java index 5da26f75..07f150d0 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java @@ -18,9 +18,16 @@ public final class FeatureFlagIncubatingAttributes { stringKey("feature_flag.context.id"); /** - * Deprecated, use {@code error.message} instead. + * A message providing more detail about an error that occurred during feature flag evaluation in + * human-readable form. + */ + public static final AttributeKey FEATURE_FLAG_ERROR_MESSAGE = + stringKey("feature_flag.error.message"); + + /** + * Deprecated, use {@code feature_flag.error.message} instead. * - * @deprecated Replaced by {@code error.message}. + * @deprecated Replaced by {@code feature_flag.error.message}. */ @Deprecated public static final AttributeKey FEATURE_FLAG_EVALUATION_ERROR_MESSAGE = diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java index 74470210..802217f3 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java @@ -176,6 +176,24 @@ public final class GcpIncubatingAttributes { public static final AttributeKey GCP_GCE_INSTANCE_NAME = stringKey("gcp.gce.instance.name"); + /** The name of the Instance Group Manager (IGM) that manages this VM, if any. */ + public static final AttributeKey GCP_GCE_INSTANCE_GROUP_MANAGER_NAME = + stringKey("gcp.gce.instance_group_manager.name"); + + /** + * The region of a regional Instance Group Manager (e.g., {@code us-central1}). + * Set this only when the IGM is regional. + */ + public static final AttributeKey GCP_GCE_INSTANCE_GROUP_MANAGER_REGION = + stringKey("gcp.gce.instance_group_manager.region"); + + /** + * The zone of a zonal Instance Group Manager (e.g., {@code us-central1-a}). Set + * this only when the IGM is zonal. + */ + public static final AttributeKey GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE = + stringKey("gcp.gce.instance_group_manager.zone"); + // Enum definitions /** Values for {@link #GCP_APPHUB_SERVICE_CRITICALITY_TYPE}. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java index 585f4e76..9b942bc0 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java @@ -27,6 +27,9 @@ public final class GenAiIncubatingAttributes { /** Human-readable name of the GenAI agent provided by the application. */ public static final AttributeKey GEN_AI_AGENT_NAME = stringKey("gen_ai.agent.name"); + /** The version of the GenAI agent. */ + public static final AttributeKey GEN_AI_AGENT_VERSION = stringKey("gen_ai.agent.version"); + /** * Deprecated, use Event API to report completions contents. * @@ -254,6 +257,20 @@ public final class GenAiIncubatingAttributes { public static final AttributeKey GEN_AI_RESPONSE_MODEL = stringKey("gen_ai.response.model"); + /** + * The query text used for retrieval. + * + *

Notes: + * + *

+ * + * [!Warning] This attribute may contain sensitive information. + * + *
+ */ + public static final AttributeKey GEN_AI_RETRIEVAL_QUERY_TEXT = + stringKey("gen_ai.retrieval.query.text"); + /** * Deprecated, use {@code gen_ai.provider.name} instead. * @@ -290,6 +307,26 @@ public final class GenAiIncubatingAttributes { */ public static final AttributeKey GEN_AI_TOOL_TYPE = stringKey("gen_ai.tool.type"); + /** + * The number of input tokens written to a provider-managed cache. + * + *

Notes: + * + *

The value SHOULD be included in {@code gen_ai.usage.input_tokens}. + */ + public static final AttributeKey GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS = + longKey("gen_ai.usage.cache_creation.input_tokens"); + + /** + * The number of input tokens served from a provider-managed cache. + * + *

Notes: + * + *

The value SHOULD be included in {@code gen_ai.usage.input_tokens}. + */ + public static final AttributeKey GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS = + longKey("gen_ai.usage.cache_read.input_tokens"); + /** * Deprecated, use {@code gen_ai.usage.output_tokens} instead. * @@ -299,7 +336,16 @@ public final class GenAiIncubatingAttributes { public static final AttributeKey GEN_AI_USAGE_COMPLETION_TOKENS = longKey("gen_ai.usage.completion_tokens"); - /** The number of tokens used in the GenAI input (prompt). */ + /** + * The number of tokens used in the GenAI input (prompt). + * + *

Notes: + * + *

This value SHOULD include all types of input tokens, including cached tokens. + * Instrumentations SHOULD make a best effort to populate this value, using a total provided by + * the provider when available or, depending on the provider API, by summing different token types + * parsed from the provider output. + */ public static final AttributeKey GEN_AI_USAGE_INPUT_TOKENS = longKey("gen_ai.usage.input_tokens"); @@ -381,6 +427,13 @@ public static final class GenAiOperationNameIncubatingValues { */ public static final String EMBEDDINGS = "embeddings"; + /** + * Retrieval operation such as OpenAI Search + * Vector Store API + */ + public static final String RETRIEVAL = "retrieval"; + /** Create GenAI agent */ public static final String CREATE_AGENT = "create_agent"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java index 0bfe0b95..8fb5f2db 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java @@ -113,8 +113,15 @@ public final class HttpIncubatingAttributes { * _OTHER}, then it MUST provide a way to override the list of known HTTP methods. If this * override is done via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive - * known HTTP methods (this list MUST be a full override of the default known method, it is not a - * list of known methods in addition to the defaults). + * known HTTP methods. + * + *

If this override is done via declarative configuration, then the list MUST be configurable + * via the {@code known_methods} property (an array of case-sensitive strings with minimum items + * 0) under {@code .instrumentation/development.general.http.client} and/or {@code + * .instrumentation/development.general.http.server}. + * + *

In either case, this list MUST be a full override of the default known methods, it is not a + * list of known methods in addition to the defaults. * *

HTTP method names are case-sensitive and {@code http.request.method} attribute value MUST * match a known HTTP method name exactly. Instrumentations for specific web frameworks that diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java index 35a66bfe..9b5d83da 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java @@ -5,6 +5,7 @@ package io.opentelemetry.semconv.incubating; +import static io.opentelemetry.api.common.AttributeKey.booleanKey; import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; @@ -609,6 +610,159 @@ public final class K8sIncubatingAttributes { public static final AttributeKey K8S_RESOURCEQUOTA_UID = stringKey("k8s.resourcequota.uid"); + /** + * The annotation placed on the Service, the {@code } being the annotation name, the value + * being the annotation value, even if the value is empty. + * + *

Notes: + * + *

Examples: + * + *

    + *
  • An annotation {@code prometheus.io/scrape} with value {@code true} SHOULD be recorded as + * the {@code k8s.service.annotation.prometheus.io/scrape} attribute with value {@code + * "true"}. + *
  • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.service.annotation.data} attribute with value {@code ""}. + *
+ */ + public static final AttributeKeyTemplate K8S_SERVICE_ANNOTATION = + stringKeyTemplate("k8s.service.annotation"); + + /** + * The address type of the service endpoint. + * + *

Notes: + * + *

The network address family or type of the endpoint. This attribute aligns with the {@code + * addressType} field of the K8s + * EndpointSlice. It is used to differentiate metrics when a Service is backed by multiple + * address types (e.g., in dual-stack clusters). + */ + public static final AttributeKey K8S_SERVICE_ENDPOINT_ADDRESS_TYPE = + stringKey("k8s.service.endpoint.address_type"); + + /** + * The condition of the service endpoint. + * + *

Notes: + * + *

The current operational condition of the service endpoint. An endpoint can have multiple + * conditions set at once (e.g., both {@code serving} and {@code terminating} during rollout). + * This attribute aligns with the condition fields in the K8s + * EndpointSlice. + */ + public static final AttributeKey K8S_SERVICE_ENDPOINT_CONDITION = + stringKey("k8s.service.endpoint.condition"); + + /** + * The zone of the service endpoint. + * + *

Notes: + * + *

The zone where the endpoint is located, typically corresponding to a failure domain. This + * attribute aligns with the {@code zone} field of endpoints in the K8s + * EndpointSlice. It enables zone-aware monitoring of service endpoint distribution and + * supports features like Topology + * Aware Routing. + * + *

If the zone is not populated (e.g., nodes without the {@code topology.kubernetes.io/zone} + * label), the attribute value will be an empty string. + */ + public static final AttributeKey K8S_SERVICE_ENDPOINT_ZONE = + stringKey("k8s.service.endpoint.zone"); + + /** + * The label placed on the Service, the {@code } being the label name, the value being the + * label value, even if the value is empty. + * + *

Notes: + * + *

Examples: + * + *

    + *
  • A label {@code app} with value {@code my-service} SHOULD be recorded as the {@code + * k8s.service.label.app} attribute with value {@code "my-service"}. + *
  • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.service.label.data} attribute with value {@code ""}. + *
+ */ + public static final AttributeKeyTemplate K8S_SERVICE_LABEL = + stringKeyTemplate("k8s.service.label"); + + /** The name of the Service. */ + public static final AttributeKey K8S_SERVICE_NAME = stringKey("k8s.service.name"); + + /** + * Whether the Service publishes not-ready endpoints. + * + *

Notes: + * + *

Whether the Service is configured to publish endpoints before the pods are ready. This + * attribute is typically used to indicate that a Service (such as a headless Service for a + * StatefulSet) allows peer discovery before pods pass their readiness probes. It aligns with the + * {@code publishNotReadyAddresses} field of the K8s + * ServiceSpec. + */ + public static final AttributeKey K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES = + booleanKey("k8s.service.publish_not_ready_addresses"); + + /** + * The selector key-value pair placed on the Service, the {@code } being the selector key, + * the value being the selector value. + * + *

Notes: + * + *

These selectors are used to correlate with pod labels. Each selector key-value pair becomes + * a separate attribute. + * + *

Examples: + * + *

    + *
  • A selector {@code app=my-app} SHOULD be recorded as the {@code k8s.service.selector.app} + * attribute with value {@code "my-app"}. + *
  • A selector {@code version=v1} SHOULD be recorded as the {@code + * k8s.service.selector.version} attribute with value {@code "v1"}. + *
+ */ + public static final AttributeKeyTemplate K8S_SERVICE_SELECTOR = + stringKeyTemplate("k8s.service.selector"); + + /** + * The traffic distribution policy for the Service. + * + *

Notes: + * + *

Specifies how traffic is distributed to endpoints for this Service. This attribute aligns + * with the {@code trafficDistribution} field of the K8s + * ServiceSpec. Known values include {@code PreferSameZone} (prefer endpoints in the same zone + * as the client) and {@code PreferSameNode} (prefer endpoints on the same node, fallback to same + * zone, then cluster-wide). If this field is not set on the Service, the attribute SHOULD NOT be + * emitted. When not set, Kubernetes distributes traffic evenly across all endpoints cluster-wide. + */ + public static final AttributeKey K8S_SERVICE_TRAFFIC_DISTRIBUTION = + stringKey("k8s.service.traffic_distribution"); + + /** + * The type of the Kubernetes Service. + * + *

Notes: + * + *

This attribute aligns with the {@code type} field of the K8s + * ServiceSpec. + */ + public static final AttributeKey K8S_SERVICE_TYPE = stringKey("k8s.service.type"); + + /** The UID of the Service. */ + public static final AttributeKey K8S_SERVICE_UID = stringKey("k8s.service.uid"); + /** * The annotation placed on the StatefulSet, the {@code } being the annotation name, the * value being the annotation value, even if the value is empty. @@ -826,6 +980,51 @@ public static final class K8sPodStatusReasonIncubatingValues { private K8sPodStatusReasonIncubatingValues() {} } + /** Values for {@link #K8S_SERVICE_ENDPOINT_ADDRESS_TYPE}. */ + public static final class K8sServiceEndpointAddressTypeIncubatingValues { + /** IPv4 address type */ + public static final String IPV4 = "IPv4"; + + /** IPv6 address type */ + public static final String IPV6 = "IPv6"; + + /** FQDN address type */ + public static final String FQDN = "FQDN"; + + private K8sServiceEndpointAddressTypeIncubatingValues() {} + } + + /** Values for {@link #K8S_SERVICE_ENDPOINT_CONDITION}. */ + public static final class K8sServiceEndpointConditionIncubatingValues { + /** The endpoint is ready to receive new connections. */ + public static final String READY = "ready"; + + /** The endpoint is currently handling traffic. */ + public static final String SERVING = "serving"; + + /** The endpoint is in the process of shutting down. */ + public static final String TERMINATING = "terminating"; + + private K8sServiceEndpointConditionIncubatingValues() {} + } + + /** Values for {@link #K8S_SERVICE_TYPE}. */ + public static final class K8sServiceTypeIncubatingValues { + /** ClusterIP service type */ + public static final String CLUSTER_IP = "ClusterIP"; + + /** NodePort service type */ + public static final String NODE_PORT = "NodePort"; + + /** LoadBalancer service type */ + public static final String LOAD_BALANCER = "LoadBalancer"; + + /** ExternalName service type */ + public static final String EXTERNAL_NAME = "ExternalName"; + + private K8sServiceTypeIncubatingValues() {} + } + /** Values for {@link #K8S_VOLUME_TYPE}. */ public static final class K8sVolumeTypeIncubatingValues { /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java index 80a5872f..f55b0c86 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java @@ -15,32 +15,32 @@ @SuppressWarnings("unused") public final class MessageIncubatingAttributes { /** - * Deprecated, use {@code rpc.message.compressed_size} instead. + * Deprecated, no replacement at this time. * - * @deprecated Replaced by {@code rpc.message.compressed_size}. + * @deprecated Deprecated, no replacement at this time. */ @Deprecated public static final AttributeKey MESSAGE_COMPRESSED_SIZE = longKey("message.compressed_size"); /** - * Deprecated, use {@code rpc.message.id} instead. + * Deprecated, no replacement at this time. * - * @deprecated Replaced by {@code rpc.message.id}. + * @deprecated Deprecated, no replacement at this time. */ @Deprecated public static final AttributeKey MESSAGE_ID = longKey("message.id"); /** - * Deprecated, use {@code rpc.message.type} instead. + * Deprecated, no replacement at this time. * - * @deprecated Replaced by {@code rpc.message.type}. + * @deprecated Deprecated, no replacement at this time. */ @Deprecated public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); /** - * Deprecated, use {@code rpc.message.uncompressed_size} instead. + * Deprecated, no replacement at this time. * - * @deprecated Replaced by {@code rpc.message.uncompressed_size}. + * @deprecated Deprecated, no replacement at this time. */ @Deprecated public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = @@ -51,7 +51,7 @@ public final class MessageIncubatingAttributes { /** * Values for {@link #MESSAGE_TYPE} * - * @deprecated Replaced by {@code rpc.message.type}. + * @deprecated Deprecated, no replacement at this time. */ @Deprecated public static final class MessageTypeIncubatingValues { diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java index 368c2e28..fc90f049 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpenaiIncubatingAttributes.java @@ -13,6 +13,9 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class OpenaiIncubatingAttributes { + /** The type of OpenAI API being used. */ + public static final AttributeKey OPENAI_API_TYPE = stringKey("openai.api.type"); + /** The service tier requested. May be a specific tier, default, or auto. */ public static final AttributeKey OPENAI_REQUEST_SERVICE_TIER = stringKey("openai.request.service_tier"); @@ -27,6 +30,24 @@ public final class OpenaiIncubatingAttributes { // Enum definitions + /** Values for {@link #OPENAI_API_TYPE}. */ + public static final class OpenaiApiTypeIncubatingValues { + /** + * The OpenAI Chat Completions + * API. + */ + public static final String CHAT_COMPLETIONS = "chat_completions"; + + /** + * The OpenAI Responses + * API. + */ + public static final String RESPONSES = "responses"; + + private OpenaiApiTypeIncubatingValues() {} + } + /** Values for {@link #OPENAI_REQUEST_SERVICE_TIER}. */ public static final class OpenaiRequestServiceTierIncubatingValues { /** The system will utilize scale tier credits until they are exhausted. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleCloudIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleCloudIncubatingAttributes.java new file mode 100644 index 00000000..3d536798 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleCloudIncubatingAttributes.java @@ -0,0 +1,30 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OracleCloudIncubatingAttributes { + /** + * The OCI realm identifier that indicates the isolated partition in which the tenancy and its + * resources reside. + * + *

Notes: + * + *

See OCI + * documentation on realms + */ + public static final AttributeKey ORACLE_CLOUD_REALM = stringKey("oracle_cloud.realm"); + + // Enum definitions + + private OracleCloudIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleIncubatingAttributes.java new file mode 100644 index 00000000..fba19865 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OracleIncubatingAttributes.java @@ -0,0 +1,80 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OracleIncubatingAttributes { + /** + * The database domain associated with the connection. + * + *

Notes: + * + *

This attribute SHOULD be set to the value of the {@code DB_DOMAIN} initialization parameter, + * as exposed in {@code v$parameter}. {@code DB_DOMAIN} defines the domain portion of the global + * database name and SHOULD be configured when a database is, or may become, part of a distributed + * environment. Its value consists of one or more valid identifiers (alphanumeric ASCII + * characters) separated by periods. + */ + public static final AttributeKey ORACLE_DB_DOMAIN = stringKey("oracle.db.domain"); + + /** + * The instance name associated with the connection in an Oracle Real Application Clusters + * environment. + * + *

Notes: + * + *

There can be multiple instances associated with a single database service. It indicates the + * unique instance name to which the connection is currently bound. For non-RAC databases, this + * value defaults to the {@code oracle.db.name}. + */ + public static final AttributeKey ORACLE_DB_INSTANCE_NAME = + stringKey("oracle.db.instance.name"); + + /** + * The database name associated with the connection. + * + *

Notes: + * + *

This attribute SHOULD be set to the value of the parameter {@code DB_NAME} exposed in {@code + * v$parameter}. + */ + public static final AttributeKey ORACLE_DB_NAME = stringKey("oracle.db.name"); + + /** + * The pluggable database (PDB) name associated with the connection. + * + *

Notes: + * + *

This attribute SHOULD reflect the PDB that the session is currently connected to. If + * instrumentation cannot reliably obtain the active PDB name for each operation without issuing + * an additional query (such as {@code SELECT SYS_CONTEXT}), it is RECOMMENDED to fall back to the + * PDB name specified at connection establishment. + */ + public static final AttributeKey ORACLE_DB_PDB = stringKey("oracle.db.pdb"); + + /** + * The service name currently associated with the database connection. + * + *

Notes: + * + *

The effective service name for a connection can change during its lifetime, for example + * after executing sql, {@code ALTER SESSION}. If an instrumentation cannot reliably obtain the + * current service name for each operation without issuing an additional query (such as {@code + * SELECT SYS_CONTEXT}), it is RECOMMENDED to fall back to the service name originally provided at + * connection establishment. + */ + public static final AttributeKey ORACLE_DB_SERVICE = stringKey("oracle.db.service"); + + // Enum definitions + + private OracleIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java index 0ddc4669..8e017edf 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java @@ -73,6 +73,29 @@ public final class PprofIncubatingAttributes { public static final AttributeKey PPROF_PROFILE_KEEP_FRAMES = stringKey("pprof.profile.keep_frames"); + /** + * Records the pprof's default_sample_type in the original profile. Not set if the default sample + * type was missing. + * + *

Notes: + * + *

This attribute, if present, MUST be set at the scope level + * (resource_profiles[].scope_profiles[].scope.attributes[]). + */ + public static final AttributeKey PPROF_SCOPE_DEFAULT_SAMPLE_TYPE = + stringKey("pprof.scope.default_sample_type"); + + /** + * Records the indexes of the sample types in the original profile. + * + *

Notes: + * + *

This attribute, if present, MUST be set at the scope level + * (resource_profiles[].scope_profiles[].scope.attributes[]). + */ + public static final AttributeKey> PPROF_SCOPE_SAMPLE_TYPE_ORDER = + longArrayKey("pprof.scope.sample_type_order"); + // Enum definitions private PprofIncubatingAttributes() {} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java index 4794265e..b9795a06 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java @@ -83,10 +83,9 @@ public final class RpcIncubatingAttributes { public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); /** - * Deprecated, use span status description or {@code error.message} attribute on other signals. + * Deprecated, use the span status description when reporting JSON-RPC spans. * - * @deprecated Use the span status description or {@code error.message} attribute on other - * signals. + * @deprecated Use the span status description when reporting JSON-RPC spans. */ @Deprecated public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = @@ -109,7 +108,12 @@ public final class RpcIncubatingAttributes { @Deprecated public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); - /** Compressed size of the message in bytes. */ + /** + * Compressed size of the message in bytes. + * + * @deprecated Deprecated, no replacement at this time. + */ + @Deprecated public static final AttributeKey RPC_MESSAGE_COMPRESSED_SIZE = longKey("rpc.message.compressed_size"); @@ -120,13 +124,25 @@ public final class RpcIncubatingAttributes { *

Notes: * *

This way we guarantee that the values will be consistent between different implementations. + * + * @deprecated Deprecated, no replacement at this time. */ - public static final AttributeKey RPC_MESSAGE_ID = longKey("rpc.message.id"); + @Deprecated public static final AttributeKey RPC_MESSAGE_ID = longKey("rpc.message.id"); - /** Whether this is a received or sent message. */ + /** + * Whether this is a received or sent message. + * + * @deprecated Deprecated, no replacement at this time. + */ + @Deprecated public static final AttributeKey RPC_MESSAGE_TYPE = stringKey("rpc.message.type"); - /** Uncompressed size of the message in bytes. */ + /** + * Uncompressed size of the message in bytes. + * + * @deprecated Deprecated, no replacement at this time. + */ + @Deprecated public static final AttributeKey RPC_MESSAGE_UNCOMPRESSED_SIZE = longKey("rpc.message.uncompressed_size"); @@ -355,7 +371,12 @@ public static final class RpcGrpcStatusCodeIncubatingValues { private RpcGrpcStatusCodeIncubatingValues() {} } - /** Values for {@link #RPC_MESSAGE_TYPE}. */ + /** + * Values for {@link #RPC_MESSAGE_TYPE} + * + * @deprecated Deprecated, no replacement at this time. + */ + @Deprecated public static final class RpcMessageTypeIncubatingValues { /** sent. */ public static final String SENT = "SENT"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java index e33649e6..f772ffe0 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java @@ -13,6 +13,17 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class ServiceIncubatingAttributes { + /** + * The operational criticality of the service. + * + *

Notes: + * + *

Application developers are encouraged to set {@code service.criticality} to express the + * operational importance of their services. Telemetry consumers MAY use this attribute to + * optimize telemetry collection or improve user experience. + */ + public static final AttributeKey SERVICE_CRITICALITY = stringKey("service.criticality"); + /** * The string ID of the service instance. * @@ -47,7 +58,11 @@ public final class ServiceIncubatingAttributes { * the {@code service.instance.id} if they can unambiguously determine the service instance for * that telemetry. This is typically the case for scraping receivers, as they know the target * address and port. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.ServiceAttributes#SERVICE_INSTANCE_ID} attribute. */ + @Deprecated public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); /** @@ -77,7 +92,11 @@ public final class ServiceIncubatingAttributes { * {@code service.name} is expected to be unique for all services that have no explicit namespace * defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length * namespace string is assumed equal to unspecified namespace. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.ServiceAttributes#SERVICE_NAMESPACE} attribute. */ + @Deprecated public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); /** @@ -106,5 +125,25 @@ public final class ServiceIncubatingAttributes { // Enum definitions + /** Values for {@link #SERVICE_CRITICALITY}. */ + public static final class ServiceCriticalityIncubatingValues { + /** + * Service is business-critical; downtime directly impacts revenue, user experience, or core + * functionality. + */ + public static final String CRITICAL = "critical"; + + /** Service is important but has degradation tolerance or fallback mechanisms. */ + public static final String HIGH = "high"; + + /** Service provides supplementary functionality; degradation has limited user impact. */ + public static final String MEDIUM = "medium"; + + /** Service is non-essential to core operations; used for background tasks or internal tools. */ + public static final String LOW = "low"; + + private ServiceCriticalityIncubatingValues() {} + } + private ServiceIncubatingAttributes() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java index d1d7195e..4cdb3e1c 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java @@ -194,8 +194,8 @@ public static final class SystemMemoryStateIncubatingValues { /** * shared. * - * @deprecated Removed, report shared memory usage with {@code metric.system.memory.shared} - * metric + * @deprecated Removed, report shared memory usage with {@code + * metric.system.memory.linux.shared} metric */ @Deprecated public static final String SHARED = "shared"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java index 64ddb29d..a318e947 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java @@ -85,6 +85,14 @@ public final class UrlIncubatingAttributes { * *

This list is subject to change over time. * + *

Matching of query parameter keys against the sensitive list SHOULD be case-sensitive. + * + *

Instrumentation MAY provide a way to override this list via declarative configuration. If + * so, it SHOULD use the {@code sensitive_query_parameters} property (an array of case-sensitive + * strings with minimum items 0) under {@code + * .instrumentation/development.general.sanitization.url}. This list is a full override of the + * default sensitive query parameter keys, it is not a list of keys in addition to the defaults. + * *

When a query string value is redacted, the query string key SHOULD still be preserved, e.g. * {@code https://www.example.com/path?color=blue&sig=REDACTED}. * @@ -149,6 +157,14 @@ public final class UrlIncubatingAttributes { * *

This list is subject to change over time. * + *

Matching of query parameter keys against the sensitive list SHOULD be case-sensitive. + * + *

Instrumentation MAY provide a way to override this list via declarative configuration. If + * so, it SHOULD use the {@code sensitive_query_parameters} property (an array of case-sensitive + * strings with minimum items 0) under {@code + * .instrumentation/development.general.sanitization.url}. This list is a full override of the + * default sensitive query parameter keys, it is not a list of keys in addition to the defaults. + * *

When a query string value is redacted, the query string key SHOULD still be preserved, e.g. * {@code q=OpenTelemetry&sig=REDACTED}. * diff --git a/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java index b029d72f..a18ef4e3 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java @@ -89,6 +89,11 @@ public final class DbAttributes { * summary following Generating query * summary section. + * + *

For batch operations, if the individual operations are known to have the same query summary + * then that query summary SHOULD be used prepended by {@code BATCH }, otherwise {@code + * db.query.summary} SHOULD be {@code BATCH} or some other database system specific term if more + * applicable. */ public static final AttributeKey DB_QUERY_SUMMARY = stringKey("db.query.summary"); diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java index a5198bd3..03e8b9c2 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java @@ -13,7 +13,19 @@ // buildscripts/templates/registry/java/SemanticAttributes.java.j2 @SuppressWarnings("unused") public final class ExceptionAttributes { - /** The exception message. */ + /** + * The exception message. + * + *

Notes: + * + *

+ * + * [!WARNING] + * + *

This attribute may contain sensitive information. + * + *

+ */ public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); /** diff --git a/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java index 2be1b567..487b1daa 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java @@ -66,8 +66,15 @@ public final class HttpAttributes { * _OTHER}, then it MUST provide a way to override the list of known HTTP methods. If this * override is done via environment variable, then the environment variable MUST be named * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive - * known HTTP methods (this list MUST be a full override of the default known method, it is not a - * list of known methods in addition to the defaults). + * known HTTP methods. + * + *

If this override is done via declarative configuration, then the list MUST be configurable + * via the {@code known_methods} property (an array of case-sensitive strings with minimum items + * 0) under {@code .instrumentation/development.general.http.client} and/or {@code + * .instrumentation/development.general.http.server}. + * + *

In either case, this list MUST be a full override of the default known methods, it is not a + * list of known methods in addition to the defaults. * *

HTTP method names are case-sensitive and {@code http.request.method} attribute value MUST * match a known HTTP method name exactly. Instrumentations for specific web frameworks that diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java index 0b09b712..add13ef1 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java @@ -7,6 +7,8 @@ public final class SchemaUrls { + public static final String V1_40_0 = "https://opentelemetry.io/schemas/1.40.0"; + public static final String V1_39_0 = "https://opentelemetry.io/schemas/1.39.0"; public static final String V1_38_0 = "https://opentelemetry.io/schemas/1.38.0"; public static final String V1_37_0 = "https://opentelemetry.io/schemas/1.37.0"; diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java index 471f5248..2fde592b 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java @@ -13,6 +13,43 @@ // buildscripts/templates/registry/java/SemanticAttributes.java.j2 @SuppressWarnings("unused") public final class ServiceAttributes { + /** + * The string ID of the service instance. + * + *

Notes: + * + *

MUST be unique for each instance of the same {@code service.namespace,service.name} pair (in + * other words {@code service.namespace,service.name,service.instance.id} triplet MUST be globally + * unique). The ID helps to distinguish instances of the same service that exist at the same time + * (e.g. instances of a horizontally scaled service). + * + *

Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 + * RFC 4122 UUID, but are free to use an + * inherent unique ID as the source of this value if stability is desirable. In that case, the ID + * SHOULD be used as source of a UUID Version 5 and SHOULD use the following UUID as the + * namespace: {@code 4d63009a-8d0f-11ee-aad7-4c796ed8e320}. + * + *

UUIDs are typically recommended, as only an opaque value for the purposes of identifying a + * service instance is needed. Similar to what can be seen in the man page for the {@code + * /etc/machine-id} file, the underlying data, such as pod name and namespace should be + * treated as confidential, being the user's choice to expose it or not via another resource + * attribute. + * + *

For applications running behind an application server (like unicorn), we do not recommend + * using one identifier for all processes participating in the application. Instead, it's + * recommended each division (e.g. a worker thread in unicorn) to have its own instance.id. + * + *

It's not recommended for a Collector to set {@code service.instance.id} if it can't + * unambiguously determine the service instance that is generating that telemetry. For instance, + * creating an UUID based on {@code pod.name} will likely be wrong, as the Collector might not + * know from which container within that pod the telemetry originated. However, Collectors can set + * the {@code service.instance.id} if they can unambiguously determine the service instance for + * that telemetry. This is typically the case for scraping receivers, as they know the target + * address and port. + */ + public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); + /** * Logical name of the service. * @@ -26,6 +63,20 @@ public final class ServiceAttributes { */ public static final AttributeKey SERVICE_NAME = stringKey("service.name"); + /** + * A namespace for {@code service.name}. + * + *

Notes: + * + *

A string value having a meaning that helps to distinguish a group of services, for example + * the team name that owns a group of services. {@code service.name} is expected to be unique + * within the same namespace. If {@code service.namespace} is not specified in the Resource then + * {@code service.name} is expected to be unique for all services that have no explicit namespace + * defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length + * namespace string is assumed equal to unspecified namespace. + */ + public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); + /** * The version string of the service component. The format is not defined by these conventions. */ diff --git a/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java index 751aed73..b8eaba99 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java @@ -55,6 +55,14 @@ public final class UrlAttributes { * *

This list is subject to change over time. * + *

Matching of query parameter keys against the sensitive list SHOULD be case-sensitive. + * + *

Instrumentation MAY provide a way to override this list via declarative configuration. If + * so, it SHOULD use the {@code sensitive_query_parameters} property (an array of case-sensitive + * strings with minimum items 0) under {@code + * .instrumentation/development.general.sanitization.url}. This list is a full override of the + * default sensitive query parameter keys, it is not a list of keys in addition to the defaults. + * *

When a query string value is redacted, the query string key SHOULD still be preserved, e.g. * {@code https://www.example.com/path?color=blue&sig=REDACTED}. */ @@ -97,6 +105,14 @@ public final class UrlAttributes { * *

This list is subject to change over time. * + *

Matching of query parameter keys against the sensitive list SHOULD be case-sensitive. + * + *

Instrumentation MAY provide a way to override this list via declarative configuration. If + * so, it SHOULD use the {@code sensitive_query_parameters} property (an array of case-sensitive + * strings with minimum items 0) under {@code + * .instrumentation/development.general.sanitization.url}. This list is a full override of the + * default sensitive query parameter keys, it is not a list of keys in addition to the defaults. + * *

When a query string value is redacted, the query string key SHOULD still be preserved, e.g. * {@code q=OpenTelemetry&sig=REDACTED}. */ From 3932c61232e6b9bee4f36e7538223fd8d5b4e3e2 Mon Sep 17 00:00:00 2001 From: otelbot <197425009+otelbot@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:12:44 +0000 Subject: [PATCH 2/4] Update changelog PR link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 570ed877..baea595d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased * Bump to semconv v1.40.0 - ([#PRNUM](https://github.com/open-telemetry/semantic-conventions-java/pull/PRNUM)) + ([#418](https://github.com/open-telemetry/semantic-conventions-java/pull/418)) ## Version 1.39.0 (2026-01-28) From bc7a959465ee6ecae3fca204ab2d520af0b1ce08 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 19 Feb 2026 12:26:35 -0800 Subject: [PATCH 3/4] fixes --- .github/workflows/auto-update-semconv.yml | 4 ++++ .../IncubatingSemanticAttributes.java.j2 | 5 ++++- .../templates/registry/java/SemanticAttributes.java.j2 | 5 ++++- .../current_vs_latest/opentelemetry-semconv.txt | 10 ++++++++-- .../semconv/incubating/PprofIncubatingAttributes.java | 1 + 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-update-semconv.yml b/.github/workflows/auto-update-semconv.yml index 1e3cd704..15a247db 100644 --- a/.github/workflows/auto-update-semconv.yml +++ b/.github/workflows/auto-update-semconv.yml @@ -82,6 +82,9 @@ jobs: - name: Apply formatting run: ./gradlew spotlessApply + - name: Generate API diffs + run: ./gradlew jApiCmp + - name: Use CLA approved bot run: .github/scripts/use-cla-approved-bot.sh @@ -99,6 +102,7 @@ jobs: git checkout -b $branch git add -u git add semconv**/src/main/java + git add docs/apidiffs/ git commit -m "$message" git push --set-upstream origin $branch pr_url=$(gh pr create --title "$message" \ diff --git a/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 b/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 index c29e7e5d..571550ad 100644 --- a/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 +++ b/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @@ -23,11 +23,14 @@ */ package io.opentelemetry.semconv.incubating; +import static io.opentelemetry.api.common.AttributeKey.booleanArrayKey; import static io.opentelemetry.api.common.AttributeKey.booleanKey; +import static io.opentelemetry.api.common.AttributeKey.doubleArrayKey; import static io.opentelemetry.api.common.AttributeKey.doubleKey; +import static io.opentelemetry.api.common.AttributeKey.longArrayKey; import static io.opentelemetry.api.common.AttributeKey.longKey; -import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; diff --git a/buildscripts/templates/registry/java/SemanticAttributes.java.j2 b/buildscripts/templates/registry/java/SemanticAttributes.java.j2 index 65fb5766..89443633 100644 --- a/buildscripts/templates/registry/java/SemanticAttributes.java.j2 +++ b/buildscripts/templates/registry/java/SemanticAttributes.java.j2 @@ -22,11 +22,14 @@ */ package io.opentelemetry.semconv; +import static io.opentelemetry.api.common.AttributeKey.booleanArrayKey; import static io.opentelemetry.api.common.AttributeKey.booleanKey; +import static io.opentelemetry.api.common.AttributeKey.doubleArrayKey; import static io.opentelemetry.api.common.AttributeKey.doubleKey; +import static io.opentelemetry.api.common.AttributeKey.longArrayKey; import static io.opentelemetry.api.common.AttributeKey.longKey; -import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt index dae9ee99..295b0bd9 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt @@ -1,2 +1,8 @@ -Comparing source compatibility of opentelemetry-semconv-1.39.0-SNAPSHOT.jar against opentelemetry-semconv-1.39.0.jar -No changes. \ No newline at end of file +Comparing source compatibility of opentelemetry-semconv-1.40.0-SNAPSHOT.jar against opentelemetry-semconv-1.39.0.jar +*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_40_0 +*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.ServiceAttributes (not serializable) + === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey SERVICE_INSTANCE_ID + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey SERVICE_NAMESPACE diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java index 8e017edf..bc0e4959 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PprofIncubatingAttributes.java @@ -6,6 +6,7 @@ package io.opentelemetry.semconv.incubating; import static io.opentelemetry.api.common.AttributeKey.booleanKey; +import static io.opentelemetry.api.common.AttributeKey.longArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; From 26cb340ac5525343a95231ba8b4ad04645278c61 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 19 Feb 2026 12:36:22 -0800 Subject: [PATCH 4/4] spacing --- .github/scripts/update-semconv-version.sh | 2 +- semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/scripts/update-semconv-version.sh b/.github/scripts/update-semconv-version.sh index 2975f400..762ec155 100755 --- a/.github/scripts/update-semconv-version.sh +++ b/.github/scripts/update-semconv-version.sh @@ -15,7 +15,7 @@ sed -Ei "s/( semanticConventionsVersion,)/\1\n \"$old_version\",/" build.g # Add new version constant to SchemaUrls.java version_underscore=${version//./_} -sed -Ei "s/(public final class SchemaUrls \{)/\1\n\n public static final String V${version_underscore} = \"https:\/\/opentelemetry.io\/schemas\/${version}\";/" \ +sed -Ei "s/(public final class SchemaUrls \{)/\1\n public static final String V${version_underscore} = \"https:\/\/opentelemetry.io\/schemas\/${version}\";/" \ semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java # Add changelog entry diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java index add13ef1..6078fbab 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java @@ -8,7 +8,6 @@ public final class SchemaUrls { public static final String V1_40_0 = "https://opentelemetry.io/schemas/1.40.0"; - public static final String V1_39_0 = "https://opentelemetry.io/schemas/1.39.0"; public static final String V1_38_0 = "https://opentelemetry.io/schemas/1.38.0"; public static final String V1_37_0 = "https://opentelemetry.io/schemas/1.37.0";