diff --git a/semantic_conventions/Rakefile b/semantic_conventions/Rakefile index beed71b83..a133f3472 100644 --- a/semantic_conventions/Rakefile +++ b/semantic_conventions/Rakefile @@ -50,7 +50,7 @@ task default: default_tasks desc 'update semantic conventions' task generate: %i[update_spec_version_constant generate_require_rollups] -SPEC_VERSION = '1.38.0' +SPEC_VERSION = '1.41.1' OTEL_WEAVER_VERSION = 'v0.22.1' semconv_source_dir = Pathname.new('./tmp/semconvrepo') semconv_output_dir = Pathname.new('./lib/opentelemetry/semconv') diff --git a/semantic_conventions/lib/opentelemetry/semantic_conventions/version.rb b/semantic_conventions/lib/opentelemetry/semantic_conventions/version.rb index 1677c1310..c5c43fd55 100644 --- a/semantic_conventions/lib/opentelemetry/semantic_conventions/version.rb +++ b/semantic_conventions/lib/opentelemetry/semantic_conventions/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module SemanticConventions # Version of the OpenTelemetry Semantic Conventions from which this library was generated. - SPEC_VERSION = '1.38.0' + SPEC_VERSION = '1.41.1' # Release version of this gem. May not match SPEC_VERSION until gem is released after a spec update. VERSION = '1.37.1' end diff --git a/semantic_conventions/lib/opentelemetry/semconv/db/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/db/attributes.rb index 5ced2d3c7..96fb1e779 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/db/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/db/attributes.rb @@ -83,15 +83,20 @@ module DB # Summary may be available to the instrumentation through # instrumentation hooks or other means. If it is not available, instrumentations # that support query parsing SHOULD generate a summary following - # [Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query) + # [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. + # # @note Stability Level: stable DB_QUERY_SUMMARY = 'db.query.summary' # The database query being executed. # - # For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext). + # For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext). # For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. # Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. # diff --git a/semantic_conventions/lib/opentelemetry/semconv/deployment.rb b/semantic_conventions/lib/opentelemetry/semconv/deployment.rb new file mode 100644 index 000000000..e7f397711 --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/deployment.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 + +# This file was autogenerated. Do not edit it by hand. + +require_relative 'deployment/attributes' diff --git a/semantic_conventions/lib/opentelemetry/semconv/deployment/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/deployment/attributes.rb new file mode 100644 index 000000000..abdbfbea9 --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/deployment/attributes.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This file was autogenerated. Do not edit it by hand. + +module OpenTelemetry + module SemConv + module DEPLOYMENT + # @!group Attribute Names + + # Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). + # + # `deployment.environment.name` does not affect the uniqueness constraints defined through + # the `service.namespace`, `service.name` and `service.instance.id` resource attributes. + # This implies that resources carrying the following attribute combinations MUST be + # considered to be identifying the same service: + # + # - `service.name=frontend`, `deployment.environment.name=production` + # - `service.name=frontend`, `deployment.environment.name=staging`. + # + # @note Stability Level: stable + DEPLOYMENT_ENVIRONMENT_NAME = 'deployment.environment.name' + + # @!endgroup + end + end +end diff --git a/semantic_conventions/lib/opentelemetry/semconv/error/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/error/attributes.rb index 53c1069ff..965fddc89 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/error/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/error/attributes.rb @@ -30,6 +30,12 @@ module ERROR # When `error.type` is set to a type (e.g., an exception type), its # canonical class name identifying the type within the artifact SHOULD be used. # + # If the recorded error type is a wrapper that is not meaningful for + # failure classification, instrumentation MAY use the type of the inner + # error instead. For example, in Go, errors created with `fmt.Errorf` + # using `%w` MAY be unwrapped when the wrapper type does not help + # classify the failure. + # # Instrumentations SHOULD document the list of errors they report. # # The cardinality of `error.type` within one instrumentation library SHOULD be low. @@ -39,7 +45,7 @@ module ERROR # # If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`. # - # If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), + # If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes), # it's RECOMMENDED to: # # - Use a domain-specific attribute diff --git a/semantic_conventions/lib/opentelemetry/semconv/exception/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/exception/attributes.rb index c01747c33..f1e14d14c 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/exception/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/exception/attributes.rb @@ -31,6 +31,8 @@ module EXCEPTION # The exception message. # + # > [!WARNING]> This attribute may contain sensitive information. + # # @note Stability Level: stable EXCEPTION_MESSAGE = 'exception.message' @@ -41,6 +43,12 @@ module EXCEPTION # The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. # + # If the recorded exception type is a wrapper that is not meaningful for + # failure classification, instrumentation MAY use the type of the inner + # exception instead. For example, in Go, errors created with `fmt.Errorf` + # using `%w` MAY be unwrapped when the wrapper type does not help + # classify the failure. + # # @note Stability Level: stable EXCEPTION_TYPE = 'exception.type' diff --git a/semantic_conventions/lib/opentelemetry/semconv/http/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/http/attributes.rb index 1ec863f7b..cfad1ecda 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/http/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/http/attributes.rb @@ -62,8 +62,15 @@ module HTTP # # 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. + # + # + # 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/semantic_conventions/lib/opentelemetry/semconv/incubating/aws/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/aws/attributes.rb index 8dfec06a3..a1abdaa06 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/aws/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/aws/attributes.rb @@ -201,7 +201,7 @@ module AWS # @note Stability Level: development AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn' - # The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping. + # The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping. # # @note Stability Level: development AWS_LAMBDA_RESOURCE_MAPPING_ID = 'aws.lambda.resource_mapping.id' @@ -313,7 +313,7 @@ module AWS # @note Stability Level: development AWS_S3_UPLOAD_ID = 'aws.s3.upload_id' - # The ARN of the Secret stored in the Secrets Mangger + # The ARN of the Secret stored in the Secrets Manager # # @note Stability Level: development AWS_SECRETSMANAGER_SECRET_ARN = 'aws.secretsmanager.secret.arn' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/cicd/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/cicd/attributes.rb index 70f1f5af3..fb7134808 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/cicd/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/cicd/attributes.rb @@ -61,6 +61,8 @@ module CICD # The unique identifier of a task run within a pipeline. # + # For a given pipeline run and task, the `cicd.pipeline.task.run.id` MUST be unique within that run. For the same task across different runs of the same pipeline, the `cicd.pipeline.task.run.id` MAY remain the same, enabling correlation of `cicd.pipeline.task.run.result` values across multiple pipeline runs. + # # @note Stability Level: development CICD_PIPELINE_TASK_RUN_ID = 'cicd.pipeline.task.run.id' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/container/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/container/attributes.rb index 3303f8e1d..5e65aa4e4 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/container/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/container/attributes.rb @@ -63,12 +63,12 @@ module CONTAINER # Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. # - # @note Stability Level: development + # @note Stability Level: release_candidate CONTAINER_ID = 'container.id' # Runtime specific image identifier. Usually a hash algorithm followed by a UUID. # - # Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerInspect) endpoint. + # Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect) endpoint. # K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. # The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. # @@ -77,19 +77,19 @@ module CONTAINER # Name of the image the container was built on. # - # @note Stability Level: development + # @note Stability Level: release_candidate CONTAINER_IMAGE_NAME = 'container.image.name' # Repo digests of the container image as provided by the container runtime. # - # [Docker](https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. + # [Docker](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. # - # @note Stability Level: development + # @note Stability Level: release_candidate CONTAINER_IMAGE_REPO_DIGESTS = 'container.image.repo_digests' - # Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. + # Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. # - # @note Stability Level: development + # @note Stability Level: release_candidate CONTAINER_IMAGE_TAGS = 'container.image.tags' # Must be called with a key for the full attribute name. See notes below about the expectations @@ -128,7 +128,7 @@ module CONTAINER # @deprecated Replaced by `container.runtime.name`. CONTAINER_RUNTIME = 'container.runtime' - # A description about the runtime which could include, for example details about the CRI/API version being used or other customisations. + # A description about the runtime which could include, for example details about the CRI/API version being used or other customizations. # # @note Stability Level: development CONTAINER_RUNTIME_DESCRIPTION = 'container.runtime.description' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/db/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/db/attributes.rb index af3022c26..7dd5043fd 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/db/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/db/attributes.rb @@ -328,9 +328,14 @@ module DB # Summary may be available to the instrumentation through # instrumentation hooks or other means. If it is not available, instrumentations # that support query parsing SHOULD generate a summary following - # [Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query) + # [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. + # # @note Stability Level: stable # # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::DB::DB_QUERY_SUMMARY}. @@ -338,7 +343,7 @@ module DB # The database query being executed. # - # For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext). + # For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext). # For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. # Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. # diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/deployment/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/deployment/attributes.rb index e4cc29a44..2730930e9 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/deployment/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/deployment/attributes.rb @@ -40,7 +40,9 @@ module DEPLOYMENT # - `service.name=frontend`, `deployment.environment.name=production` # - `service.name=frontend`, `deployment.environment.name=staging`. # - # @note Stability Level: development + # @note Stability Level: stable + # + # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::DEPLOYMENT::DEPLOYMENT_ENVIRONMENT_NAME}. DEPLOYMENT_ENVIRONMENT_NAME = 'deployment.environment.name' # The id of the deployment. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/error/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/error/attributes.rb index 18b6a97a4..66b388cce 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/error/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/error/attributes.rb @@ -33,6 +33,7 @@ module ERROR # `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status. # # @note Stability Level: development + # @deprecated Use domain-specific error message attribute. For example, use `feature_flag.error.message` for feature flag errors. ERROR_MESSAGE = 'error.message' # Describes a class of error the operation ended with. @@ -42,6 +43,12 @@ module ERROR # When `error.type` is set to a type (e.g., an exception type), its # canonical class name identifying the type within the artifact SHOULD be used. # + # If the recorded error type is a wrapper that is not meaningful for + # failure classification, instrumentation MAY use the type of the inner + # error instead. For example, in Go, errors created with `fmt.Errorf` + # using `%w` MAY be unwrapped when the wrapper type does not help + # classify the failure. + # # Instrumentations SHOULD document the list of errors they report. # # The cardinality of `error.type` within one instrumentation library SHOULD be low. @@ -51,7 +58,7 @@ module ERROR # # If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`. # - # If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), + # If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes), # it's RECOMMENDED to: # # - Use a domain-specific attribute diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/exception/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/exception/attributes.rb index 27bdd1a5f..b3d62bdbf 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/exception/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/exception/attributes.rb @@ -32,6 +32,8 @@ module EXCEPTION # The exception message. # + # > [!WARNING]> This attribute may contain sensitive information. + # # @note Stability Level: stable # # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::EXCEPTION::EXCEPTION_MESSAGE}. @@ -46,6 +48,12 @@ module EXCEPTION # The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. # + # If the recorded exception type is a wrapper that is not meaningful for + # failure classification, instrumentation MAY use the type of the inner + # exception instead. For example, in Go, errors created with `fmt.Errorf` + # using `%w` MAY be unwrapped when the wrapper type does not help + # classify the failure. + # # @note Stability Level: stable # # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::EXCEPTION::EXCEPTION_TYPE}. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/feature_flag/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/feature_flag/attributes.rb index 120d91d6b..e262d965c 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/feature_flag/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/feature_flag/attributes.rb @@ -29,10 +29,15 @@ module FEATURE_FLAG # @note Stability Level: release_candidate FEATURE_FLAG_CONTEXT_ID = 'feature_flag.context.id' - # Deprecated, use `error.message` instead. + # A message providing more detail about an error that occurred during feature flag evaluation in human-readable form. + # + # @note Stability Level: release_candidate + FEATURE_FLAG_ERROR_MESSAGE = 'feature_flag.error.message' + + # Deprecated, use `feature_flag.error.message` instead. # # @note Stability Level: development - # @deprecated Replaced by `error.message`. + # @deprecated Replaced by `feature_flag.error.message`. FEATURE_FLAG_EVALUATION_ERROR_MESSAGE = 'feature_flag.evaluation.error.message' # Deprecated, use `feature_flag.result.reason` instead. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/gcp/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/gcp/attributes.rb index 551ba4c9d..ba1c83d2c 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/gcp/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/gcp/attributes.rb @@ -149,6 +149,21 @@ module GCP # @note Stability Level: development GCP_GCE_INSTANCE_NAME = 'gcp.gce.instance.name' + # The name of the Instance Group Manager (IGM) that manages this VM, if any. + # + # @note Stability Level: development + GCP_GCE_INSTANCE_GROUP_MANAGER_NAME = 'gcp.gce.instance_group_manager.name' + + # The region of a **regional** Instance Group Manager (e.g., `us-central1`). Set this **only** when the IGM is regional. + # + # @note Stability Level: development + GCP_GCE_INSTANCE_GROUP_MANAGER_REGION = 'gcp.gce.instance_group_manager.region' + + # The zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this **only** when the IGM is zonal. + # + # @note Stability Level: development + GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE = 'gcp.gce.instance_group_manager.zone' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/attributes.rb index c7cab8abd..f677430b5 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/attributes.rb @@ -39,6 +39,11 @@ module GEN_AI # @note Stability Level: development GEN_AI_AGENT_NAME = 'gen_ai.agent.name' + # The version of the GenAI agent. + # + # @note Stability Level: development + GEN_AI_AGENT_VERSION = 'gen_ai.agent.version' + # Deprecated, use Event API to report completions contents. # # @note Stability Level: development @@ -181,6 +186,11 @@ module GEN_AI # @deprecated Removed, no replacement at this time. GEN_AI_PROMPT = 'gen_ai.prompt' + # The name of the prompt that uniquely identifies it. + # + # @note Stability Level: development + GEN_AI_PROMPT_NAME = 'gen_ai.prompt.name' + # The Generative AI provider as identified by the client or server instrumentation. # # The attribute SHOULD be set based on the instrumentation's best @@ -247,6 +257,11 @@ module GEN_AI # @note Stability Level: development GEN_AI_REQUEST_STOP_SEQUENCES = 'gen_ai.request.stop_sequences' + # Indicates whether the GenAI request was made in streaming mode. + # + # @note Stability Level: development + GEN_AI_REQUEST_STREAM = 'gen_ai.request.stream' + # The temperature setting for the GenAI request. # # @note Stability Level: development @@ -277,6 +292,32 @@ module GEN_AI # @note Stability Level: development GEN_AI_RESPONSE_MODEL = 'gen_ai.response.model' + # Time to first chunk in a streaming response, measured from request issuance, in seconds. The value is measured from when the client issues the generation request to when the first chunk is received in the response stream. + # + # @note Stability Level: development + GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = 'gen_ai.response.time_to_first_chunk' + + # The documents retrieved. + # + # 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 + # + # @note Stability Level: development + GEN_AI_RETRIEVAL_DOCUMENTS = 'gen_ai.retrieval.documents' + + # The query text used for retrieval. + # + # > [!Warning] + # > This attribute may contain sensitive information. + # + # @note Stability Level: development + GEN_AI_RETRIEVAL_QUERY_TEXT = 'gen_ai.retrieval.query.text' + # Deprecated, use `gen_ai.provider.name` instead. # # @note Stability Level: development @@ -343,17 +384,17 @@ module GEN_AI # @note Stability Level: development GEN_AI_TOOL_CALL_RESULT = 'gen_ai.tool.call.result' - # The list of source system tool definitions available to the GenAI agent or model. + # The list of tool definitions available to the GenAI agent or model. # - # The value of this attribute matches source system tool definition format. + # Instrumentations MUST follow [Tool Definitions JSON Schema](/docs/gen-ai/gen-ai-tool-definitions.json). # - # It's expected to be an array of objects where each object represents a tool definition. In case a serialized string is available - # to the instrumentation, the instrumentation SHOULD do the best effort to - # deserialize it to an array. 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. + # 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. # # Since this attribute could be large, it's NOT RECOMMENDED to populate - # it by default. Instrumentations MAY provide a way to enable - # populating this attribute. + # non-required properties by default. Instrumentations MAY provide a way + # to enable populating optional properties. # # @note Stability Level: development GEN_AI_TOOL_DEFINITIONS = 'gen_ai.tool.definitions' @@ -379,6 +420,20 @@ module GEN_AI # @note Stability Level: development GEN_AI_TOOL_TYPE = 'gen_ai.tool.type' + # The number of input tokens written to a provider-managed cache. + # + # The value SHOULD be included in `gen_ai.usage.input_tokens`. + # + # @note Stability Level: development + GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS = 'gen_ai.usage.cache_creation.input_tokens' + + # The number of input tokens served from a provider-managed cache. + # + # The value SHOULD be included in `gen_ai.usage.input_tokens`. + # + # @note Stability Level: development + GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS = 'gen_ai.usage.cache_read.input_tokens' + # Deprecated, use `gen_ai.usage.output_tokens` instead. # # @note Stability Level: development @@ -387,6 +442,11 @@ module GEN_AI # The number of tokens used in the GenAI input (prompt). # + # 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. + # # @note Stability Level: development GEN_AI_USAGE_INPUT_TOKENS = 'gen_ai.usage.input_tokens' @@ -401,6 +461,20 @@ module GEN_AI # @deprecated Replaced by `gen_ai.usage.input_tokens`. GEN_AI_USAGE_PROMPT_TOKENS = 'gen_ai.usage.prompt_tokens' + # The number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking). + # + # The value SHOULD be included in `gen_ai.usage.output_tokens`. + # + # @note Stability Level: development + GEN_AI_USAGE_REASONING_OUTPUT_TOKENS = 'gen_ai.usage.reasoning.output_tokens' + + # Human-readable name of the GenAI workflow provided by the application. + # + # This attribute can be populated in different frameworks eg: name of the first chain in LangChain OR name of the crew in CrewAI. + # + # @note Stability Level: development + GEN_AI_WORKFLOW_NAME = 'gen_ai.workflow.name' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/metrics.rb index 7019e4860..d9706b30a 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/gen_ai/metrics.rb @@ -29,6 +29,20 @@ module GEN_AI # @note Stability Level: development GEN_AI_CLIENT_OPERATION_DURATION = 'gen_ai.client.operation.duration' + # Time per output chunk, recorded for each chunk received after the first one, measured as the time elapsed from the end of the previous chunk to the end of the current chunk. + # + # This metrics SHOULD be reported for streaming calls and SHOULD NOT be reported otherwise. + # + # @note Stability Level: development + GEN_AI_CLIENT_OPERATION_TIME_PER_OUTPUT_CHUNK = 'gen_ai.client.operation.time_per_output_chunk' + + # Time to receive the first chunk, measured from when the client issues the generation request to when the first chunk is received in the response stream. + # + # This metrics SHOULD be reported for streaming calls and SHOULD NOT be reported otherwise. + # + # @note Stability Level: development + GEN_AI_CLIENT_OPERATION_TIME_TO_FIRST_CHUNK = 'gen_ai.client.operation.time_to_first_chunk' + # Number of input and output tokens used. # # @note Stability Level: development diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/go/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/go/attributes.rb index e477e5acc..011d17781 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/go/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/go/attributes.rb @@ -24,6 +24,25 @@ module Incubating module GO # @!group Attribute Names + # The detailed state of the CPU. + # + # Value SHOULD match the specific CPU class reported by the Go runtime under `/cpu/classes/...`. The list of possible values is subject to change with the Go version used. + # + # @note Stability Level: development + GO_CPU_DETAILED_STATE = 'go.cpu.detailed_state' + + # The state of the CPU. + # + # @note Stability Level: development + GO_CPU_STATE = 'go.cpu.state' + + # The detailed type of memory. + # + # Value SHOULD match the specific memory class reported by the Go runtime under `/memory/classes/...`. The list of possible values is subject to change with the Go version used. + # + # @note Stability Level: development + GO_MEMORY_DETAILED_TYPE = 'go.memory.detailed_type' + # The type of memory. # # @note Stability Level: development diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/go/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/go/metrics.rb index a538bd204..c9483ff0a 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/go/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/go/metrics.rb @@ -31,6 +31,13 @@ module GO # @note Stability Level: development GO_CONFIG_GOGC = 'go.config.gogc' + # Estimated CPU time spent by the Go runtime. + # + # Computed from `/cpu/classes/...` metrics. This metric is an overestimate, and not directly comparable to system CPU time measurements. Compare only with other `go.cpu.time` metrics. + # + # @note Stability Level: development + GO_CPU_TIME = 'go.cpu.time' + # Count of live goroutines. # # Computed from `/sched/goroutines:goroutines`. @@ -52,6 +59,13 @@ module GO # @note Stability Level: development GO_MEMORY_ALLOCATIONS = 'go.memory.allocations' + # Number of completed GC cycles. + # + # Computed from `/gc/cycles/total:gc-cycles`. + # + # @note Stability Level: development + GO_MEMORY_GC_CYCLES = 'go.memory.gc.cycles' + # Heap size target for the end of the GC cycle. # # Computed from `/gc/heap/goal:bytes`. @@ -59,6 +73,13 @@ module GO # @note Stability Level: development GO_MEMORY_GC_GOAL = 'go.memory.gc.goal' + # Distribution of individual GC-related stop-the-world pause latencies. This is the time from deciding to stop the world until the world is started again. + # + # Computed from `/sched/pauses/total/gc:seconds`. Bucket boundaries are provided by the runtime, and are subject to change. + # + # @note Stability Level: development + GO_MEMORY_GC_PAUSE_DURATION = 'go.memory.gc.pause.duration' + # Go runtime memory limit configured by the user, if a limit exists. # # Computed from `/gc/gomemlimit:bytes`. This metric is excluded if the limit obtained from the Go runtime is math.MaxInt64. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/graphql/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/graphql/attributes.rb index 02a87bb23..3a0a9b4da 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/graphql/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/graphql/attributes.rb @@ -26,7 +26,7 @@ module GRAPHQL # The GraphQL document being executed. # - # The value may be sanitized to exclude sensitive information. + # If instrumentation can reliably identify and redact sensitive information it SHOULD do it. # # @note Stability Level: development GRAPHQL_DOCUMENT = 'graphql.document' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/http/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/http/attributes.rb index 56782ffe3..99d6f3f86 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/http/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/http/attributes.rb @@ -99,8 +99,15 @@ module HTTP # # 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. + # + # + # 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/semantic_conventions/lib/opentelemetry/semconv/incubating/hw/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/hw/attributes.rb index b9875beba..79dda54bf 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/hw/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/hw/attributes.rb @@ -24,7 +24,7 @@ module Incubating module HW # @!group Attribute Names - # Design capacity in Watts-hours or Amper-hours + # Design capacity in Watts-hours or Ampere-hours # # @note Stability Level: development HW_BATTERY_CAPACITY = 'hw.battery.capacity' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/jsonrpc.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/jsonrpc.rb new file mode 100644 index 000000000..4ee0a5afc --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/jsonrpc.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 + +# This file was autogenerated. Do not edit it by hand. + +require_relative 'jsonrpc/attributes' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/jsonrpc/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/jsonrpc/attributes.rb new file mode 100644 index 000000000..b3c50a427 --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/jsonrpc/attributes.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This file was autogenerated. Do not edit it by hand. + +module OpenTelemetry + module SemConv + module Incubating + module JSONRPC + # @!group Attribute Names + + # Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. + # + # @note Stability Level: development + JSONRPC_PROTOCOL_VERSION = 'jsonrpc.protocol.version' + + # A string representation of the `id` property of the request and its corresponding response. + # + # Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged. + # Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or omitted. + # + # @note Stability Level: development + JSONRPC_REQUEST_ID = 'jsonrpc.request.id' + + # @!endgroup + end + end + end +end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/jvm/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/jvm/metrics.rb index 388c4eb44..f194b6a62 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/jvm/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/jvm/metrics.rb @@ -94,6 +94,11 @@ module JVM # @note Stability Level: development JVM_FILE_DESCRIPTOR_COUNT = 'jvm.file_descriptor.count' + # Measure of max open file descriptors as reported by the JVM. + # + # @note Stability Level: development + JVM_FILE_DESCRIPTOR_LIMIT = 'jvm.file_descriptor.limit' + # Duration of JVM garbage collection actions. # # @note Stability Level: stable diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/attributes.rb index b14609979..992862ed5 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/attributes.rb @@ -26,7 +26,7 @@ module K8S # The name of the cluster. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CLUSTER_NAME = 'k8s.cluster.name' # A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. @@ -54,17 +54,17 @@ module K8S # Therefore, UIDs between clusters should be extremely unlikely to # conflict. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CLUSTER_UID = 'k8s.cluster.uid' # The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CONTAINER_NAME = 'k8s.container.name' # Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CONTAINER_RESTART_COUNT = 'k8s.container.restart_count' # Last terminated reason of the Container. @@ -97,7 +97,7 @@ module K8S # - An annotation `data` with empty string value SHOULD be recorded as # the `k8s.cronjob.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CRONJOB_ANNOTATION_LAMBDA = ->(key) { "k8s.cronjob.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -115,17 +115,17 @@ module K8S # - A label `automated` with empty string value SHOULD be recorded as # the `k8s.cronjob.label.automated` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CRONJOB_LABEL_LAMBDA = ->(key) { "k8s.cronjob.label.#{key}" } # The name of the CronJob. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CRONJOB_NAME = 'k8s.cronjob.name' # The UID of the CronJob. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_CRONJOB_UID = 'k8s.cronjob.uid' # Must be called with a key for the full attribute name. See notes below about the expectations @@ -143,7 +143,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.daemonset.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DAEMONSET_ANNOTATION_LAMBDA = ->(key) { "k8s.daemonset.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -161,17 +161,17 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.daemonset.label.injected` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DAEMONSET_LABEL_LAMBDA = ->(key) { "k8s.daemonset.label.#{key}" } # The name of the DaemonSet. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DAEMONSET_NAME = 'k8s.daemonset.name' # The UID of the DaemonSet. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DAEMONSET_UID = 'k8s.daemonset.uid' # Must be called with a key for the full attribute name. See notes below about the expectations @@ -189,7 +189,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.deployment.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DEPLOYMENT_ANNOTATION_LAMBDA = ->(key) { "k8s.deployment.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -207,17 +207,17 @@ module K8S # - A label `injected` with empty string value SHOULD be recorded as # the `k8s.deployment.label.injected` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DEPLOYMENT_LABEL_LAMBDA = ->(key) { "k8s.deployment.label.#{key}" } # The name of the Deployment. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DEPLOYMENT_NAME = 'k8s.deployment.name' # The UID of the Deployment. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_DEPLOYMENT_UID = 'k8s.deployment.uid' # The type of metric source for the horizontal pod autoscaler. @@ -278,7 +278,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.job.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_JOB_ANNOTATION_LAMBDA = ->(key) { "k8s.job.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -296,17 +296,17 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.job.label.automated` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_JOB_LABEL_LAMBDA = ->(key) { "k8s.job.label.#{key}" } # The name of the Job. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_JOB_NAME = 'k8s.job.name' # The UID of the Job. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_JOB_UID = 'k8s.job.uid' # Must be called with a key for the full attribute name. See notes below about the expectations @@ -324,7 +324,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.namespace.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_NAMESPACE_ANNOTATION_LAMBDA = ->(key) { "k8s.namespace.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -342,12 +342,12 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.namespace.label.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_NAMESPACE_LABEL_LAMBDA = ->(key) { "k8s.namespace.label.#{key}" } # The name of the namespace that the pod is running in. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_NAMESPACE_NAME = 'k8s.namespace.name' # The phase of the K8s namespace. @@ -373,7 +373,7 @@ module K8S # - An annotation `data` with empty string value SHOULD be recorded as # the `k8s.node.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_NODE_ANNOTATION_LAMBDA = ->(key) { "k8s.node.annotation.#{key}" } # The status of the condition, one of True, False, Unknown. @@ -414,19 +414,140 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.node.label.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_NODE_LABEL_LAMBDA = ->(key) { "k8s.node.label.#{key}" } # The name of the Node. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_NODE_NAME = 'k8s.node.name' - # The UID of the Node. + # The name of the system container running on the K8s Node. # # @note Stability Level: development + K8S_NODE_SYSTEM_CONTAINER_NAME = 'k8s.node.system_container.name' + + # The UID of the Node. + # + # @note Stability Level: release_candidate K8S_NODE_UID = 'k8s.node.uid' + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_PERSISTENTVOLUME_ANNOTATION_LAMBDA.call('some-cool-key') #=> 'k8s.persistentvolume.annotation.some-cool-key' + # + # The annotation placed on the PersistentVolume, the `` being the annotation name, the value being the annotation value, even if the value is empty. + # + # Examples: + # + # - An annotation `pv.kubernetes.io/provisioned-by` with value `kubernetes.io/aws-ebs` SHOULD be recorded as + # the `k8s.persistentvolume.annotation.pv.kubernetes.io/provisioned-by` attribute with value `"kubernetes.io/aws-ebs"`. + # - An annotation `data` with empty string value SHOULD be recorded as + # the `k8s.persistentvolume.annotation.data` attribute with value `""`. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_ANNOTATION_LAMBDA = ->(key) { "k8s.persistentvolume.annotation.#{key}" } + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_PERSISTENTVOLUME_LABEL_LAMBDA.call('some-cool-key') #=> 'k8s.persistentvolume.label.some-cool-key' + # + # The label placed on the PersistentVolume, the `` being the label name, the value being the label value, even if the value is empty. + # + # Examples: + # + # - A label `type` with value `ssd` SHOULD be recorded as + # the `k8s.persistentvolume.label.type` attribute with value `"ssd"`. + # - A label `data` with empty string value SHOULD be recorded as + # the `k8s.persistentvolume.label.data` attribute with value `""`. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_LABEL_LAMBDA = ->(key) { "k8s.persistentvolume.label.#{key}" } + + # The name of the PersistentVolume. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_NAME = 'k8s.persistentvolume.name' + + # The reclaim policy of the PersistentVolume. + # + # This attribute aligns with the `persistentVolumeReclaimPolicy` field of the + # [K8s PersistentVolumeSpec](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeSpec). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_RECLAIM_POLICY = 'k8s.persistentvolume.reclaim_policy' + + # The phase of the PersistentVolume. + # + # This attribute aligns with the `phase` field of the + # [K8s PersistentVolumeStatus](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeStatus). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_STATUS_PHASE = 'k8s.persistentvolume.status.phase' + + # The UID of the PersistentVolume. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_UID = 'k8s.persistentvolume.uid' + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_PERSISTENTVOLUMECLAIM_ANNOTATION_LAMBDA.call('some-cool-key') #=> 'k8s.persistentvolumeclaim.annotation.some-cool-key' + # + # The annotation placed on the PersistentVolumeClaim, the `` being the annotation name, the value being the annotation value, even if the value is empty. + # + # Examples: + # + # - An annotation `volume.beta.kubernetes.io/storage-provisioner` with value `kubernetes.io/aws-ebs` SHOULD be recorded as + # the `k8s.persistentvolumeclaim.annotation.volume.beta.kubernetes.io/storage-provisioner` attribute with value `"kubernetes.io/aws-ebs"`. + # - An annotation `data` with empty string value SHOULD be recorded as + # the `k8s.persistentvolumeclaim.annotation.data` attribute with value `""`. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_ANNOTATION_LAMBDA = ->(key) { "k8s.persistentvolumeclaim.annotation.#{key}" } + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_PERSISTENTVOLUMECLAIM_LABEL_LAMBDA.call('some-cool-key') #=> 'k8s.persistentvolumeclaim.label.some-cool-key' + # + # The label placed on the PersistentVolumeClaim, the `` being the label name, the value being the label value, even if the value is empty. + # + # Examples: + # + # - A label `app` with value `my-app` SHOULD be recorded as + # the `k8s.persistentvolumeclaim.label.app` attribute with value `"my-app"`. + # - A label `data` with empty string value SHOULD be recorded as + # the `k8s.persistentvolumeclaim.label.data` attribute with value `""`. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_LABEL_LAMBDA = ->(key) { "k8s.persistentvolumeclaim.label.#{key}" } + + # The name of the PersistentVolumeClaim. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_NAME = 'k8s.persistentvolumeclaim.name' + + # The phase of the PersistentVolumeClaim. + # + # This attribute aligns with the `phase` field of the + # [K8s PersistentVolumeClaimStatus](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimStatus). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE = 'k8s.persistentvolumeclaim.status.phase' + + # The UID of the PersistentVolumeClaim. + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_UID = 'k8s.persistentvolumeclaim.uid' + # Must be called with a key for the full attribute name. See notes below about the expectations # for the state of the key. # @@ -444,9 +565,29 @@ module K8S # - An annotation `data` with empty string value SHOULD be recorded as # the `k8s.pod.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_POD_ANNOTATION_LAMBDA = ->(key) { "k8s.pod.annotation.#{key}" } + # Specifies the hostname of the Pod. + # + # The K8s Pod spec has an optional hostname field, which can be used to specify a hostname. + # Refer to [K8s docs](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field) + # for more information about this field. + # + # This attribute aligns with the `hostname` field of the + # [K8s PodSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core). + # + # @note Stability Level: release_candidate + K8S_POD_HOSTNAME = 'k8s.pod.hostname' + + # IP address allocated to the Pod. + # + # This attribute aligns with the `podIP` field of the + # [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core). + # + # @note Stability Level: release_candidate + K8S_POD_IP = 'k8s.pod.ip' + # Must be called with a key for the full attribute name. See notes below about the expectations # for the state of the key. # @@ -464,7 +605,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.pod.label.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_POD_LABEL_LAMBDA = ->(key) { "k8s.pod.label.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -481,9 +622,21 @@ module K8S # The name of the Pod. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_POD_NAME = 'k8s.pod.name' + # The start timestamp of the Pod. + # + # Date and time at which the object was acknowledged by the Kubelet. + # This is before the Kubelet pulled the container image(s) for the pod. + # + # This attribute aligns with the `startTime` field of the + # [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core), + # in ISO 8601 (RFC 3339 compatible) format. + # + # @note Stability Level: release_candidate + K8S_POD_START_TIME = 'k8s.pod.start_time' + # The phase for the pod. Corresponds to the `phase` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) # # @note Stability Level: development @@ -496,7 +649,7 @@ module K8S # The UID of the Pod. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_POD_UID = 'k8s.pod.uid' # Must be called with a key for the full attribute name. See notes below about the expectations @@ -514,7 +667,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.replicaset.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_REPLICASET_ANNOTATION_LAMBDA = ->(key) { "k8s.replicaset.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -532,17 +685,17 @@ module K8S # - A label `injected` with empty string value SHOULD be recorded as # the `k8s.replicaset.label.injected` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_REPLICASET_LABEL_LAMBDA = ->(key) { "k8s.replicaset.label.#{key}" } # The name of the ReplicaSet. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_REPLICASET_NAME = 'k8s.replicaset.name' # The UID of the ReplicaSet. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_REPLICASET_UID = 'k8s.replicaset.uid' # The name of the replication controller. @@ -572,6 +725,138 @@ module K8S # @note Stability Level: development K8S_RESOURCEQUOTA_UID = 'k8s.resourcequota.uid' + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_SERVICE_ANNOTATION_LAMBDA.call('some-cool-key') #=> 'k8s.service.annotation.some-cool-key' + # + # The annotation placed on the Service, the `` being the annotation name, the value being the annotation value, even if the value is empty. + # + # 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 `""`. + # + # @note Stability Level: development + K8S_SERVICE_ANNOTATION_LAMBDA = ->(key) { "k8s.service.annotation.#{key}" } + + # The address type of the service endpoint. + # + # 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). + # + # @note Stability Level: development + K8S_SERVICE_ENDPOINT_ADDRESS_TYPE = 'k8s.service.endpoint.address_type' + + # The condition of the service endpoint. + # + # 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/). + # + # @note Stability Level: development + K8S_SERVICE_ENDPOINT_CONDITION = 'k8s.service.endpoint.condition' + + # The zone of the service endpoint. + # + # 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. + # + # @note Stability Level: development + K8S_SERVICE_ENDPOINT_ZONE = 'k8s.service.endpoint.zone' + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_SERVICE_LABEL_LAMBDA.call('some-cool-key') #=> 'k8s.service.label.some-cool-key' + # + # The label placed on the Service, the `` being the label name, the value being the label value, even if the value is empty. + # + # 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 `""`. + # + # @note Stability Level: development + K8S_SERVICE_LABEL_LAMBDA = ->(key) { "k8s.service.label.#{key}" } + + # The name of the Service. + # + # @note Stability Level: development + K8S_SERVICE_NAME = 'k8s.service.name' + + # Whether the Service publishes not-ready endpoints. + # + # 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). + # + # @note Stability Level: development + K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES = 'k8s.service.publish_not_ready_addresses' + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # K8S_SERVICE_SELECTOR_LAMBDA.call('some-cool-key') #=> 'k8s.service.selector.some-cool-key' + # + # The selector key-value pair placed on the Service, the `` being the selector key, the value being the selector value. + # + # 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"`. + # + # @note Stability Level: development + K8S_SERVICE_SELECTOR_LAMBDA = ->(key) { "k8s.service.selector.#{key}" } + + # The traffic distribution policy for the Service. + # + # 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. + # + # @note Stability Level: development + K8S_SERVICE_TRAFFIC_DISTRIBUTION = 'k8s.service.traffic_distribution' + + # The type of the Kubernetes Service. + # + # This attribute aligns with the `type` field of the + # [K8s ServiceSpec](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec). + # + # @note Stability Level: development + K8S_SERVICE_TYPE = 'k8s.service.type' + + # The UID of the Service. + # + # @note Stability Level: development + K8S_SERVICE_UID = 'k8s.service.uid' + # Must be called with a key for the full attribute name. See notes below about the expectations # for the state of the key. # @@ -587,7 +872,7 @@ module K8S # - A label `data` with empty string value SHOULD be recorded as # the `k8s.statefulset.annotation.data` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_STATEFULSET_ANNOTATION_LAMBDA = ->(key) { "k8s.statefulset.annotation.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -605,17 +890,17 @@ module K8S # - A label `injected` with empty string value SHOULD be recorded as # the `k8s.statefulset.label.injected` attribute with value `""`. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_STATEFULSET_LABEL_LAMBDA = ->(key) { "k8s.statefulset.label.#{key}" } # The name of the StatefulSet. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_STATEFULSET_NAME = 'k8s.statefulset.name' # The UID of the StatefulSet. # - # @note Stability Level: development + # @note Stability Level: release_candidate K8S_STATEFULSET_UID = 'k8s.statefulset.uid' # The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/metrics.rb index 3bcc37630..3420a8e11 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/k8s/metrics.rb @@ -24,31 +24,81 @@ module Incubating module K8S # @!group Metrics Names - # Maximum CPU resource limit set for the container. - # - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + # Deprecated, use `k8s.container.cpu.limit.desired` and `k8s.container.cpu.limit.current` instead. # # @note Stability Level: development + # @deprecated Replaced by `k8s.container.cpu.limit.desired`. K8S_CONTAINER_CPU_LIMIT = 'k8s.container.cpu.limit' - # The ratio of container CPU usage to its CPU limit. + # Maximum CPU resource limit currently configured for a running container. # - # The value range is [0.0,1.0]. A value of 1.0 means the container is using 100% of its CPU limit. If the CPU limit is not set, this metric SHOULD NOT be emitted for that container. + # This metric aligns with the limit in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatus-v1-core) + # (status.containerStatuses[*].resources). Also see `Actual Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. # # @note Stability Level: development - K8S_CONTAINER_CPU_LIMIT_UTILIZATION = 'k8s.container.cpu.limit_utilization' + K8S_CONTAINER_CPU_LIMIT_CURRENT = 'k8s.container.cpu.limit.current' - # CPU resource requested for the container. + # Maximum CPU resource limit as defined by the container spec. # - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + # This metric aligns with the limit in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#container-v1-core) + # (spec.containers[*].resources). Also see `Desired Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. + # + # @note Stability Level: development + K8S_CONTAINER_CPU_LIMIT_DESIRED = 'k8s.container.cpu.limit.desired' + + # The ratio of container CPU usage to its current CPU limit. + # + # The current CPU limit reflects the actual resources applied to the container, as reported by + # [ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatus-v1-core). + # The value range is [0.0,1.0]. A value of 1.0 means the container is using 100% of its actual CPU limit. + # If the CPU limit is not set, this metric SHOULD NOT be emitted for that container. + # + # @note Stability Level: development + K8S_CONTAINER_CPU_LIMIT_UTILIZATION = 'k8s.container.cpu.limit.utilization' + + # Deprecated, use `k8s.container.cpu.request.desired` and `k8s.container.cpu.request.current` instead. # # @note Stability Level: development + # @deprecated Replaced by `k8s.container.cpu.request.desired`. K8S_CONTAINER_CPU_REQUEST = 'k8s.container.cpu.request' - # The ratio of container CPU usage to its CPU request. + # CPU resource requested currently configured for a running container. + # + # This metric aligns with the request in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatus-v1-core) + # (status.containerStatuses[*].resources). Also see `Actual Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. # # @note Stability Level: development - K8S_CONTAINER_CPU_REQUEST_UTILIZATION = 'k8s.container.cpu.request_utilization' + K8S_CONTAINER_CPU_REQUEST_CURRENT = 'k8s.container.cpu.request.current' + + # CPU resource requested as defined by the container spec. + # + # This metric aligns with the request in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#container-v1-core) + # (spec.containers[*].resources). Also see `Desired Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. + # + # @note Stability Level: development + K8S_CONTAINER_CPU_REQUEST_DESIRED = 'k8s.container.cpu.request.desired' + + # The ratio of container CPU usage to its current CPU request. + # + # The current CPU request reflects the request applied to the running container, as reported by + # [ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatus-v1-core). + # The value range is [0.0,1.0]. A value of 1.0 means the container is using 100% of its actual CPU request. + # If the CPU request is not set, this metric SHOULD NOT be emitted for that container. + # + # @note Stability Level: development + K8S_CONTAINER_CPU_REQUEST_UTILIZATION = 'k8s.container.cpu.request.utilization' # Maximum ephemeral storage resource limit set for the container. # @@ -64,20 +114,62 @@ module K8S # @note Stability Level: development K8S_CONTAINER_EPHEMERAL_STORAGE_REQUEST = 'k8s.container.ephemeral_storage.request' - # Maximum memory resource limit set for the container. - # - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + # Deprecated, use `k8s.container.memory.limit.desired` and `k8s.container.memory.limit.current` instead. # # @note Stability Level: development + # @deprecated Replaced by `k8s.container.memory.limit.desired`. K8S_CONTAINER_MEMORY_LIMIT = 'k8s.container.memory.limit' - # Memory resource requested for the container. + # Maximum memory resource limit currently configured for a running container. # - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + # This metric aligns with the limit in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatus-v1-core) + # (status.containerStatuses[*].resources). Also see `Actual Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. # # @note Stability Level: development + K8S_CONTAINER_MEMORY_LIMIT_CURRENT = 'k8s.container.memory.limit.current' + + # Maximum memory resource limit as defined by the container spec. + # + # This metric aligns with the limit in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#container-v1-core) + # (spec.containers[*].resources). Also see `Desired Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. + # + # @note Stability Level: development + K8S_CONTAINER_MEMORY_LIMIT_DESIRED = 'k8s.container.memory.limit.desired' + + # Deprecated, use `k8s.container.memory.request.desired` and `k8s.container.memory.request.current` instead. + # + # @note Stability Level: development + # @deprecated Replaced by `k8s.container.memory.request.desired`. K8S_CONTAINER_MEMORY_REQUEST = 'k8s.container.memory.request' + # Memory resource request currently configured for a running container. + # + # This metric aligns with the request in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatus-v1-core) + # (status.containerStatuses[*].resources). Also see `Actual Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. + # + # @note Stability Level: development + K8S_CONTAINER_MEMORY_REQUEST_CURRENT = 'k8s.container.memory.request.current' + + # Memory resource requested as defined by the container spec. + # + # This metric aligns with the request in the + # [`resources`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#resourcerequirements-v1-core) field of + # [K8s Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#container-v1-core) + # (spec.containers[*].resources). Also see `Desired Resources` in + # [https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) for more details. + # + # @note Stability Level: development + K8S_CONTAINER_MEMORY_REQUEST_DESIRED = 'k8s.container.memory.request.desired' + # Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready). # # This metric SHOULD reflect the value of the `ready` field in the @@ -580,6 +672,34 @@ module K8S # @note Stability Level: development K8S_NODE_POD_ALLOCATABLE = 'k8s.node.pod.allocatable' + # Node's system container CPU time. + # + # This metric is derived from the [CPUStats.UsageCoreNanoSeconds](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L236) field of the [ContainerStats](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L157C6-L157C20) of [Node.SystemContainers](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L40) of the Kubelet's stats API. + # + # @note Stability Level: development + K8S_NODE_SYSTEM_CONTAINER_CPU_TIME = 'k8s.node.system_container.cpu.time' + + # Node's system container CPU usage, measured in cpus. + # + # This metric is derived from the [CPUStats.UsageNanoCores](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L233) field of the [ContainerStats](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L157C6-L157C20) of [Node.SystemContainers](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L40) of the Kubelet's stats API. + # + # @note Stability Level: development + K8S_NODE_SYSTEM_CONTAINER_CPU_USAGE = 'k8s.node.system_container.cpu.usage' + + # Node's system container memory usage. + # + # This metric is derived from the [MemoryStats.UsageBytes](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L252) field of the [ContainerStats](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L157C6-L157C20) of [Node.SystemContainers](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L40) of the Kubelet's stats API. + # + # @note Stability Level: development + K8S_NODE_SYSTEM_CONTAINER_MEMORY_USAGE = 'k8s.node.system_container.memory.usage' + + # The amount of working set memory. + # + # This metric is derived from the [MemoryStats.WorkingSetBytes](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L256) field of the [ContainerStats](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L157C6-L157C20) of [Node.SystemContainers](https://github.com/kubernetes/kubelet/blob/v0.35.2/pkg/apis/stats/v1alpha1/types.go#L40) of the Kubelet's stats API. + # + # @note Stability Level: development + K8S_NODE_SYSTEM_CONTAINER_MEMORY_WORKING_SET = 'k8s.node.system_container.memory.working_set' + # The time the Node has been running. # # Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. @@ -588,6 +708,47 @@ module K8S # @note Stability Level: development K8S_NODE_UPTIME = 'k8s.node.uptime' + # Number of PersistentVolumes in a given phase. + # + # All possible phases should be reported at each interval to avoid gaps in the time series. + # This metric is derived from the `.status.phase` field of the + # [K8s PersistentVolumeStatus](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeStatus). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_STATUS_PHASE = 'k8s.persistentvolume.status.phase' + + # The storage capacity of the PersistentVolume. + # + # This metric is derived from the `.spec.capacity.storage` field of the [K8s PersistentVolumeSpec](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeSpec). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUME_STORAGE_CAPACITY = 'k8s.persistentvolume.storage.capacity' + + # Number of PersistentVolumeClaims in a given phase. + # + # All possible phases should be reported at each interval to avoid gaps in the time series. + # This metric is derived from the `.status.phase` field of the + # [K8s PersistentVolumeClaimStatus](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimStatus). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE = 'k8s.persistentvolumeclaim.status.phase' + + # The actual storage capacity provisioned for the PersistentVolumeClaim. + # + # Only available when the PVC is bound. May differ from the requested capacity due to provisioner rounding. + # This metric is derived from the `.status.capacity.storage` field of the + # [K8s PersistentVolumeClaimStatus](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimStatus). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_STORAGE_CAPACITY = 'k8s.persistentvolumeclaim.storage.capacity' + + # The storage requested by the PersistentVolumeClaim. + # + # This metric is derived from the `.spec.resources.requests.storage` field of the [K8s PersistentVolumeClaimSpec](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimSpec). + # + # @note Stability Level: development + K8S_PERSISTENTVOLUMECLAIM_STORAGE_REQUEST = 'k8s.persistentvolumeclaim.storage.request' + # Total CPU time consumed. # # Total CPU time consumed by the specific Pod on all available CPU cores @@ -1037,6 +1198,49 @@ module K8S # @note Stability Level: development K8S_RESOURCEQUOTA_STORAGE_REQUEST_USED = 'k8s.resourcequota.storage.request.used' + # Number of endpoints for a service by condition and address type. + # + # 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. + # + # @note Stability Level: development + K8S_SERVICE_ENDPOINT_COUNT = 'k8s.service.endpoint.count' + + # Number of load balancer ingress points (external IPs/hostnames) assigned to the service. + # + # 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. + # + # @note Stability Level: development + K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT = 'k8s.service.load_balancer.ingress.count' + # Deprecated, use `k8s.statefulset.pod.current` instead. # # This metric aligns with the `currentReplicas` field of the diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/linux/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/linux/attributes.rb index 1ab43f5ad..f40290e8f 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/linux/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/linux/attributes.rb @@ -27,6 +27,7 @@ module LINUX # The Linux Slab memory state # # @note Stability Level: development + # @deprecated Replaced by `system.memory.linux.slab.state`. LINUX_MEMORY_SLAB_STATE = 'linux.memory.slab.state' # @!endgroup diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp.rb new file mode 100644 index 000000000..92436a4c7 --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 + +# This file was autogenerated. Do not edit it by hand. + +require_relative 'mcp/attributes' +require_relative 'mcp/metrics' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp/attributes.rb new file mode 100644 index 000000000..a95147ca3 --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp/attributes.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This file was autogenerated. Do not edit it by hand. + +module OpenTelemetry + module SemConv + module Incubating + module MCP + # @!group Attribute Names + + # The name of the request or notification method. + # + # @note Stability Level: development + MCP_METHOD_NAME = 'mcp.method.name' + + # The [version](https://modelcontextprotocol.io/specification/versioning) of the Model Context Protocol used. + # + # @note Stability Level: development + MCP_PROTOCOL_VERSION = 'mcp.protocol.version' + + # The value of the resource uri. + # + # This is a URI of the resource provided in the following requests or notifications: `resources/read`, `resources/subscribe`, `resources/unsubscribe`, or `notifications/resources/updated`. + # + # @note Stability Level: development + MCP_RESOURCE_URI = 'mcp.resource.uri' + + # Identifies [MCP session](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management). + # + # @note Stability Level: development + MCP_SESSION_ID = 'mcp.session.id' + + # @!endgroup + end + end + end +end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp/metrics.rb new file mode 100644 index 000000000..e62581674 --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/mcp/metrics.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This file was autogenerated. Do not edit it by hand. + +module OpenTelemetry + module SemConv + module Incubating + module MCP + # @!group Metrics Names + + # The duration of the MCP request or notification as observed on the sender from the time it was sent until the response or ack is received. + # + # @note Stability Level: development + MCP_CLIENT_OPERATION_DURATION = 'mcp.client.operation.duration' + + # The duration of the MCP session as observed on the MCP client. + # + # @note Stability Level: development + MCP_CLIENT_SESSION_DURATION = 'mcp.client.session.duration' + + # MCP request or notification duration as observed on the receiver from the time it was received until the result or ack is sent. + # + # @note Stability Level: development + MCP_SERVER_OPERATION_DURATION = 'mcp.server.operation.duration' + + # The duration of the MCP session as observed on the MCP server. + # + # @note Stability Level: development + MCP_SERVER_SESSION_DURATION = 'mcp.server.session.duration' + + # @!endgroup + end + end + end +end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/message/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/message/attributes.rb index a6e43d35d..10d559c1e 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/message/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/message/attributes.rb @@ -24,28 +24,28 @@ module Incubating module MESSAGE # @!group Attribute Names - # Deprecated, use `rpc.message.compressed_size` instead. + # Deprecated, no replacement at this time. # # @note Stability Level: development - # @deprecated Replaced by `rpc.message.compressed_size`. + # @deprecated Deprecated, no replacement at this time. MESSAGE_COMPRESSED_SIZE = 'message.compressed_size' - # Deprecated, use `rpc.message.id` instead. + # Deprecated, no replacement at this time. # # @note Stability Level: development - # @deprecated Replaced by `rpc.message.id`. + # @deprecated Deprecated, no replacement at this time. MESSAGE_ID = 'message.id' - # Deprecated, use `rpc.message.type` instead. + # Deprecated, no replacement at this time. # # @note Stability Level: development - # @deprecated Replaced by `rpc.message.type`. + # @deprecated Deprecated, no replacement at this time. MESSAGE_TYPE = 'message.type' - # Deprecated, use `rpc.message.uncompressed_size` instead. + # Deprecated, no replacement at this time. # # @note Stability Level: development - # @deprecated Replaced by `rpc.message.uncompressed_size`. + # @deprecated Deprecated, no replacement at this time. MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size' # @!endgroup diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/nodejs/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/nodejs/metrics.rb index 5d84b1ae2..26d876078 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/nodejs/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/nodejs/metrics.rb @@ -26,49 +26,49 @@ module NODEJS # Event loop maximum delay. # - # Value can be retrieved from value `histogram.max` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.max` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_MAX = 'nodejs.eventloop.delay.max' # Event loop mean delay. # - # Value can be retrieved from value `histogram.mean` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.mean` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_MEAN = 'nodejs.eventloop.delay.mean' # Event loop minimum delay. # - # Value can be retrieved from value `histogram.min` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.min` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_MIN = 'nodejs.eventloop.delay.min' # Event loop 50 percentile delay. # - # Value can be retrieved from value `histogram.percentile(50)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.percentile(50)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_P50 = 'nodejs.eventloop.delay.p50' # Event loop 90 percentile delay. # - # Value can be retrieved from value `histogram.percentile(90)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.percentile(90)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_P90 = 'nodejs.eventloop.delay.p90' # Event loop 99 percentile delay. # - # Value can be retrieved from value `histogram.percentile(99)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.percentile(99)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_P99 = 'nodejs.eventloop.delay.p99' # Event loop standard deviation delay. # - # Value can be retrieved from value `histogram.stddev` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) + # Value can be retrieved from value `histogram.stddev` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf-hooksmonitoreventloopdelayoptions) # # @note Stability Level: development NODEJS_EVENTLOOP_DELAY_STDDEV = 'nodejs.eventloop.delay.stddev' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/openai/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/openai/attributes.rb index b9df21a5a..d2ef4a2e6 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/openai/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/openai/attributes.rb @@ -24,6 +24,11 @@ module Incubating module OPENAI # @!group Attribute Names + # The type of OpenAI API being used. + # + # @note Stability Level: development + OPENAI_API_TYPE = 'openai.api.type' + # The service tier requested. May be a specific tier, default, or auto. # # @note Stability Level: development diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle.rb new file mode 100644 index 000000000..91e46566d --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 + +# This file was autogenerated. Do not edit it by hand. + +require_relative 'oracle/attributes' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle/attributes.rb new file mode 100644 index 000000000..f917ab98e --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle/attributes.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This file was autogenerated. Do not edit it by hand. + +module OpenTelemetry + module SemConv + module Incubating + module ORACLE + # @!group Attribute Names + + # The database domain associated with the connection. + # + # 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. + # + # @note Stability Level: development + ORACLE_DB_DOMAIN = 'oracle.db.domain' + + # The instance name associated with the connection in an Oracle Real Application Clusters environment. + # + # 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`. + # + # @note Stability Level: development + ORACLE_DB_INSTANCE_NAME = 'oracle.db.instance.name' + + # The database name associated with the connection. + # + # This attribute SHOULD be set to the value of the parameter `DB_NAME` exposed in `v$parameter`. + # + # @note Stability Level: development + ORACLE_DB_NAME = 'oracle.db.name' + + # The pluggable database (PDB) name associated with the connection. + # + # 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. + # + # @note Stability Level: development + ORACLE_DB_PDB = 'oracle.db.pdb' + + # The service name currently associated with the database connection. + # + # 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. + # + # @note Stability Level: development + ORACLE_DB_SERVICE = 'oracle.db.service' + + # @!endgroup + end + end + end +end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle_cloud.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle_cloud.rb new file mode 100644 index 000000000..99599ca7a --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle_cloud.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 + +# This file was autogenerated. Do not edit it by hand. + +require_relative 'oracle_cloud/attributes' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle_cloud/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle_cloud/attributes.rb new file mode 100644 index 000000000..d04ce97ec --- /dev/null +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/oracle_cloud/attributes.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This file was autogenerated. Do not edit it by hand. + +module OpenTelemetry + module SemConv + module Incubating + module ORACLE_CLOUD + # @!group Attribute Names + + # The OCI realm identifier that indicates the isolated partition in which the tenancy and its resources reside. + # + # See [OCI documentation on realms](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm) + # + # @note Stability Level: development + ORACLE_CLOUD_REALM = 'oracle_cloud.realm' + + # @!endgroup + end + end + end +end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/otel/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/otel/attributes.rb index d07334937..0d3cd9f87 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/otel/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/otel/attributes.rb @@ -51,6 +51,15 @@ module OTEL # @note Stability Level: development OTEL_COMPONENT_TYPE = 'otel.component.type' + # Identifies the class / type of event. + # + # This attribute SHOULD be used by non-OTLP exporters when destination does not support `EventName` or equivalent field. This attribute MAY be used by applications using existing logging libraries so that it can be used to set the `EventName` field by Collector or SDK components. + # + # @note Stability Level: stable + # + # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::OTEL::OTEL_EVENT_NAME}. + OTEL_EVENT_NAME = 'otel.event.name' + # Deprecated. Use the `otel.scope.name` attribute # # @note Stability Level: development diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/peer/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/peer/attributes.rb index 1f985a31b..6a7ea4967 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/peer/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/peer/attributes.rb @@ -32,6 +32,7 @@ module PEER # - A gRPC service `rpc.service="io.opentelemetry.AuthService"` may be hosted in both a gateway, `peer.service="ExternalApiService"` and a backend, `peer.service="AuthService"`. # # @note Stability Level: development + # @deprecated Replaced by `service.peer.name`. PEER_SERVICE = 'peer.service' # @!endgroup diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/pprof/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/pprof/attributes.rb index c08ecd9e4..ef19544f2 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/pprof/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/pprof/attributes.rb @@ -54,6 +54,37 @@ module PPROF # @note Stability Level: development PPROF_PROFILE_COMMENT = 'pprof.profile.comment' + # Documentation link for this profile type. + # + # The URL must be absolute and may be missing if the profile was generated by code that did not supply a link + # + # @note Stability Level: development + PPROF_PROFILE_DOC_URL = 'pprof.profile.doc_url' + + # Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. + # + # @note Stability Level: development + PPROF_PROFILE_DROP_FRAMES = 'pprof.profile.drop_frames' + + # Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. + # + # @note Stability Level: development + PPROF_PROFILE_KEEP_FRAMES = 'pprof.profile.keep_frames' + + # Records the pprof's default_sample_type in the original profile. Not set if the default sample type was missing. + # + # This attribute, if present, MUST be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]). + # + # @note Stability Level: development + PPROF_SCOPE_DEFAULT_SAMPLE_TYPE = 'pprof.scope.default_sample_type' + + # Records the indexes of the sample types in the original profile. + # + # This attribute, if present, MUST be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]). + # + # @note Stability Level: development + PPROF_SCOPE_SAMPLE_TYPE_ORDER = 'pprof.scope.sample_type_order' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/process/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/process/attributes.rb index f5811e0a0..f44559b44 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/process/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/process/attributes.rb @@ -91,7 +91,20 @@ module PROCESS # @note Stability Level: development PROCESS_EXECUTABLE_BUILD_ID_GO = 'process.executable.build_id.go' - # Profiling specific build ID for executables. See the OTel specification for Profiles for more information. + # Deterministic build ID for executables. + # + # GNU and Go build IDs may be stripped or unavailable in some environments + # (e.g., Alpine Linux, Docker images). This attribute provides a deterministic + # build ID computed by hashing the first and last 4096 bytes of the file + # along with its length: + # ``` + # Input ← Concat(File[:4096], File[-4096:], BigEndianUInt64(Len(File))) + # Digest ← SHA256(Input) + # BuildID ← Digest[:16] + # ``` + # + # The result is the first 16 bytes (128 bits) of the SHA256 digest, + # represented as a hex string. # # @note Stability Level: development PROCESS_EXECUTABLE_BUILD_ID_HTLHASH = 'process.executable.build_id.htlhash' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/process/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/process/metrics.rb index ef5edf4b3..84f966505 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/process/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/process/metrics.rb @@ -29,7 +29,7 @@ module PROCESS # @note Stability Level: development PROCESS_CONTEXT_SWITCHES = 'process.context_switches' - # Total CPU seconds broken down by different states. + # Total CPU seconds broken down by different CPU modes. # # @note Stability Level: development PROCESS_CPU_TIME = 'process.cpu.time' @@ -59,9 +59,10 @@ module PROCESS # @note Stability Level: development PROCESS_NETWORK_IO = 'process.network.io' - # Number of file descriptors in use by the process. + # Deprecated, use `process.unix.file_descriptor.count` instead. # # @note Stability Level: development + # @deprecated Replaced by `process.unix.file_descriptor.count`. PROCESS_OPEN_FILE_DESCRIPTOR_COUNT = 'process.open_file_descriptor.count' # Number of page faults the process has made. @@ -74,6 +75,11 @@ module PROCESS # @note Stability Level: development PROCESS_THREAD_COUNT = 'process.thread.count' + # Number of unix file descriptors in use by the process. + # + # @note Stability Level: development + PROCESS_UNIX_FILE_DESCRIPTOR_COUNT = 'process.unix.file_descriptor.count' + # The time the process has been running. # # Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. @@ -82,6 +88,11 @@ module PROCESS # @note Stability Level: development PROCESS_UPTIME = 'process.uptime' + # Number of handles held by the process. + # + # @note Stability Level: development + PROCESS_WINDOWS_HANDLE_COUNT = 'process.windows.handle.count' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/attributes.rb index 6bf0ddc34..83fcafb01 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/attributes.rb @@ -24,9 +24,10 @@ module Incubating module RPC # @!group Attribute Names - # The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. + # Deprecated, use `rpc.response.status_code` attribute instead. # # @note Stability Level: development + # @deprecated Replaced by `rpc.response.status_code`. RPC_CONNECT_RPC_ERROR_CODE = 'rpc.connect_rpc.error_code' # Must be called with a key for the full attribute name. See notes below about the expectations @@ -35,15 +36,10 @@ module RPC # @example Usage # RPC_CONNECT_RPC_REQUEST_METADATA_LAMBDA.call('some-cool-key') #=> 'rpc.connect_rpc.request.metadata.some-cool-key' # - # Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - # - # Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. - # Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - # - # For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as - # the `rpc.connect_rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` + # Deprecated, use `rpc.request.metadata` instead. # # @note Stability Level: development + # @deprecated Replaced by `rpc.request.metadata`. RPC_CONNECT_RPC_REQUEST_METADATA_LAMBDA = ->(key) { "rpc.connect_rpc.request.metadata.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -52,15 +48,10 @@ module RPC # @example Usage # RPC_CONNECT_RPC_RESPONSE_METADATA_LAMBDA.call('some-cool-key') #=> 'rpc.connect_rpc.response.metadata.some-cool-key' # - # Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - # - # Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. - # Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - # - # For example, a property `my-custom-key` with value `"attribute_value"` SHOULD be recorded as - # the `rpc.connect_rpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` + # Deprecated, use `rpc.response.metadata` instead. # # @note Stability Level: development + # @deprecated Replaced by `rpc.response.metadata`. RPC_CONNECT_RPC_RESPONSE_METADATA_LAMBDA = ->(key) { "rpc.connect_rpc.response.metadata.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -69,15 +60,10 @@ module RPC # @example Usage # RPC_GRPC_REQUEST_METADATA_LAMBDA.call('some-cool-key') #=> 'rpc.grpc.request.metadata.some-cool-key' # - # gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - # - # Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. - # Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - # - # For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as - # `rpc.grpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` + # Deprecated, use `rpc.request.metadata` instead. # # @note Stability Level: development + # @deprecated Replaced by `rpc.request.metadata`. RPC_GRPC_REQUEST_METADATA_LAMBDA = ->(key) { "rpc.grpc.request.metadata.#{key}" } # Must be called with a key for the full attribute name. See notes below about the expectations @@ -86,45 +72,46 @@ module RPC # @example Usage # RPC_GRPC_RESPONSE_METADATA_LAMBDA.call('some-cool-key') #=> 'rpc.grpc.response.metadata.some-cool-key' # - # gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - # - # Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. - # Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - # - # For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as - # the `rpc.grpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` + # Deprecated, use `rpc.response.metadata` instead. # # @note Stability Level: development + # @deprecated Replaced by `rpc.response.metadata`. RPC_GRPC_RESPONSE_METADATA_LAMBDA = ->(key) { "rpc.grpc.response.metadata.#{key}" } - # The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + # Deprecated, use string representation on the `rpc.response.status_code` attribute instead. # # @note Stability Level: development + # @deprecated Use string representation of the gRPC status code on the `rpc.response.status_code` attribute. RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code' - # `error.code` property of response if it is an error response. + # Deprecated, use string representation on the `rpc.response.status_code` attribute instead. # # @note Stability Level: development + # @deprecated Use string representation of the error code on the `rpc.response.status_code` attribute. RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code' - # `error.message` property of response if it is an error response. + # Deprecated, use the span status description when reporting JSON-RPC spans. # # @note Stability Level: development + # @deprecated Use the span status description when reporting JSON-RPC spans. RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message' - # `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. + # Deprecated, use `jsonrpc.request.id` instead. # # @note Stability Level: development + # @deprecated Replaced by `jsonrpc.request.id`. RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id' - # Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. + # Deprecated, use `jsonrpc.protocol.version` instead. # # @note Stability Level: development + # @deprecated Replaced by `jsonrpc.protocol.version`. RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version' # Compressed size of the message in bytes. # # @note Stability Level: development + # @deprecated Deprecated, no replacement at this time. RPC_MESSAGE_COMPRESSED_SIZE = 'rpc.message.compressed_size' # MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. @@ -132,33 +119,116 @@ module RPC # This way we guarantee that the values will be consistent between different implementations. # # @note Stability Level: development + # @deprecated Deprecated, no replacement at this time. RPC_MESSAGE_ID = 'rpc.message.id' # Whether this is a received or sent message. # # @note Stability Level: development + # @deprecated Deprecated, no replacement at this time. RPC_MESSAGE_TYPE = 'rpc.message.type' # Uncompressed size of the message in bytes. # # @note Stability Level: development + # @deprecated Deprecated, no replacement at this time. RPC_MESSAGE_UNCOMPRESSED_SIZE = 'rpc.message.uncompressed_size' - # This is the logical name of the method from the RPC interface perspective. + # The fully-qualified logical name of the method from the RPC interface perspective. # - # @note Stability Level: development + # The method name MAY have unbounded cardinality in edge or error cases. + # + # Some RPC frameworks or libraries provide a fixed set of recognized methods + # for client stubs and server implementations. Instrumentations for such + # frameworks MUST set this attribute to the original method name only + # when the method is recognized by the framework or library. + # + # When the method is not recognized, for example, when the server receives + # a request for a method that is not predefined on the server, or when + # instrumentation is not able to reliably detect if the method is predefined, + # the attribute MUST be set to `_OTHER`. In such cases, tracing + # instrumentations MUST also set `rpc.method_original` attribute to + # the original method value. + # + # If the RPC instrumentation could end up converting valid RPC methods to + # `_OTHER`, then it SHOULD provide a way to configure the list of recognized + # RPC methods. + # + # The `rpc.method` can be different from the name of any implementing + # method/function. + # The `code.function.name` attribute may be used to record the fully-qualified + # method actually executing the call on the server side, or the + # RPC client stub method on the client side. + # + # @note Stability Level: release_candidate RPC_METHOD = 'rpc.method' - # The full (logical) name of the service being called, including its package name, if applicable. + # The original name of the method used by the client. + # + # @note Stability Level: release_candidate + RPC_METHOD_ORIGINAL = 'rpc.method_original' + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # RPC_REQUEST_METADATA_LAMBDA.call('some-cool-key') #=> 'rpc.request.metadata.some-cool-key' + # + # RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. + # + # Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. + # Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + # + # For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as + # `rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` # # @note Stability Level: development + RPC_REQUEST_METADATA_LAMBDA = ->(key) { "rpc.request.metadata.#{key}" } + + # Must be called with a key for the full attribute name. See notes below about the expectations + # for the state of the key. + # + # @example Usage + # RPC_RESPONSE_METADATA_LAMBDA.call('some-cool-key') #=> 'rpc.response.metadata.some-cool-key' + # + # RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. + # + # Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. + # Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + # + # For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as + # the `rpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` + # + # @note Stability Level: development + RPC_RESPONSE_METADATA_LAMBDA = ->(key) { "rpc.response.metadata.#{key}" } + + # Status code of the RPC returned by the RPC server or generated by the client + # + # Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. + # Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. + # + # @note Stability Level: release_candidate + RPC_RESPONSE_STATUS_CODE = 'rpc.response.status_code' + + # Deprecated, use fully-qualified `rpc.method` instead. + # + # @note Stability Level: development + # @deprecated Value should be included in `rpc.method` which is expected to be a fully-qualified name. RPC_SERVICE = 'rpc.service' - # A string identifying the remoting system. See below for a list of well-known identifiers. + # Deprecated, use `rpc.system.name` attribute instead. # # @note Stability Level: development + # @deprecated Replaced by `rpc.system.name`. RPC_SYSTEM = 'rpc.system' + # The Remote Procedure Call (RPC) system. + # + # The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC. + # + # @note Stability Level: release_candidate + RPC_SYSTEM_NAME = 'rpc.system.name' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/metrics.rb index 69f4dcf68..797bdb8ef 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/rpc/metrics.rb @@ -24,7 +24,15 @@ module Incubating module RPC # @!group Metrics Names - # Measures the duration of outbound RPC. + # Measures the duration of an outgoing Remote Procedure Call (RPC). + # + # When this metric is reported alongside an RPC client span, the metric value + # SHOULD be the same as the RPC client span duration. + # + # @note Stability Level: release_candidate + RPC_CLIENT_CALL_DURATION = 'rpc.client.call.duration' + + # Deprecated, use `rpc.client.call.duration` instead. Note: the unit also changed from `ms` to `s`. # # While streaming RPCs may record this metric as start-of-batch # to end-of-batch, it's hard to interpret in practice. @@ -32,6 +40,7 @@ module RPC # **Streaming**: N/A. # # @note Stability Level: development + # @deprecated Replaced by `rpc.client.call.duration` with unit `s`. RPC_CLIENT_DURATION = 'rpc.client.duration' # Measures the size of RPC request messages (uncompressed). @@ -39,6 +48,7 @@ module RPC # **Streaming**: Recorded per message in a streaming batch # # @note Stability Level: development + # @deprecated Removed, no replacement at this time. RPC_CLIENT_REQUEST_SIZE = 'rpc.client.request.size' # Measures the number of messages received per RPC. @@ -56,6 +66,7 @@ module RPC # **Streaming**: Recorded per response in a streaming batch # # @note Stability Level: development + # @deprecated Removed, no replacement at this time. RPC_CLIENT_RESPONSE_SIZE = 'rpc.client.response.size' # Measures the number of messages sent per RPC. @@ -68,7 +79,15 @@ module RPC # @deprecated Removed, no replacement at this time. RPC_CLIENT_RESPONSES_PER_RPC = 'rpc.client.responses_per_rpc' - # Measures the duration of inbound RPC. + # Measures the duration of an incoming Remote Procedure Call (RPC). + # + # When this metric is reported alongside an RPC server span, the metric value + # SHOULD be the same as the RPC server span duration. + # + # @note Stability Level: release_candidate + RPC_SERVER_CALL_DURATION = 'rpc.server.call.duration' + + # Deprecated, use `rpc.server.call.duration` instead. Note: the unit also changed from `ms` to `s`. # # While streaming RPCs may record this metric as start-of-batch # to end-of-batch, it's hard to interpret in practice. @@ -76,6 +95,7 @@ module RPC # **Streaming**: N/A. # # @note Stability Level: development + # @deprecated Replaced by `rpc.server.call.duration` with unit `s`. RPC_SERVER_DURATION = 'rpc.server.duration' # Measures the size of RPC request messages (uncompressed). @@ -83,6 +103,7 @@ module RPC # **Streaming**: Recorded per message in a streaming batch # # @note Stability Level: development + # @deprecated Removed, no replacement at this time. RPC_SERVER_REQUEST_SIZE = 'rpc.server.request.size' # Measures the number of messages received per RPC. @@ -100,6 +121,7 @@ module RPC # **Streaming**: Recorded per response in a streaming batch # # @note Stability Level: development + # @deprecated Removed, no replacement at this time. RPC_SERVER_RESPONSE_SIZE = 'rpc.server.response.size' # Measures the number of messages sent per RPC. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/service/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/service/attributes.rb index e0fde6b63..c16bab55f 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/service/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/service/attributes.rb @@ -24,6 +24,13 @@ module Incubating module SERVICE # @!group Attribute Names + # The operational criticality of the service. + # + # 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. + # + # @note Stability Level: development + SERVICE_CRITICALITY = 'service.criticality' + # The string ID of the service instance. # # MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words @@ -53,12 +60,15 @@ module SERVICE # for that telemetry. This is typically the case for scraping receivers, as they know the target address and # port. # - # @note Stability Level: development + # @note Stability Level: stable + # + # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::SERVICE::SERVICE_INSTANCE_ID}. SERVICE_INSTANCE_ID = 'service.instance.id' # Logical name of the service. # - # 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`. + # 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 the process executable name, e.g. `unknown_service:bash`. If the process executable name is not available, the value MUST be set to `unknown_service`. + # The process executable name is the name of the process executable, the same value as described by the [`process.executable.name`](process.md) resource attribute. # # @note Stability Level: stable # @@ -69,10 +79,22 @@ module SERVICE # # 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. # - # @note Stability Level: development + # @note Stability Level: stable + # + # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::SERVICE::SERVICE_NAMESPACE}. SERVICE_NAMESPACE = 'service.namespace' - # The version string of the service API or implementation. The format is not defined by these conventions. + # Logical name of the service on the other side of the connection. SHOULD be equal to the actual [`service.name`](/docs/resource/README.md#service) resource attribute of the remote service if any. + # + # @note Stability Level: development + SERVICE_PEER_NAME = 'service.peer.name' + + # Logical namespace of the service on the other side of the connection. SHOULD be equal to the actual [`service.namespace`](/docs/resource/README.md#service) resource attribute of the remote service if any. + # + # @note Stability Level: development + SERVICE_PEER_NAMESPACE = 'service.peer.namespace' + + # The version string of the service component. The format is not defined by these conventions. # # @note Stability Level: stable # diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/system/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/system/attributes.rb index ce72f7c0a..ab2ab73d0 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/system/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/system/attributes.rb @@ -61,6 +61,16 @@ module SYSTEM # @note Stability Level: development SYSTEM_FILESYSTEM_TYPE = 'system.filesystem.type' + # The Linux HugePages memory state + # + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_HUGEPAGES_STATE = 'system.memory.linux.hugepages.state' + + # The Linux Slab memory state + # + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_SLAB_STATE = 'system.memory.linux.slab.state' + # The memory state # # @note Stability Level: development diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/system/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/system/metrics.rb index 398d5531d..1d48a2360 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/system/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/system/metrics.rb @@ -113,6 +113,23 @@ module SYSTEM # @note Stability Level: development SYSTEM_FILESYSTEM_UTILIZATION = 'system.filesystem.utilization' + # The number of packets transferred. + # + # @note Stability Level: development + # @deprecated Replaced by `system.memory.linux.available`. + SYSTEM_LINUX_MEMORY_AVAILABLE = 'system.linux.memory.available' + + # The number of packets transferred. + # + # @note Stability Level: development + # @deprecated Replaced by `system.memory.linux.slab.usage`. + SYSTEM_LINUX_MEMORY_SLAB_USAGE = 'system.linux.memory.slab.usage' + + # Total virtual memory available in the system. + # + # @note Stability Level: development + SYSTEM_MEMORY_LIMIT = 'system.memory.limit' + # An estimate of how much memory is available for starting new applications, without causing swapping. # # This is an alternative to `system.memory.usage` metric with `state=free`. @@ -122,21 +139,45 @@ module SYSTEM # See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). # # @note Stability Level: development - SYSTEM_LINUX_MEMORY_AVAILABLE = 'system.linux.memory.available' + SYSTEM_MEMORY_LINUX_AVAILABLE = 'system.memory.linux.available' - # Reports the memory used by the Linux kernel for managing caches of frequently used objects. + # Total number of hugepages available. # - # The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. - # Note that the total slab memory is not constant and may vary over time. - # See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_HUGEPAGES_LIMIT = 'system.memory.linux.hugepages.limit' + + # System hugepage size in bytes. # # @note Stability Level: development - SYSTEM_LINUX_MEMORY_SLAB_USAGE = 'system.linux.memory.slab.usage' + SYSTEM_MEMORY_LINUX_HUGEPAGES_PAGE_SIZE = 'system.memory.linux.hugepages.page_size' - # Total virtual memory available in the system. + # Number of reserved hugepages. + # + # Hugepages for which a commitment to allocate has been made, but no allocation has yet been made. + # This is reported as a separate metric rather than a `usage` state because reserved pages are already counted in `free` pages. + # They represent a subset of free pages that cannot be used for non-reserved allocations. # # @note Stability Level: development - SYSTEM_MEMORY_LIMIT = 'system.memory.limit' + SYSTEM_MEMORY_LINUX_HUGEPAGES_RESERVED = 'system.memory.linux.hugepages.reserved' + + # Number of surplus hugepages. + # + # Overcommitted hugepages beyond the persistent pool. + # This is reported as a separate metric rather than a `usage` state because surplus pages can be in either `used` or `free` state. + # Including them in `usage` would break the convention that `usage` states sum to the `limit`. + # + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_HUGEPAGES_SURPLUS = 'system.memory.linux.hugepages.surplus' + + # Number of hugepages in use by state. + # + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_HUGEPAGES_USAGE = 'system.memory.linux.hugepages.usage' + + # Percentage of hugepages in use by state. + # + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_HUGEPAGES_UTILIZATION = 'system.memory.linux.hugepages.utilization' # Shared memory used (mostly by tmpfs). # @@ -144,6 +185,21 @@ module SYSTEM # `Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)" # # @note Stability Level: development + SYSTEM_MEMORY_LINUX_SHARED = 'system.memory.linux.shared' + + # Reports the memory used by the Linux kernel for managing caches of frequently used objects. + # + # The sum over the `reclaimable` and `unreclaimable` state values in `memory.linux.slab.usage` SHOULD be equal to the total slab memory available on the system. + # Note that the total slab memory is not constant and may vary over time. + # See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). + # + # @note Stability Level: development + SYSTEM_MEMORY_LINUX_SLAB_USAGE = 'system.memory.linux.slab.usage' + + # Deprecated, use `system.memory.linux.shared` instead. + # + # @note Stability Level: development + # @deprecated Replaced by `system.memory.linux.shared`. SYSTEM_MEMORY_SHARED = 'system.memory.shared' # Reports memory in use by state. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/telemetry/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/telemetry/attributes.rb index 8370a6381..5c57524da 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/telemetry/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/telemetry/attributes.rb @@ -29,12 +29,16 @@ module TELEMETRY # Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to # a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`. # - # @note Stability Level: development + # @note Stability Level: stable + # + # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::TELEMETRY::TELEMETRY_DISTRO_NAME}. TELEMETRY_DISTRO_NAME = 'telemetry.distro.name' # The version string of the auto instrumentation agent or distribution, if used. # - # @note Stability Level: development + # @note Stability Level: stable + # + # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::TELEMETRY::TELEMETRY_DISTRO_VERSION}. TELEMETRY_DISTRO_VERSION = 'telemetry.distro.version' # The language of the telemetry SDK. diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/thread/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/thread/attributes.rb index 7d1d4a960..fa229da4c 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/thread/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/thread/attributes.rb @@ -28,7 +28,7 @@ module THREAD # # Examples of where the value can be extracted from: # - # | Language or platform | Source | + # | Language or platform | Source | # | --- | --- | # | JVM | `Thread.currentThread().threadId()` | # | .NET | `Thread.CurrentThread.ManagedThreadId` | @@ -44,7 +44,7 @@ module THREAD # # Examples of where the value can be extracted from: # - # | Language or platform | Source | + # | Language or platform | Source | # | --- | --- | # | JVM | `Thread.currentThread().getName()` | # | .NET | `Thread.CurrentThread.Name` | diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/url/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/url/attributes.rb index 289e203d5..32b6737cb 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/url/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/url/attributes.rb @@ -68,6 +68,16 @@ module URL # # 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. # `https://www.example.com/path?color=blue&sig=REDACTED`. # @@ -112,6 +122,15 @@ module URL # # 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/semantic_conventions/lib/opentelemetry/semconv/incubating/user_agent/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/user_agent/attributes.rb index b77c744cb..00f1660df 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/user_agent/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/user_agent/attributes.rb @@ -26,7 +26,7 @@ module USER_AGENT # Name of the user-agent extracted from original. Usually refers to the browser's name. # - # [Example](https://www.whatsmyua.info) of extracting browser's name from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name SHOULD be selected. In such a scenario it should align with `user_agent.version` + # [Example](https://uaparser.dev/#demo) of extracting browser's name from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name SHOULD be selected. In such a scenario it should align with `user_agent.version` # # @note Stability Level: development USER_AGENT_NAME = 'user_agent.name' @@ -61,7 +61,7 @@ module USER_AGENT # Version of the user-agent extracted from original. Usually refers to the browser's version # - # [Example](https://www.whatsmyua.info) of extracting browser's version from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant version SHOULD be selected. In such a scenario it should align with `user_agent.name` + # [Example](https://uaparser.dev/#demo) of extracting browser's version from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant version SHOULD be selected. In such a scenario it should align with `user_agent.name` # # @note Stability Level: development USER_AGENT_VERSION = 'user_agent.version' diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/attributes.rb index c76fe0188..826f2b106 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/attributes.rb @@ -36,6 +36,11 @@ module V8JS # @note Stability Level: development V8JS_HEAP_SPACE_NAME = 'v8js.heap.space.name' + # The type of resource keeping the event loop active. + # + # @note Stability Level: development + V8JS_RESOURCE_TYPE = 'v8js.resource.type' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/metrics.rb b/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/metrics.rb index a1d0e5007..b1b60cab2 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/metrics.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/incubating/v8js/metrics.rb @@ -71,6 +71,13 @@ module V8JS # @note Stability Level: development V8JS_MEMORY_HEAP_USED = 'v8js.memory.heap.used' + # Gauge of the active resources that are currently keeping the event loop alive. + # + # The values can be retrieved from [`process.getActiveResourcesInfo()`](https://nodejs.org/api/process.html#processgetactiveresourcesinfo) + # + # @note Stability Level: development + V8JS_RESOURCE_ACTIVE = 'v8js.resource.active' + # @!endgroup end end diff --git a/semantic_conventions/lib/opentelemetry/semconv/otel/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/otel/attributes.rb index 53cebf26f..1c1eec415 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/otel/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/otel/attributes.rb @@ -23,6 +23,13 @@ module SemConv module OTEL # @!group Attribute Names + # Identifies the class / type of event. + # + # This attribute SHOULD be used by non-OTLP exporters when destination does not support `EventName` or equivalent field. This attribute MAY be used by applications using existing logging libraries so that it can be used to set the `EventName` field by Collector or SDK components. + # + # @note Stability Level: stable + OTEL_EVENT_NAME = 'otel.event.name' + # The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). # # @note Stability Level: stable diff --git a/semantic_conventions/lib/opentelemetry/semconv/service/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/service/attributes.rb index 748ac81b0..46c338ef1 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/service/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/service/attributes.rb @@ -23,14 +23,54 @@ module SemConv module SERVICE # @!group Attribute Names + # The string ID of the service instance. + # + # 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. + # + # @note Stability Level: stable + SERVICE_INSTANCE_ID = 'service.instance.id' + # Logical name of the service. # - # 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`. + # 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 the process executable name, e.g. `unknown_service:bash`. If the process executable name is not available, the value MUST be set to `unknown_service`. + # The process executable name is the name of the process executable, the same value as described by the [`process.executable.name`](process.md) resource attribute. # # @note Stability Level: stable SERVICE_NAME = 'service.name' - # The version string of the service API or implementation. The format is not defined by these conventions. + # A namespace for `service.name`. + # + # 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. + # + # @note Stability Level: stable + SERVICE_NAMESPACE = 'service.namespace' + + # The version string of the service component. The format is not defined by these conventions. # # @note Stability Level: stable SERVICE_VERSION = 'service.version' diff --git a/semantic_conventions/lib/opentelemetry/semconv/telemetry/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/telemetry/attributes.rb index da1ae1627..7c5c82151 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/telemetry/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/telemetry/attributes.rb @@ -23,6 +23,19 @@ module SemConv module TELEMETRY # @!group Attribute Names + # The name of the auto instrumentation agent or distribution, if used. + # + # Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to + # a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`. + # + # @note Stability Level: stable + TELEMETRY_DISTRO_NAME = 'telemetry.distro.name' + + # The version string of the auto instrumentation agent or distribution, if used. + # + # @note Stability Level: stable + TELEMETRY_DISTRO_VERSION = 'telemetry.distro.version' + # The language of the telemetry SDK. # # @note Stability Level: stable diff --git a/semantic_conventions/lib/opentelemetry/semconv/url/attributes.rb b/semantic_conventions/lib/opentelemetry/semconv/url/attributes.rb index 94b366b55..b5b49b080 100644 --- a/semantic_conventions/lib/opentelemetry/semconv/url/attributes.rb +++ b/semantic_conventions/lib/opentelemetry/semconv/url/attributes.rb @@ -51,6 +51,16 @@ module URL # # 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. # `https://www.example.com/path?color=blue&sig=REDACTED`. # @@ -78,6 +88,15 @@ module URL # # 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`. #