diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a629bb8b..2e78cc7d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- bump semantic-conventions to v1.40.0 + ([#4941](https://github.com/open-telemetry/opentelemetry-python/pull/4941)) - Add stale PR GitHub Action ([#4926](https://github.com/open-telemetry/opentelemetry-python/pull/4926)) - `opentelemetry-sdk`: Drop unused Jaeger exporter environment variables (exporter removed in 1.22.0) diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/error_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/error_attributes.py index f690829517..c06ebd26d0 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/error_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/error_attributes.py @@ -19,12 +19,7 @@ ERROR_MESSAGE: Final = "error.message" """ -A message providing more detail about an error in human-readable form. -Note: `error.message` should provide additional context and detail about an error. -It is NOT RECOMMENDED to duplicate the value of `error.type` in `error.message`. -It is also NOT RECOMMENDED to duplicate the value of `exception.message` in `error.message`. - -`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 `feature_flag.error.message` for feature flag errors. """ ERROR_TYPE: Final = "error.type" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py index 8328442277..3ee2e63ccf 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py @@ -22,11 +22,16 @@ The unique identifier for the flag evaluation context. For example, the targeting key. """ +FEATURE_FLAG_ERROR_MESSAGE: Final = "feature_flag.error.message" +""" +A message providing more detail about an error that occurred during feature flag evaluation in human-readable form. +""" + FEATURE_FLAG_EVALUATION_ERROR_MESSAGE: Final = ( "feature_flag.evaluation.error.message" ) """ -Deprecated: Replaced by `error.message`. +Deprecated: Replaced by `feature_flag.error.message`. """ FEATURE_FLAG_EVALUATION_REASON: Final = "feature_flag.evaluation.reason" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py index c84a16b936..b1bd47289f 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py @@ -159,6 +159,27 @@ The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). """ +GCP_GCE_INSTANCE_GROUP_MANAGER_NAME: Final = ( + "gcp.gce.instance_group_manager.name" +) +""" +The name of the Instance Group Manager (IGM) that manages this VM, if any. +""" + +GCP_GCE_INSTANCE_GROUP_MANAGER_REGION: Final = ( + "gcp.gce.instance_group_manager.region" +) +""" +The region of a **regional** Instance Group Manager (e.g., `us-central1`). Set this **only** when the IGM is regional. +""" + +GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE: Final = ( + "gcp.gce.instance_group_manager.zone" +) +""" +The zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this **only** when the IGM is zonal. +""" + class GcpApphubServiceCriticalityTypeValues(Enum): MISSION_CRITICAL = "MISSION_CRITICAL" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py index 9a8d26773e..c7d734cd47 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py @@ -32,6 +32,11 @@ Human-readable name of the GenAI agent provided by the application. """ +GEN_AI_AGENT_VERSION: Final = "gen_ai.agent.version" +""" +The version of the GenAI agent. +""" + GEN_AI_COMPLETION: Final = "gen_ai.completion" """ Deprecated: Removed, no replacement at this time. @@ -268,6 +273,25 @@ The name of the model that generated the response. """ +GEN_AI_RETRIEVAL_DOCUMENTS: Final = "gen_ai.retrieval.documents" +""" +The documents retrieved. +Note: Instrumentations MUST follow [Retrieval documents JSON schema](/docs/gen-ai/gen-ai-retrieval-documents.json). +When the attribute is recorded on events, it MUST be recorded in structured +form. When recorded on spans, it MAY be recorded as a JSON string if structured +format is not supported and SHOULD be recorded in structured form otherwise. + +Each document object SHOULD contain at least the following properties: +`id` (string): A unique identifier for the document, `score` (double): The relevance score of the document. +""" + +GEN_AI_RETRIEVAL_QUERY_TEXT: Final = "gen_ai.retrieval.query.text" +""" +The query text used for retrieval. +Note: > [!Warning] +> This attribute may contain sensitive information. +""" + GEN_AI_SYSTEM: Final = "gen_ai.system" """ Deprecated: Replaced by `gen_ai.provider.name`. @@ -364,6 +388,22 @@ Datastore: A tool used by the agent to access and query structured or unstructured external data for retrieval-augmented tasks or knowledge updates. """ +GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS: Final = ( + "gen_ai.usage.cache_creation.input_tokens" +) +""" +The number of input tokens written to a provider-managed cache. +Note: The value SHOULD be included in `gen_ai.usage.input_tokens`. +""" + +GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS: Final = ( + "gen_ai.usage.cache_read.input_tokens" +) +""" +The number of input tokens served from a provider-managed cache. +Note: The value SHOULD be included in `gen_ai.usage.input_tokens`. +""" + GEN_AI_USAGE_COMPLETION_TOKENS: Final = "gen_ai.usage.completion_tokens" """ Deprecated: Replaced by `gen_ai.usage.output_tokens`. @@ -372,6 +412,10 @@ GEN_AI_USAGE_INPUT_TOKENS: Final = "gen_ai.usage.input_tokens" """ The number of tokens used in the GenAI input (prompt). +Note: 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. """ GEN_AI_USAGE_OUTPUT_TOKENS: Final = "gen_ai.usage.output_tokens" @@ -416,6 +460,8 @@ class GenAiOperationNameValues(Enum): """Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions).""" EMBEDDINGS = "embeddings" """Embeddings operation such as [OpenAI Create embeddings API](https://platform.openai.com/docs/api-reference/embeddings/create).""" + RETRIEVAL = "retrieval" + """Retrieval operation such as [OpenAI Search Vector Store API](https://platform.openai.com/docs/api-reference/vector-stores/search).""" CREATE_AGENT = "create_agent" """Create GenAI agent.""" INVOKE_AGENT = "invoke_agent" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py index 1b417362e9..5a3ddfe17b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py @@ -468,6 +468,113 @@ The UID of the resource quota. """ +K8S_SERVICE_ANNOTATION_TEMPLATE: Final = "k8s.service.annotation" +""" +The annotation placed on the Service, the `` being the annotation name, the value being the annotation value, even if the value is empty. +Note: Examples: + +- An annotation `prometheus.io/scrape` with value `true` SHOULD be recorded as + the `k8s.service.annotation.prometheus.io/scrape` attribute with value `"true"`. +- An annotation `data` with empty string value SHOULD be recorded as + the `k8s.service.annotation.data` attribute with value `""`. +""" + +K8S_SERVICE_ENDPOINT_ADDRESS_TYPE: Final = "k8s.service.endpoint.address_type" +""" +The address type of the service endpoint. +Note: The network address family or type of the endpoint. +This attribute aligns with the `addressType` field of the +[K8s EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). +It is used to differentiate metrics when a Service is backed by multiple address types +(e.g., in dual-stack clusters). +""" + +K8S_SERVICE_ENDPOINT_CONDITION: Final = "k8s.service.endpoint.condition" +""" +The condition of the service endpoint. +Note: The current operational condition of the service endpoint. +An endpoint can have multiple conditions set at once (e.g., both `serving` and `terminating` during rollout). +This attribute aligns with the condition fields in the [K8s EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). +""" + +K8S_SERVICE_ENDPOINT_ZONE: Final = "k8s.service.endpoint.zone" +""" +The zone of the service endpoint. +Note: The zone where the endpoint is located, typically corresponding to a failure domain. +This attribute aligns with the `zone` field of endpoints in the +[K8s EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). +It enables zone-aware monitoring of service endpoint distribution and supports +features like [Topology Aware Routing](https://kubernetes.io/docs/concepts/services-networking/topology-aware-routing/). + +If the zone is not populated (e.g., nodes without the `topology.kubernetes.io/zone` label), +the attribute value will be an empty string. +""" + +K8S_SERVICE_LABEL_TEMPLATE: Final = "k8s.service.label" +""" +The label placed on the Service, the `` being the label name, the value being the label value, even if the value is empty. +Note: Examples: + +- A label `app` with value `my-service` SHOULD be recorded as + the `k8s.service.label.app` attribute with value `"my-service"`. +- A label `data` with empty string value SHOULD be recorded as + the `k8s.service.label.data` attribute with value `""`. +""" + +K8S_SERVICE_NAME: Final = "k8s.service.name" +""" +The name of the Service. +""" + +K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES: Final = ( + "k8s.service.publish_not_ready_addresses" +) +""" +Whether the Service publishes not-ready endpoints. +Note: 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 `publishNotReadyAddresses` field of the +[K8s ServiceSpec](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec). +""" + +K8S_SERVICE_SELECTOR_TEMPLATE: Final = "k8s.service.selector" +""" +The selector key-value pair placed on the Service, the `` being the selector key, the value being the selector value. +Note: These selectors are used to correlate with pod labels. Each selector key-value pair becomes a separate attribute. + +Examples: + +- A selector `app=my-app` SHOULD be recorded as + the `k8s.service.selector.app` attribute with value `"my-app"`. +- A selector `version=v1` SHOULD be recorded as + the `k8s.service.selector.version` attribute with value `"v1"`. +""" + +K8S_SERVICE_TRAFFIC_DISTRIBUTION: Final = "k8s.service.traffic_distribution" +""" +The traffic distribution policy for the Service. +Note: Specifies how traffic is distributed to endpoints for this Service. +This attribute aligns with the `trafficDistribution` field of the +[K8s ServiceSpec](https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-distribution). +Known values include `PreferSameZone` (prefer endpoints in the same zone as the client) and +`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. +""" + +K8S_SERVICE_TYPE: Final = "k8s.service.type" +""" +The type of the Kubernetes Service. +Note: This attribute aligns with the `type` field of the +[K8s ServiceSpec](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec). +""" + +K8S_SERVICE_UID: Final = "k8s.service.uid" +""" +The UID of the Service. +""" + K8S_STATEFULSET_ANNOTATION_TEMPLATE: Final = "k8s.statefulset.annotation" """ The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. @@ -601,6 +708,35 @@ class K8sPodStatusReasonValues(Enum): """The pod was rejected admission to the node because of an error during admission that could not be categorized.""" +class K8sServiceEndpointAddressTypeValues(Enum): + IPV4 = "IPv4" + """IPv4 address type.""" + IPV6 = "IPv6" + """IPv6 address type.""" + FQDN = "FQDN" + """FQDN address type.""" + + +class K8sServiceEndpointConditionValues(Enum): + READY = "ready" + """The endpoint is ready to receive new connections.""" + SERVING = "serving" + """The endpoint is currently handling traffic.""" + TERMINATING = "terminating" + """The endpoint is in the process of shutting down.""" + + +class K8sServiceTypeValues(Enum): + CLUSTER_IP = "ClusterIP" + """ClusterIP service type.""" + NODE_PORT = "NodePort" + """NodePort service type.""" + LOAD_BALANCER = "LoadBalancer" + """LoadBalancer service type.""" + EXTERNAL_NAME = "ExternalName" + """ExternalName service type.""" + + class K8sVolumeTypeValues(Enum): PERSISTENT_VOLUME_CLAIM = "persistentVolumeClaim" """A [persistentVolumeClaim](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim) volume.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py index f6ff0296fa..6ec83f30d9 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py @@ -19,27 +19,27 @@ MESSAGE_COMPRESSED_SIZE: Final = "message.compressed_size" """ -Deprecated: Replaced by `rpc.message.compressed_size`. +Deprecated: Deprecated, no replacement at this time. """ MESSAGE_ID: Final = "message.id" """ -Deprecated: Replaced by `rpc.message.id`. +Deprecated: Deprecated, no replacement at this time. """ MESSAGE_TYPE: Final = "message.type" """ -Deprecated: Replaced by `rpc.message.type`. +Deprecated: Deprecated, no replacement at this time. """ MESSAGE_UNCOMPRESSED_SIZE: Final = "message.uncompressed_size" """ -Deprecated: Replaced by `rpc.message.uncompressed_size`. +Deprecated: Deprecated, no replacement at this time. """ @deprecated( - "The attribute message.type is deprecated - Replaced by `rpc.message.type`" + "The attribute message.type is deprecated - Deprecated, no replacement at this time" ) class MessageTypeValues(Enum): SENT = "SENT" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py index 8c044436d1..2460e4f332 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py @@ -15,6 +15,11 @@ from enum import Enum from typing import Final +OPENAI_API_TYPE: Final = "openai.api.type" +""" +The type of OpenAI API being used. +""" + OPENAI_REQUEST_SERVICE_TIER: Final = "openai.request.service_tier" """ The service tier requested. May be a specific tier, default, or auto. @@ -33,6 +38,13 @@ """ +class OpenaiApiTypeValues(Enum): + CHAT_COMPLETIONS = "chat_completions" + """The OpenAI [Chat Completions API](https://developers.openai.com/api/reference/chat-completions/overview).""" + RESPONSES = "responses" + """The OpenAI [Responses API](https://developers.openai.com/api/reference/responses/overview).""" + + class OpenaiRequestServiceTierValues(Enum): AUTO = "auto" """The system will utilize scale tier credits until they are exhausted.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/oracle_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/oracle_attributes.py new file mode 100644 index 0000000000..911c3c8dc1 --- /dev/null +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/oracle_attributes.py @@ -0,0 +1,58 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Final + +ORACLE_DB_DOMAIN: Final = "oracle.db.domain" +""" +The database domain associated with the connection. +Note: This attribute SHOULD be set to the value of the `DB_DOMAIN` initialization parameter, +as exposed in `v$parameter`. `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. +""" + +ORACLE_DB_INSTANCE_NAME: Final = "oracle.db.instance.name" +""" +The instance name associated with the connection in an Oracle Real Application Clusters environment. +Note: 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 `oracle.db.name`. +""" + +ORACLE_DB_NAME: Final = "oracle.db.name" +""" +The database name associated with the connection. +Note: This attribute SHOULD be set to the value of the parameter `DB_NAME` exposed in `v$parameter`. +""" + +ORACLE_DB_PDB: Final = "oracle.db.pdb" +""" +The pluggable database (PDB) name associated with the connection. +Note: 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 `SELECT SYS_CONTEXT`), it is +RECOMMENDED to fall back to the PDB name specified at connection establishment. +""" + +ORACLE_DB_SERVICE: Final = "oracle.db.service" +""" +The service name currently associated with the database connection. +Note: The effective service name for a connection can change during its lifetime, +for example after executing sql, `ALTER SESSION`. If an instrumentation cannot reliably +obtain the current service name for each operation without issuing an additional +query (such as `SELECT SYS_CONTEXT`), it is RECOMMENDED to fall back to the +service name originally provided at connection establishment. +""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/oracle_cloud_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/oracle_cloud_attributes.py new file mode 100644 index 0000000000..e094b76626 --- /dev/null +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/oracle_cloud_attributes.py @@ -0,0 +1,21 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Final + +ORACLE_CLOUD_REALM: Final = "oracle_cloud.realm" +""" +The OCI realm identifier that indicates the isolated partition in which the tenancy and its resources reside. +Note: See [OCI documentation on realms](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). +""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/pprof_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/pprof_attributes.py index 9ce70b8c38..c2d95a7f78 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/pprof_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/pprof_attributes.py @@ -59,3 +59,15 @@ """ Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. """ + +PPROF_SCOPE_DEFAULT_SAMPLE_TYPE: Final = "pprof.scope.default_sample_type" +""" +Records the pprof's default_sample_type in the original profile. Not set if the default sample type was missing. +Note: This attribute, if present, MUST be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]). +""" + +PPROF_SCOPE_SAMPLE_TYPE_ORDER: Final = "pprof.scope.sample_type_order" +""" +Records the indexes of the sample types in the original profile. +Note: This attribute, if present, MUST be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]). +""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py index 9ab38a68de..9656eaef90 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py @@ -58,7 +58,7 @@ RPC_JSONRPC_ERROR_MESSAGE: Final = "rpc.jsonrpc.error_message" """ -Deprecated: Use the span status description or `error.message` attribute on other signals. +Deprecated: Use the span status description when reporting JSON-RPC spans. """ RPC_JSONRPC_REQUEST_ID: Final = "rpc.jsonrpc.request_id" @@ -73,23 +73,22 @@ RPC_MESSAGE_COMPRESSED_SIZE: Final = "rpc.message.compressed_size" """ -Compressed size of the message in bytes. +Deprecated: Deprecated, no replacement at this time. """ RPC_MESSAGE_ID: Final = "rpc.message.id" """ -MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. -Note: This way we guarantee that the values will be consistent between different implementations. +Deprecated: Deprecated, no replacement at this time. """ RPC_MESSAGE_TYPE: Final = "rpc.message.type" """ -Whether this is a received or sent message. +Deprecated: Deprecated, no replacement at this time. """ RPC_MESSAGE_UNCOMPRESSED_SIZE: Final = "rpc.message.uncompressed_size" """ -Uncompressed size of the message in bytes. +Deprecated: Deprecated, no replacement at this time. """ RPC_METHOD: Final = "rpc.method" @@ -247,6 +246,9 @@ class RpcGrpcStatusCodeValues(Enum): """UNAUTHENTICATED.""" +@deprecated( + "The attribute rpc.message.type is deprecated - Deprecated, no replacement at this time" +) class RpcMessageTypeValues(Enum): SENT = "SENT" """sent.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/service_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/service_attributes.py index 3c57c6a3e8..36ce043915 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/service_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/service_attributes.py @@ -12,37 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +from enum import Enum from typing import Final -SERVICE_INSTANCE_ID: Final = "service.instance.id" +SERVICE_CRITICALITY: Final = "service.criticality" +""" +The operational criticality of the service. +Note: Application developers are encouraged to set `service.criticality` to express the operational importance of their services. Telemetry consumers MAY use this attribute to optimize telemetry collection or improve user experience. """ -The string ID of the service instance. -Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words -`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](https://www.ietf.org/rfc/rfc4122.txt) 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: `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 -[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) 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 `service.instance.id` if it can't unambiguously determine the -service instance that is generating that telemetry. For instance, creating an UUID based on `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 `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. +SERVICE_INSTANCE_ID: Final = "service.instance.id" +""" +Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.service_attributes.SERVICE_INSTANCE_ID`. """ SERVICE_NAME: Final = "service.name" @@ -52,8 +33,7 @@ SERVICE_NAMESPACE: Final = "service.namespace" """ -A namespace for `service.name`. -Note: 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. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `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 in favor of stable :py:const:`opentelemetry.semconv.attributes.service_attributes.SERVICE_NAMESPACE`. """ SERVICE_PEER_NAME: Final = "service.peer.name" @@ -70,3 +50,14 @@ """ Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.service_attributes.SERVICE_VERSION`. """ + + +class ServiceCriticalityValues(Enum): + CRITICAL = "critical" + """Service is business-critical; downtime directly impacts revenue, user experience, or core functionality.""" + HIGH = "high" + """Service is important but has degradation tolerance or fallback mechanisms.""" + MEDIUM = "medium" + """Service provides supplementary functionality; degradation has limited user impact.""" + LOW = "low" + """Service is non-essential to core operations; used for background tasks or internal tools.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py index 1e555fb567..578d93da60 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py @@ -155,7 +155,7 @@ class SystemMemoryStateValues(Enum): FREE = "free" """free.""" SHARED = "shared" - """Deprecated: Removed, report shared memory usage with `metric.system.memory.shared` metric.""" + """Deprecated: Removed, report shared memory usage with `metric.system.memory.linux.shared` metric.""" BUFFERS = "buffers" """buffers.""" CACHED = "cached" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py index 0127376e2a..06b6143f09 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py @@ -2481,6 +2481,78 @@ def create_k8s_resourcequota_storage_request_used( ) +K8S_SERVICE_ENDPOINT_COUNT: Final = "k8s.service.endpoint.count" +""" +Number of endpoints for a service by condition and address type +Instrument: gauge +Unit: {endpoint} +Note: This metric is derived from the Kubernetes [EndpointSlice API](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). +It reports the number of network endpoints backing a Service, broken down by their condition and address type. + +In dual-stack or multi-protocol clusters, separate counts are reported for each address family (`IPv4`, `IPv6`, `FQDN`). + +When the optional `zone` attribute is enabled, counts are further broken down by availability zone for zone-aware monitoring. + +An endpoint may be reported under multiple conditions simultaneously (e.g., both `serving` and `terminating` during a graceful shutdown). +See [K8s EndpointConditions](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/) for more details. + +The conditions represent: +- `ready`: Endpoints capable of receiving new connections. +- `serving`: Endpoints currently handling traffic. +- `terminating`: Endpoints that are being phased out but may still be handling existing connections. + +For Services with `publishNotReadyAddresses` enabled (common for headless StatefulSets), +this metric will include endpoints that are published despite not being ready. +The `k8s.service.publish_not_ready_addresses` resource attribute indicates this setting. +""" + + +def create_k8s_service_endpoint_count( + meter: Meter, callbacks: Optional[Sequence[CallbackT]] +) -> ObservableGauge: + """Number of endpoints for a service by condition and address type""" + return meter.create_observable_gauge( + name=K8S_SERVICE_ENDPOINT_COUNT, + callbacks=callbacks, + description="Number of endpoints for a service by condition and address type.", + unit="{endpoint}", + ) + + +K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT: Final = ( + "k8s.service.load_balancer.ingress.count" +) +""" +Number of load balancer ingress points (external IPs/hostnames) assigned to the service +Instrument: gauge +Unit: {ingress} +Note: This metric reports the number of external ingress points (IP addresses or hostnames) +assigned to a LoadBalancer Service. + +It is only emitted for Services of type `LoadBalancer` and reflects the assignments +made by the underlying infrastructure's load balancer controller in the +[.status.loadBalancer.ingress](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceStatus) field. + +A value of `0` indicates that no ingress points have been assigned yet (e.g., during provisioning). +A value greater than `1` may occur when multiple IPs or hostnames are assigned (e.g., dual-stack configurations). + +This metric signals that external endpoints have been assigned by the load balancer controller, but it does not +guarantee that the load balancer is healthy. +""" + + +def create_k8s_service_load_balancer_ingress_count( + meter: Meter, callbacks: Optional[Sequence[CallbackT]] +) -> ObservableGauge: + """Number of load balancer ingress points (external IPs/hostnames) assigned to the service""" + return meter.create_observable_gauge( + name=K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT, + callbacks=callbacks, + description="Number of load balancer ingress points (external IPs/hostnames) assigned to the service.", + unit="{ingress}", + ) + + K8S_STATEFULSET_CURRENT_PODS: Final = "k8s.statefulset.current_pods" """ Deprecated: Replaced by `k8s.statefulset.pod.current`. diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/rpc_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/rpc_metrics.py index 5a89dbc9d9..bf85274951 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/rpc_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/rpc_metrics.py @@ -19,7 +19,7 @@ RPC_CLIENT_CALL_DURATION: Final = "rpc.client.call.duration" """ -Measures the duration of outbound remote procedure calls (RPC) +Measures the duration of an outgoing Remote Procedure Call (RPC) Instrument: histogram Unit: s Note: When this metric is reported alongside an RPC client span, the metric value @@ -28,10 +28,10 @@ def create_rpc_client_call_duration(meter: Meter) -> Histogram: - """Measures the duration of outbound remote procedure calls (RPC)""" + """Measures the duration of an outgoing Remote Procedure Call (RPC)""" return meter.create_histogram( name=RPC_CLIENT_CALL_DURATION, - description="Measures the duration of outbound remote procedure calls (RPC).", + description="Measures the duration of an outgoing Remote Procedure Call (RPC).", unit="s", ) @@ -53,10 +53,7 @@ def create_rpc_client_duration(meter: Meter) -> Histogram: RPC_CLIENT_REQUEST_SIZE: Final = "rpc.client.request.size" """ -Measures the size of RPC request messages (uncompressed) -Instrument: histogram -Unit: By -Note: **Streaming**: Recorded per message in a streaming batch. +Deprecated: Removed, no replacement at this time. """ @@ -86,10 +83,7 @@ def create_rpc_client_requests_per_rpc(meter: Meter) -> Histogram: RPC_CLIENT_RESPONSE_SIZE: Final = "rpc.client.response.size" """ -Measures the size of RPC response messages (uncompressed) -Instrument: histogram -Unit: By -Note: **Streaming**: Recorded per response in a streaming batch. +Deprecated: Removed, no replacement at this time. """ @@ -119,7 +113,7 @@ def create_rpc_client_responses_per_rpc(meter: Meter) -> Histogram: RPC_SERVER_CALL_DURATION: Final = "rpc.server.call.duration" """ -Measures the duration of inbound remote procedure calls (RPC) +Measures the duration of an incoming Remote Procedure Call (RPC) Instrument: histogram Unit: s Note: When this metric is reported alongside an RPC server span, the metric value @@ -128,10 +122,10 @@ def create_rpc_client_responses_per_rpc(meter: Meter) -> Histogram: def create_rpc_server_call_duration(meter: Meter) -> Histogram: - """Measures the duration of inbound remote procedure calls (RPC)""" + """Measures the duration of an incoming Remote Procedure Call (RPC)""" return meter.create_histogram( name=RPC_SERVER_CALL_DURATION, - description="Measures the duration of inbound remote procedure calls (RPC).", + description="Measures the duration of an incoming Remote Procedure Call (RPC).", unit="s", ) @@ -153,10 +147,7 @@ def create_rpc_server_duration(meter: Meter) -> Histogram: RPC_SERVER_REQUEST_SIZE: Final = "rpc.server.request.size" """ -Measures the size of RPC request messages (uncompressed) -Instrument: histogram -Unit: By -Note: **Streaming**: Recorded per message in a streaming batch. +Deprecated: Removed, no replacement at this time. """ @@ -186,10 +177,7 @@ def create_rpc_server_requests_per_rpc(meter: Meter) -> Histogram: RPC_SERVER_RESPONSE_SIZE: Final = "rpc.server.response.size" """ -Measures the size of RPC response messages (uncompressed) -Instrument: histogram -Unit: By -Note: **Streaming**: Recorded per response in a streaming batch. +Deprecated: Removed, no replacement at this time. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py index ba206b0d0a..edbca89749 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py @@ -368,6 +368,25 @@ def create_system_memory_linux_available(meter: Meter) -> UpDownCounter: ) +SYSTEM_MEMORY_LINUX_SHARED: Final = "system.memory.linux.shared" +""" +Shared memory used (mostly by tmpfs) +Instrument: updowncounter +Unit: By +Note: Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or +`Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)". +""" + + +def create_system_memory_linux_shared(meter: Meter) -> UpDownCounter: + """Shared memory used (mostly by tmpfs)""" + return meter.create_up_down_counter( + name=SYSTEM_MEMORY_LINUX_SHARED, + description="Shared memory used (mostly by tmpfs).", + unit="By", + ) + + SYSTEM_MEMORY_LINUX_SLAB_USAGE: Final = "system.memory.linux.slab.usage" """ Reports the memory used by the Linux kernel for managing caches of frequently used objects @@ -390,19 +409,15 @@ def create_system_memory_linux_slab_usage(meter: Meter) -> UpDownCounter: SYSTEM_MEMORY_SHARED: Final = "system.memory.shared" """ -Shared memory used (mostly by tmpfs) -Instrument: updowncounter -Unit: By -Note: Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or -`Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)". +Deprecated: Replaced by `system.memory.linux.shared`. """ def create_system_memory_shared(meter: Meter) -> UpDownCounter: - """Shared memory used (mostly by tmpfs)""" + """Deprecated, use `system.memory.linux.shared` instead""" return meter.create_up_down_counter( name=SYSTEM_MEMORY_SHARED, - description="Shared memory used (mostly by tmpfs).", + description="Deprecated, use `system.memory.linux.shared` instead.", unit="By", ) diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/db_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/db_attributes.py index 25dd0f4a62..2653f54ade 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/db_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/db_attributes.py @@ -74,6 +74,11 @@ that support query parsing SHOULD generate a summary following [Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query) 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 `BATCH `, +otherwise `db.query.summary` SHOULD be `BATCH` or some other database +system specific term if more applicable. """ DB_QUERY_TEXT: Final = "db.query.text" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/exception_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/exception_attributes.py index 7f396abe3b..1c4374e70e 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/exception_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/exception_attributes.py @@ -22,6 +22,9 @@ EXCEPTION_MESSAGE: Final = "exception.message" """ The exception message. +Note: > [!WARNING] +> +> This attribute may contain sensitive information. """ EXCEPTION_STACKTRACE: Final = "exception.stacktrace" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/http_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/http_attributes.py index 8f7e7158c5..4d688aa2a2 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/http_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/http_attributes.py @@ -48,8 +48,15 @@ If the HTTP instrumentation could end up converting valid HTTP request methods to `_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). +OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods. + +![Development](https://img.shields.io/badge/-development-blue) +If this override is done via declarative configuration, then the list MUST be configurable via the `known_methods` property +(an array of case-sensitive strings with minimum items 0) under `.instrumentation/development.general.http.client` and/or +`.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 `http.request.method` attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/service_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/service_attributes.py index f703d2bb63..e8b5da8dc1 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/service_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/service_attributes.py @@ -14,12 +14,49 @@ from typing import Final +SERVICE_INSTANCE_ID: Final = "service.instance.id" +""" +The string ID of the service instance. +Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words +`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](https://www.ietf.org/rfc/rfc4122.txt) 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: `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 +[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) 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 `service.instance.id` if it can't unambiguously determine the +service instance that is generating that telemetry. For instance, creating an UUID based on `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 `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. +""" + SERVICE_NAME: Final = "service.name" """ Logical name of the service. Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. """ +SERVICE_NAMESPACE: Final = "service.namespace" +""" +A namespace for `service.name`. +Note: 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. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `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. +""" + SERVICE_VERSION: Final = "service.version" """ The version string of the service component. The format is not defined by these conventions. diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/url_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/url_attributes.py index 404eef1b42..0d8d9cbb92 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/url_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/attributes/url_attributes.py @@ -43,6 +43,16 @@ This list is subject to change over time. +Matching of query parameter keys against the sensitive list SHOULD be case-sensitive. + +![Development](https://img.shields.io/badge/-development-blue) +Instrumentation MAY provide a way to override this list via declarative configuration. +If so, it SHOULD use the `sensitive_query_parameters` property +(an array of case-sensitive strings with minimum items 0) under +`.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. `https://www.example.com/path?color=blue&sig=REDACTED`. """ @@ -68,6 +78,15 @@ 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 `sensitive_query_parameters` property +(an array of case-sensitive strings with minimum items 0) under +`.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. `q=OpenTelemetry&sig=REDACTED`. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/schemas.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/schemas.py index 590d7492e8..edfb939fd3 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/schemas.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/schemas.py @@ -92,7 +92,12 @@ class Schemas(Enum): V1_39_0 = "https://opentelemetry.io/schemas/1.39.0" """ - The URL of the OpenTelemetry schema version 1.38.0. + The URL of the OpenTelemetry schema version 1.39.0. + """ + + V1_40_0 = "https://opentelemetry.io/schemas/1.40.0" + """ + The URL of the OpenTelemetry schema version 1.40.0. """ # when generating new semantic conventions, diff --git a/scripts/semconv/generate.sh b/scripts/semconv/generate.sh index 764fdfc3f1..841f7cd488 100755 --- a/scripts/semconv/generate.sh +++ b/scripts/semconv/generate.sh @@ -5,9 +5,9 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="${SCRIPT_DIR}/../.." # freeze the spec version to make SemanticAttributes generation reproducible -SEMCONV_VERSION=1.39.0 +SEMCONV_VERSION=1.40.0 SEMCONV_VERSION_TAG=v$SEMCONV_VERSION -OTEL_WEAVER_IMG_VERSION=v0.18.0 +OTEL_WEAVER_IMG_VERSION=v0.21.2 INCUBATING_DIR=_incubating cd ${SCRIPT_DIR}