From f496eeaa43657bad63c506932b0b299db1f28307 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Wed, 7 Aug 2024 23:20:24 +0000 Subject: [PATCH] initial commit --- .../scripts/generate-consts-from-spec.sh | 6 +- .../src/attribute.rs | 535 +++++++++++++++-- opentelemetry-semantic-conventions/src/lib.rs | 2 +- .../src/metric.rs | 560 ++++++++++++++++-- .../src/resource.rs | 2 +- .../src/trace.rs | 14 +- 6 files changed, 1025 insertions(+), 94 deletions(-) diff --git a/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh b/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh index 573b43bba9..280e8d7076 100755 --- a/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh +++ b/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh @@ -5,8 +5,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CRATE_DIR="${SCRIPT_DIR}/../" # freeze the spec version and generator version to make generation reproducible -SPEC_VERSION=1.26.0 -SEMCOVGEN_VERSION=0.24.0 +SPEC_VERSION=1.27.0 +SEMCOVGEN_VERSION=0.25.0 cd "$CRATE_DIR" @@ -35,7 +35,7 @@ docker run --rm \ -v "${CRATE_DIR}/scripts/templates:/templates" \ -v "${CRATE_DIR}/src:/output" \ otel/semconvgen:$SEMCOVGEN_VERSION \ - --only span,event,scope \ + --only span,event \ -f /source code \ --template /templates/semantic_attributes.rs.j2 \ --output /output/trace.rs \ diff --git a/opentelemetry-semantic-conventions/src/attribute.rs b/opentelemetry-semantic-conventions/src/attribute.rs index 9aff426c92..fedcbed50b 100644 --- a/opentelemetry-semantic-conventions/src/attribute.rs +++ b/opentelemetry-semantic-conventions/src/attribute.rs @@ -18,6 +18,71 @@ pub const ANDROID_OS_API_LEVEL: &str = "android.os.api_level"; /// /// The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. pub const ANDROID_STATE: &str = "android.state"; +/// The provenance filename of the built attestation which directly relates to the build artifact filename. This filename SHOULD accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information. +/// +/// # Examples +/// +/// - `golang-binary-amd64-v0.1.0.attestation` +/// - `docker-image-amd64-v0.1.0.intoto.json1` +/// - `release-1.tar.gz.attestation` +/// - `file-name-package.tar.gz.intoto.json1` +pub const ARTIFACT_ATTESTATION_FILENAME: &str = "artifact.attestation.filename"; +/// The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). +/// +/// # Examples +/// +/// - `1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408` +pub const ARTIFACT_ATTESTATION_HASH: &str = "artifact.attestation.hash"; +/// The id of the build [software attestation](https://slsa.dev/attestation-model). +/// +/// # Examples +/// +/// - `123` +pub const ARTIFACT_ATTESTATION_ID: &str = "artifact.attestation.id"; +/// The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name. +/// +/// This file name can also act as the [Package Name](https://slsa.dev/spec/v1.0/terminology#package-model) +/// in cases where the package ecosystem maps accordingly. +/// Additionally, the artifact [can be published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain) +/// for others, but that is not a guarantee. +/// +/// # Examples +/// +/// - `golang-binary-amd64-v0.1.0` +/// - `docker-image-amd64-v0.1.0` +/// - `release-1.tar.gz` +/// - `file-name-package.tar.gz` +pub const ARTIFACT_FILENAME: &str = "artifact.filename"; +/// The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity. +/// +/// The specific algorithm used to create the cryptographic hash value is +/// not defined. In situations where an artifact has multiple +/// cryptographic hashes, it is up to the implementer to choose which +/// hash value to set here; this should be the most secure hash algorithm +/// that is suitable for the situation and consistent with the +/// corresponding attestation. The implementer can then provide the other +/// hash values through an additional set of attribute extensions as they +/// deem necessary. +/// +/// # Examples +/// +/// - `9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9` +pub const ARTIFACT_HASH: &str = "artifact.hash"; +/// The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact. +/// +/// # Examples +/// +/// - `pkg:github/package-url/purl-spec@1209109710924` +/// - `pkg:npm/foo@12.12.3` +pub const ARTIFACT_PURL: &str = "artifact.purl"; +/// The version of the artifact. +/// +/// # Examples +/// +/// - `v0.1.0` +/// - `1.2.1` +/// - `122691-build` +pub const ARTIFACT_VERSION: &str = "artifact.version"; /// ASP.NET Core exception middleware handling result. /// /// # Examples @@ -373,6 +438,12 @@ pub const AWS_S3_PART_NUMBER: &str = "aws.s3.part_number"; /// /// - `dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ` pub const AWS_S3_UPLOAD_ID: &str = "aws.s3.upload_id"; +/// The unique identifier of the service request. It's generated by the Azure service and returned with the response. +/// +/// # Examples +/// +/// - `00000000-0000-0000-0000-000000000000` +pub const AZ_SERVICE_REQUEST_ID: &str = "az.service_request_id"; /// Array of brand name and version separated by a space. /// /// This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`). @@ -409,6 +480,50 @@ pub const BROWSER_MOBILE: &str = "browser.mobile"; /// - `macOS` /// - `Android` pub const BROWSER_PLATFORM: &str = "browser.platform"; +/// The human readable name of the pipeline within a CI/CD system. +/// +/// # Examples +/// +/// - `Build and Test` +/// - `Lint` +/// - `Deploy Go Project` +/// - `deploy_to_environment` +pub const CICD_PIPELINE_NAME: &str = "cicd.pipeline.name"; +/// The unique identifier of a pipeline run within a CI/CD system. +/// +/// # Examples +/// +/// - `120912` +pub const CICD_PIPELINE_RUN_ID: &str = "cicd.pipeline.run.id"; +/// The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. +/// +/// # Examples +/// +/// - `Run GoLang Linter` +/// - `Go Build` +/// - `go-test` +/// - `deploy_binary` +pub const CICD_PIPELINE_TASK_NAME: &str = "cicd.pipeline.task.name"; +/// The unique identifier of a task run within a pipeline. +/// +/// # Examples +/// +/// - `12097` +pub const CICD_PIPELINE_TASK_RUN_ID: &str = "cicd.pipeline.task.run.id"; +/// The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. +/// +/// # Examples +/// +/// - `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075` +pub const CICD_PIPELINE_TASK_RUN_URL_FULL: &str = "cicd.pipeline.task.run.url.full"; +/// The type of the task within a pipeline. +/// +/// # Examples +/// +/// - `build` +/// - `test` +/// - `deploy` +pub const CICD_PIPELINE_TASK_TYPE: &str = "cicd.pipeline.task.type"; /// Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. /// /// When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available. @@ -457,7 +572,7 @@ pub const CLOUD_PROVIDER: &str = "cloud.provider"; /// - `us-central1` /// - `us-east-1` pub const CLOUD_REGION: &str = "cloud.region"; -/// Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP). +/// The [Fully Qualified Azure Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) the log is emitted for. /// /// On some cloud providers, it may not be possible to determine the full ID at startup, /// so it may be necessary to set `cloud.resource_id` as a span attribute instead. @@ -468,7 +583,7 @@ pub const CLOUD_REGION: &str = "cloud.region"; /// * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). /// Take care not to use the "invoked ARN" directly but replace any /// [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) -/// with the resolved function version, as the same runtime instance may be invokable with +/// with the resolved function version, as the same runtime instance may be invocable with /// multiple different aliases. /// * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) /// * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, @@ -573,12 +688,13 @@ pub const CONTAINER_COMMAND_ARGS: &str = "container.command_args"; /// /// - `otelcontribcol --config config.yaml` pub const CONTAINER_COMMAND_LINE: &str = "container.command_line"; -/// The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. +/// Deprecated, use `cpu.mode` instead. /// /// # Examples /// /// - `user` /// - `kernel` +#[deprecated] pub const CONTAINER_CPU_STATE: &str = "container.cpu.state"; /// Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. /// @@ -632,6 +748,15 @@ pub const CONTAINER_NAME: &str = "container.name"; /// - `containerd` /// - `rkt` pub const CONTAINER_RUNTIME: &str = "container.runtime"; +/// The CPU mode for this data point. A container's CPU metric SHOULD be characterized _either_ by data points with no `mode` labels, _or only_ data points with `mode` labels. +/// +/// Following states SHOULD be used: `user`, `system`, `kernel` +/// +/// # Examples +/// +/// - `user` +/// - `system` +pub const CPU_MODE: &str = "cpu.mode"; /// The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). pub const DB_CASSANDRA_CONSISTENCY_LEVEL: &str = "db.cassandra.consistency_level"; /// The data center of the coordinating node for a query. @@ -669,22 +794,37 @@ pub const DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: &str = /// - `mytable` #[deprecated] pub const DB_CASSANDRA_TABLE: &str = "db.cassandra.table"; -/// The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. +/// The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it. /// /// # Examples /// /// - `myDataSource` -pub const DB_CLIENT_CONNECTIONS_POOL_NAME: &str = "db.client.connections.pool.name"; +pub const DB_CLIENT_CONNECTION_POOL_NAME: &str = "db.client.connection.pool.name"; /// The state of a connection in the pool. /// /// # Examples /// /// - `idle` +pub const DB_CLIENT_CONNECTION_STATE: &str = "db.client.connection.state"; +/// Deprecated, use `db.client.connection.pool.name` instead. +/// +/// # Examples +/// +/// - `myDataSource` +#[deprecated] +pub const DB_CLIENT_CONNECTIONS_POOL_NAME: &str = "db.client.connections.pool.name"; +/// Deprecated, use `db.client.connection.state` instead. +/// +/// # Examples +/// +/// - `idle` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_STATE: &str = "db.client.connections.state"; /// The name of a collection (table, container) within the database. /// -/// If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name. /// It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. +/// If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. +/// For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. /// /// # Examples /// @@ -738,11 +878,12 @@ pub const DB_COSMOSDB_STATUS_CODE: &str = "db.cosmosdb.status_code"; /// - `1000` /// - `1002` pub const DB_COSMOSDB_SUB_STATUS_CODE: &str = "db.cosmosdb.sub_status_code"; -/// Represents the identifier of an Elasticsearch cluster. +/// Deprecated, use `db.namespace` instead. /// /// # Examples /// /// - `e9106fc68e3044f0b1475b04bf4ffd5f` +#[deprecated] pub const DB_ELASTICSEARCH_CLUSTER_NAME: &str = "db.elasticsearch.cluster.name"; /// Represents the human-readable identifier of the node/instance to which a request was routed. /// @@ -807,9 +948,21 @@ pub const DB_NAMESPACE: &str = "db.namespace"; /// - `SELECT` #[deprecated] pub const DB_OPERATION: &str = "db.operation"; +/// The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). +/// +/// Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`. +/// +/// # Examples +/// +/// - `2` +/// - `3` +/// - `4` +pub const DB_OPERATION_BATCH_SIZE: &str = "db.operation.batch.size"; /// The name of the operation or command being executed. /// /// It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. +/// If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. +/// For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. /// /// # Examples /// @@ -819,6 +972,10 @@ pub const DB_OPERATION: &str = "db.operation"; pub const DB_OPERATION_NAME: &str = "db.operation.name"; /// The database query being executed. /// +/// For sanitization see [Sanitization of `db.query.text`](../../docs/database/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. +/// 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. +/// /// # Examples /// /// - `SELECT * FROM wuser_table where username = ?` @@ -860,21 +1017,44 @@ pub const DB_SYSTEM: &str = "db.system"; /// - `reporting_user` #[deprecated] pub const DB_USER: &str = "db.user"; +/// 'Deprecated, use `deployment.environment.name` instead.'. +/// +/// # Examples +/// +/// - `staging` +/// - `production` +#[deprecated] +pub const DEPLOYMENT_ENVIRONMENT: &str = "deployment.environment"; /// Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). /// -/// `deployment.environment` does not affect the uniqueness constraints defined through +/// `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=production` -/// * `service.name=frontend`, `deployment.environment=staging`. +/// * `service.name=frontend`, `deployment.environment.name=production` +/// * `service.name=frontend`, `deployment.environment.name=staging`. /// /// # Examples /// /// - `staging` /// - `production` -pub const DEPLOYMENT_ENVIRONMENT: &str = "deployment.environment"; +pub const DEPLOYMENT_ENVIRONMENT_NAME: &str = "deployment.environment.name"; +/// The id of the deployment. +/// +/// # Examples +/// +/// - `1208` +pub const DEPLOYMENT_ID: &str = "deployment.id"; +/// The name of the deployment. +/// +/// # Examples +/// +/// - `deploy my app` +/// - `deploy-frontend` +pub const DEPLOYMENT_NAME: &str = "deployment.name"; +/// The status of the deployment. +pub const DEPLOYMENT_STATUS: &str = "deployment.status"; /// Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. /// /// When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available. @@ -942,23 +1122,26 @@ pub const DISK_IO_DIRECTION: &str = "disk.io.direction"; /// - `www.example.com` /// - `dot.net` pub const DNS_QUESTION_NAME: &str = "dns.question.name"; -/// Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. +/// Deprecated, use `user.id` instead. /// /// # Examples /// /// - `username` +#[deprecated] pub const ENDUSER_ID: &str = "enduser.id"; -/// Actual/assumed role the client is making the request under extracted from token or application security context. +/// Deprecated, use `user.roles` instead. /// /// # Examples /// /// - `admin` +#[deprecated] pub const ENDUSER_ROLE: &str = "enduser.role"; -/// Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). +/// Deprecated, no replacement at this time. /// /// # Examples /// /// - `read:message, write:files` +#[deprecated] pub const ENDUSER_SCOPE: &str = "enduser.scope"; /// Describes a class of error the operation ended with. /// @@ -973,7 +1156,7 @@ pub const ENDUSER_SCOPE: &str = "enduser.scope"; pub const ERROR_TYPE: &str = "error.type"; /// Identifies the class / type of event. /// -/// Event names are subject to the same rules as [attribute names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes. +/// Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes. /// /// # Examples /// @@ -1200,6 +1383,18 @@ pub const FILE_NAME: &str = "file.name"; pub const FILE_PATH: &str = "file.path"; /// File size in bytes. pub const FILE_SIZE: &str = "file.size"; +/// Identifies the Google Cloud service for which the official client library is intended. +/// +/// Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'. +/// +/// # Examples +/// +/// - `appengine` +/// - `run` +/// - `firestore` +/// - `alloydb` +/// - `spanner` +pub const GCP_CLIENT_SERVICE: &str = "gcp.client.service"; /// The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. /// /// # Examples @@ -1228,7 +1423,7 @@ pub const GCP_GCE_INSTANCE_HOSTNAME: &str = "gcp.gce.instance.hostname"; /// - `instance-1` /// - `my-vm-name` pub const GCP_GCE_INSTANCE_NAME: &str = "gcp.gce.instance.name"; -/// The full response received from the LLM. +/// The full response received from the GenAI model. /// /// It's RECOMMENDED to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) /// @@ -1236,7 +1431,11 @@ pub const GCP_GCE_INSTANCE_NAME: &str = "gcp.gce.instance.name"; /// /// - `[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]` pub const GEN_AI_COMPLETION: &str = "gen_ai.completion"; -/// The full prompt sent to an LLM. +/// The name of the operation being performed. +/// +/// If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value. +pub const GEN_AI_OPERATION_NAME: &str = "gen_ai.operation.name"; +/// The full prompt sent to the GenAI model. /// /// It's RECOMMENDED to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) /// @@ -1244,25 +1443,50 @@ pub const GEN_AI_COMPLETION: &str = "gen_ai.completion"; /// /// - `[{'role': 'user', 'content': 'What is the capital of France?'}]` pub const GEN_AI_PROMPT: &str = "gen_ai.prompt"; -/// The maximum number of tokens the LLM generates for a request. +/// The frequency penalty setting for the GenAI request. +/// +/// # Examples +/// +/// - `0.1` +pub const GEN_AI_REQUEST_FREQUENCY_PENALTY: &str = "gen_ai.request.frequency_penalty"; +/// The maximum number of tokens the model generates for a request. /// /// # Examples /// /// - `100` pub const GEN_AI_REQUEST_MAX_TOKENS: &str = "gen_ai.request.max_tokens"; -/// The name of the LLM a request is being made to. +/// The name of the GenAI model a request is being made to. /// /// # Examples /// /// - `gpt-4` pub const GEN_AI_REQUEST_MODEL: &str = "gen_ai.request.model"; -/// The temperature setting for the LLM request. +/// The presence penalty setting for the GenAI request. +/// +/// # Examples +/// +/// - `0.1` +pub const GEN_AI_REQUEST_PRESENCE_PENALTY: &str = "gen_ai.request.presence_penalty"; +/// List of sequences that the model will use to stop generating further tokens. +/// +/// # Examples +/// +/// - `forest` +/// - `lived` +pub const GEN_AI_REQUEST_STOP_SEQUENCES: &str = "gen_ai.request.stop_sequences"; +/// The temperature setting for the GenAI request. /// /// # Examples /// /// - `0.0` pub const GEN_AI_REQUEST_TEMPERATURE: &str = "gen_ai.request.temperature"; -/// The top_p sampling setting for the LLM request. +/// The top_k sampling setting for the GenAI request. +/// +/// # Examples +/// +/// - `1.0` +pub const GEN_AI_REQUEST_TOP_K: &str = "gen_ai.request.top_k"; +/// The top_p sampling setting for the GenAI request. /// /// # Examples /// @@ -1280,32 +1504,68 @@ pub const GEN_AI_RESPONSE_FINISH_REASONS: &str = "gen_ai.response.finish_reasons /// /// - `chatcmpl-123` pub const GEN_AI_RESPONSE_ID: &str = "gen_ai.response.id"; -/// The name of the LLM a response was generated from. +/// The name of the model that generated the response. /// /// # Examples /// /// - `gpt-4-0613` pub const GEN_AI_RESPONSE_MODEL: &str = "gen_ai.response.model"; -/// The Generative AI product as identified by the client instrumentation. +/// The Generative AI product as identified by the client or server instrumentation. +/// +/// The `gen_ai.system` describes a family of GenAI models with specific model identified +/// by `gen_ai.request.model` and `gen_ai.response.model` attributes. /// -/// The actual GenAI product may differ from the one identified by the client. For example, when using OpenAI client libraries to communicate with Mistral, the `gen_ai.system` is set to `openai` based on the instrumentation's best knowledge. +/// The actual GenAI product may differ from the one identified by the client. +/// For example, when using OpenAI client libraries to communicate with Mistral, the `gen_ai.system` +/// is set to `openai` based on the instrumentation's best knowledge. +/// +/// For custom model, a custom friendly name SHOULD be used. +/// If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`. /// /// # Examples /// /// - `openai` pub const GEN_AI_SYSTEM: &str = "gen_ai.system"; -/// The number of tokens used in the LLM response (completion). +/// The type of token being counted. /// /// # Examples /// -/// - `180` +/// - `input` +/// - `output` +pub const GEN_AI_TOKEN_TYPE: &str = "gen_ai.token.type"; +/// Deprecated, use `gen_ai.usage.output_tokens` instead. +/// +/// # Examples +/// +/// - `42` +#[deprecated] pub const GEN_AI_USAGE_COMPLETION_TOKENS: &str = "gen_ai.usage.completion_tokens"; -/// The number of tokens used in the LLM prompt. +/// The number of tokens used in the GenAI input (prompt). /// /// # Examples /// /// - `100` +pub const GEN_AI_USAGE_INPUT_TOKENS: &str = "gen_ai.usage.input_tokens"; +/// The number of tokens used in the GenAI response (completion). +/// +/// # Examples +/// +/// - `180` +pub const GEN_AI_USAGE_OUTPUT_TOKENS: &str = "gen_ai.usage.output_tokens"; +/// Deprecated, use `gen_ai.usage.input_tokens` instead. +/// +/// # Examples +/// +/// - `42` +#[deprecated] pub const GEN_AI_USAGE_PROMPT_TOKENS: &str = "gen_ai.usage.prompt_tokens"; +/// The type of memory. +/// +/// # Examples +/// +/// - `other` +/// - `stack` +pub const GO_MEMORY_TYPE: &str = "go.memory.type"; /// The GraphQL document being executed. /// /// The value may be sanitized to exclude sensitive information. @@ -1841,6 +2101,13 @@ pub const K8S_STATEFULSET_NAME: &str = "k8s.statefulset.name"; /// /// - `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` pub const K8S_STATEFULSET_UID: &str = "k8s.statefulset.uid"; +/// The Linux Slab memory state. +/// +/// # Examples +/// +/// - `reclaimable` +/// - `unreclaimable` +pub const LINUX_MEMORY_SLAB_STATE: &str = "linux.memory.slab.state"; /// The basename of the file. /// /// # Examples @@ -1867,6 +2134,15 @@ pub const LOG_FILE_PATH: &str = "log.file.path"; pub const LOG_FILE_PATH_RESOLVED: &str = "log.file.path_resolved"; /// The stream associated with the log. See below for a list of well-known values. pub const LOG_IOSTREAM: &str = "log.iostream"; +/// The complete orignal Log Record. +/// +/// This value MAY be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.) +/// +/// # Examples +/// +/// - `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened` +/// - `[INFO] 8/3/24 12:34:56 Something happened` +pub const LOG_RECORD_ORIGINAL: &str = "log.record.original"; /// A unique identifier for the Log Record. /// /// If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. @@ -1905,6 +2181,15 @@ pub const MESSAGING_BATCH_MESSAGE_COUNT: &str = "messaging.batch.message_count"; /// - `client-5` /// - `myhost@8742@s8083jm` pub const MESSAGING_CLIENT_ID: &str = "messaging.client.id"; +/// The name of the consumer group with which a consumer is associated. +/// +/// Semantic conventions for individual messaging systems SHOULD document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system. +/// +/// # Examples +/// +/// - `my-group` +/// - `indexer` +pub const MESSAGING_CONSUMER_GROUP_NAME: &str = "messaging.consumer.group.name"; /// A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). pub const MESSAGING_DESTINATION_ANONYMOUS: &str = "messaging.destination.anonymous"; /// The message destination name. @@ -1923,18 +2208,25 @@ pub const MESSAGING_DESTINATION_NAME: &str = "messaging.destination.name"; /// /// - `1` pub const MESSAGING_DESTINATION_PARTITION_ID: &str = "messaging.destination.partition.id"; -/// A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name). +/// Deprecated, no replacement at this time. +#[deprecated] pub const MESSAGING_DESTINATION_PUBLISH_ANONYMOUS: &str = "messaging.destination_publish.anonymous"; -/// The name of the original destination the message was published to. -/// -/// The name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If -/// the broker doesn't have such notion, the original destination name SHOULD uniquely identify the broker. +/// Deprecated, no replacement at this time. /// /// # Examples /// /// - `MyQueue` /// - `MyTopic` +#[deprecated] pub const MESSAGING_DESTINATION_PUBLISH_NAME: &str = "messaging.destination_publish.name"; +/// The name of the destination subscription from which a message is consumed. +/// +/// Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. +/// +/// # Examples +/// +/// - `subscription-a` +pub const MESSAGING_DESTINATION_SUBSCRIPTION_NAME: &str = "messaging.destination.subscription.name"; /// Low cardinality representation of the messaging destination name. /// /// Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. @@ -1945,11 +2237,12 @@ pub const MESSAGING_DESTINATION_PUBLISH_NAME: &str = "messaging.destination_publ pub const MESSAGING_DESTINATION_TEMPLATE: &str = "messaging.destination.template"; /// A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. pub const MESSAGING_DESTINATION_TEMPORARY: &str = "messaging.destination.temporary"; -/// The name of the consumer group the event consumer is associated with. +/// Deprecated, use `messaging.consumer.group.name` instead. /// /// # Examples /// -/// - `indexer` +/// - `$Default` +#[deprecated] pub const MESSAGING_EVENTHUBS_CONSUMER_GROUP: &str = "messaging.eventhubs.consumer.group"; /// The UTC epoch seconds at which the message has been accepted and stored in the entity. /// @@ -1985,11 +2278,12 @@ pub const MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT: &str = /// - `ordering_key` pub const MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY: &str = "messaging.gcp_pubsub.message.ordering_key"; -/// Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. +/// Deprecated, use `messaging.consumer.group.name` instead. /// /// # Examples /// /// - `my-group` +#[deprecated] pub const MESSAGING_KAFKA_CONSUMER_GROUP: &str = "messaging.kafka.consumer.group"; /// Deprecated, use `messaging.destination.partition.id` instead. /// @@ -2006,14 +2300,21 @@ pub const MESSAGING_KAFKA_DESTINATION_PARTITION: &str = "messaging.kafka.destina /// /// - `myKey` pub const MESSAGING_KAFKA_MESSAGE_KEY: &str = "messaging.kafka.message.key"; -/// The offset of a record in the corresponding Kafka partition. +/// Deprecated, use `messaging.kafka.offset` instead. /// /// # Examples /// /// - `42` +#[deprecated] pub const MESSAGING_KAFKA_MESSAGE_OFFSET: &str = "messaging.kafka.message.offset"; /// A boolean that is true if the message is a tombstone. pub const MESSAGING_KAFKA_MESSAGE_TOMBSTONE: &str = "messaging.kafka.message.tombstone"; +/// The offset of a record in the corresponding Kafka partition. +/// +/// # Examples +/// +/// - `42` +pub const MESSAGING_KAFKA_OFFSET: &str = "messaging.kafka.offset"; /// The size of the message body in bytes. /// /// This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed @@ -2078,11 +2379,12 @@ pub const MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY: &str = /// /// - `123` pub const MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG: &str = "messaging.rabbitmq.message.delivery_tag"; -/// Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind. +/// Deprecated, use `messaging.consumer.group.name` instead. /// /// # Examples /// /// - `myConsumerGroup` +#[deprecated] pub const MESSAGING_ROCKETMQ_CLIENT_GROUP: &str = "messaging.rocketmq.client_group"; /// Model of message consumption. This only applies to consumer spans. pub const MESSAGING_ROCKETMQ_CONSUMPTION_MODEL: &str = "messaging.rocketmq.consumption_model"; @@ -2127,11 +2429,12 @@ pub const MESSAGING_ROCKETMQ_MESSAGE_TYPE: &str = "messaging.rocketmq.message.ty /// /// - `myNamespace` pub const MESSAGING_ROCKETMQ_NAMESPACE: &str = "messaging.rocketmq.namespace"; -/// The name of the subscription in the topic messages are received from. +/// Deprecated, use `messaging.servicebus.destination.subscription_name` instead. /// /// # Examples /// -/// - `mySubscription` +/// - `subscription-a` +#[deprecated] pub const MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME: &str = "messaging.servicebus.destination.subscription_name"; /// Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). @@ -2411,14 +2714,14 @@ pub const OS_TYPE: &str = "os.type"; /// - `14.2.1` /// - `18.04.1` pub const OS_VERSION: &str = "os.version"; -/// None. +/// . /// /// # Examples /// /// - `io.opentelemetry.contrib.mongodb` #[deprecated] pub const OTEL_LIBRARY_NAME: &str = "otel.library.name"; -/// None. +/// . /// /// # Examples /// @@ -2451,7 +2754,7 @@ pub const OTEL_STATUS_DESCRIPTION: &str = "otel.status_description"; /// /// - `AuthTokenCache` pub const PEER_SERVICE: &str = "peer.service"; -/// Deprecated, use `db.client.connections.pool.name` instead. +/// Deprecated, use `db.client.connection.pool.name` instead. /// /// # Examples /// @@ -2479,7 +2782,8 @@ pub const PROCESS_COMMAND_ARGS: &str = "process.command_args"; pub const PROCESS_COMMAND_LINE: &str = "process.command_line"; /// Specifies whether the context switches for this data point were voluntary or involuntary. pub const PROCESS_CONTEXT_SWITCH_TYPE: &str = "process.context_switch_type"; -/// A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. +/// Deprecated, use `cpu.mode` instead. +#[deprecated] pub const PROCESS_CPU_STATE: &str = "process.cpu.state"; /// The date and time the process was created, in ISO 8601 format. /// @@ -2557,7 +2861,7 @@ pub const PROCESS_REAL_USER_NAME: &str = "process.real_user.name"; /// /// - `Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0` pub const PROCESS_RUNTIME_DESCRIPTION: &str = "process.runtime.description"; -/// The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. +/// The name of the runtime of this process. /// /// # Examples /// @@ -2787,7 +3091,7 @@ pub const SOURCE_ADDRESS: &str = "source.address"; /// - `3389` /// - `2888` pub const SOURCE_PORT: &str = "source.port"; -/// Deprecated, use `db.client.connections.state` instead. +/// Deprecated, use `db.client.connection.state` instead. /// /// # Examples /// @@ -2800,12 +3104,13 @@ pub const STATE: &str = "state"; /// /// - `1` pub const SYSTEM_CPU_LOGICAL_NUMBER: &str = "system.cpu.logical_number"; -/// The CPU state for this data point. A system's CPU SHOULD be characterized *either* by data points with no `state` labels, *or only* data points with `state` labels. +/// Deprecated, use `cpu.mode` instead. /// /// # Examples /// /// - `idle` /// - `interrupt` +#[deprecated] pub const SYSTEM_CPU_STATE: &str = "system.cpu.state"; /// The device identifier. /// @@ -2917,6 +3222,38 @@ pub const TELEMETRY_SDK_NAME: &str = "telemetry.sdk.name"; /// /// - `1.2.3` pub const TELEMETRY_SDK_VERSION: &str = "telemetry.sdk.version"; +/// The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). +/// +/// # Examples +/// +/// - `org.example.TestCase1.test1` +/// - `example/tests/TestCase1.test1` +/// - `ExampleTestCase1_test1` +pub const TEST_CASE_NAME: &str = "test.case.name"; +/// The status of the actual test case result from test execution. +/// +/// # Examples +/// +/// - `pass` +/// - `fail` +pub const TEST_CASE_RESULT_STATUS: &str = "test.case.result.status"; +/// The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). +/// +/// # Examples +/// +/// - `TestSuite1` +pub const TEST_SUITE_NAME: &str = "test.suite.name"; +/// The status of the test suite run. +/// +/// # Examples +/// +/// - `success` +/// - `failure` +/// - `skipped` +/// - `aborted` +/// - `timed_out` +/// - `in_progress` +pub const TEST_SUITE_RUN_STATUS: &str = "test.suite.run.status"; /// Current "managed" thread ID (as opposed to OS thread ID). /// /// # Examples @@ -2993,11 +3330,12 @@ pub const TLS_CLIENT_NOT_AFTER: &str = "tls.client.not_after"; /// /// - `1970-01-01T00:00:00.000Z` pub const TLS_CLIENT_NOT_BEFORE: &str = "tls.client.not_before"; -/// Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. +/// Deprecated, use `server.address` instead. /// /// # Examples /// /// - `opentelemetry.io` +#[deprecated] pub const TLS_CLIENT_SERVER_NAME: &str = "tls.client.server_name"; /// Distinguished name of subject of the x.509 certificate presented by the client. /// @@ -3009,7 +3347,9 @@ pub const TLS_CLIENT_SUBJECT: &str = "tls.client.subject"; /// /// # Examples /// -/// - `"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."` +/// - `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384` +/// - `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384` +/// - `...` pub const TLS_CLIENT_SUPPORTED_CIPHERS: &str = "tls.client.supported_ciphers"; /// String indicating the curve used for the given cipher, when applicable. /// @@ -3244,6 +3584,105 @@ pub const USER_AGENT_ORIGINAL: &str = "user_agent.original"; /// - `14.1.2` /// - `1.0.0` pub const USER_AGENT_VERSION: &str = "user_agent.version"; +/// User email address. +/// +/// # Examples +/// +/// - `a.einstein@example.com` +pub const USER_EMAIL: &str = "user.email"; +/// User's full name. +/// +/// # Examples +/// +/// - `Albert Einstein` +pub const USER_FULL_NAME: &str = "user.full_name"; +/// Unique user hash to correlate information for a user in anonymized form. +/// +/// Useful if `user.id` or `user.name` contain confidential information and cannot be used. +/// +/// # Examples +/// +/// - `364fc68eaf4c8acec74a4e52d7d1feaa` +pub const USER_HASH: &str = "user.hash"; +/// Unique identifier of the user. +/// +/// # Examples +/// +/// - `S-1-5-21-202424912787-2692429404-2351956786-1000` +pub const USER_ID: &str = "user.id"; +/// Short name or login/username of the user. +/// +/// # Examples +/// +/// - `a.einstein` +pub const USER_NAME: &str = "user.name"; +/// Array of user roles at the time of the event. +/// +/// # Examples +/// +/// - `admin` +/// - `reporting_user` +pub const USER_ROLES: &str = "user.roles"; +/// The type of garbage collection. +pub const V8JS_GC_TYPE: &str = "v8js.gc.type"; +/// The name of the space type of heap memory. +/// +/// Value can be retrieved from value `space_name` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +pub const V8JS_HEAP_SPACE_NAME: &str = "v8js.heap.space.name"; +/// The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. +/// +/// # Examples +/// +/// - `123` +pub const VCS_REPOSITORY_CHANGE_ID: &str = "vcs.repository.change.id"; +/// The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +/// +/// # Examples +/// +/// - `Fixes broken thing` +/// - `feat: add my new feature` +/// - `[chore] update dependency` +pub const VCS_REPOSITORY_CHANGE_TITLE: &str = "vcs.repository.change.title"; +/// The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +/// +/// # Examples +/// +/// - `my-feature-branch` +/// - `tag-1-test` +pub const VCS_REPOSITORY_REF_NAME: &str = "vcs.repository.ref.name"; +/// The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. +/// +/// The revision can be a full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), +/// of the recorded change to a ref within a repository pointing to a +/// commit [commit](https://git-scm.com/docs/git-commit) object. It does +/// not necessarily have to be a hash; it can simply define a +/// [revision number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) +/// which is an integer that is monotonically increasing. In cases where +/// it is identical to the `ref.name`, it SHOULD still be included. It is +/// up to the implementer to decide which value to set as the revision +/// based on the VCS system and situational context. +/// +/// # Examples +/// +/// - `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc` +/// - `main` +/// - `123` +/// - `HEAD` +pub const VCS_REPOSITORY_REF_REVISION: &str = "vcs.repository.ref.revision"; +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +/// +/// # Examples +/// +/// - `branch` +/// - `tag` +pub const VCS_REPOSITORY_REF_TYPE: &str = "vcs.repository.ref.type"; +/// The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. +/// +/// # Examples +/// +/// - `https://github.com/opentelemetry/open-telemetry-collector-contrib` +/// - `https://gitlab.com/my-org/my-project/my-projects-project/repo` +pub const VCS_REPOSITORY_URL_FULL: &str = "vcs.repository.url.full"; /// Additional description of the web engine (e.g. detailed version and edition information). /// /// # Examples diff --git a/opentelemetry-semantic-conventions/src/lib.rs b/opentelemetry-semantic-conventions/src/lib.rs index 73ea231902..ca2eb7e1cd 100644 --- a/opentelemetry-semantic-conventions/src/lib.rs +++ b/opentelemetry-semantic-conventions/src/lib.rs @@ -22,4 +22,4 @@ pub mod trace; /// The schema URL that matches the version of the semantic conventions that /// this crate defines. -pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.26.0"; +pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.27.0"; diff --git a/opentelemetry-semantic-conventions/src/metric.rs b/opentelemetry-semantic-conventions/src/metric.rs index 0bfbea3214..d80e04bb8b 100644 --- a/opentelemetry-semantic-conventions/src/metric.rs +++ b/opentelemetry-semantic-conventions/src/metric.rs @@ -168,7 +168,7 @@ pub const ASPNETCORE_ROUTING_MATCH_ATTEMPTS: &str = "aspnetcore.routing.match_at /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::CONTAINER_CPU_STATE`] | `Opt in` +/// | [`crate::attribute::CPU_MODE`] | `Opt in` pub const CONTAINER_CPU_TIME: &str = "container.cpu.time"; /// ## Description /// Disk bytes for the container. @@ -227,8 +227,8 @@ pub const CONTAINER_NETWORK_IO: &str = "container.network.io"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_STATE`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_STATE`] | `Required` pub const DB_CLIENT_CONNECTION_COUNT: &str = "db.client.connection.count"; /// ## Description /// The time it took to create a new connection. @@ -242,7 +242,7 @@ pub const DB_CLIENT_CONNECTION_COUNT: &str = "db.client.connection.count"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_CREATE_TIME: &str = "db.client.connection.create_time"; /// ## Description /// The maximum number of idle open connections allowed. @@ -256,7 +256,7 @@ pub const DB_CLIENT_CONNECTION_CREATE_TIME: &str = "db.client.connection.create_ /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_IDLE_MAX: &str = "db.client.connection.idle.max"; /// ## Description /// The minimum number of idle open connections allowed. @@ -270,7 +270,7 @@ pub const DB_CLIENT_CONNECTION_IDLE_MAX: &str = "db.client.connection.idle.max"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_IDLE_MIN: &str = "db.client.connection.idle.min"; /// ## Description /// The maximum number of open connections allowed. @@ -284,7 +284,7 @@ pub const DB_CLIENT_CONNECTION_IDLE_MIN: &str = "db.client.connection.idle.min"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_MAX: &str = "db.client.connection.max"; /// ## Description /// The number of pending requests for an open connection, cumulative for the entire pool. @@ -298,7 +298,7 @@ pub const DB_CLIENT_CONNECTION_MAX: &str = "db.client.connection.max"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_PENDING_REQUESTS: &str = "db.client.connection.pending_requests"; /// ## Description /// The number of connection timeouts that have occurred trying to obtain a connection from the pool. @@ -312,7 +312,7 @@ pub const DB_CLIENT_CONNECTION_PENDING_REQUESTS: &str = "db.client.connection.pe /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_TIMEOUTS: &str = "db.client.connection.timeouts"; /// ## Description /// The time between borrowing a connection and returning it to the pool. @@ -326,7 +326,7 @@ pub const DB_CLIENT_CONNECTION_TIMEOUTS: &str = "db.client.connection.timeouts"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_USE_TIME: &str = "db.client.connection.use_time"; /// ## Description /// The time it took to obtain an open connection from the pool. @@ -340,7 +340,7 @@ pub const DB_CLIENT_CONNECTION_USE_TIME: &str = "db.client.connection.use_time"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +/// | [`crate::attribute::DB_CLIENT_CONNECTION_POOL_NAME`] | `Required` pub const DB_CLIENT_CONNECTION_WAIT_TIME: &str = "db.client.connection.wait_time"; /// ## Description /// Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`. @@ -355,6 +355,7 @@ pub const DB_CLIENT_CONNECTION_WAIT_TIME: &str = "db.client.connection.wait_time /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_CREATE_TIME: &str = "db.client.connections.create_time"; /// ## Description /// Deprecated, use `db.client.connection.idle.max` instead. @@ -369,6 +370,7 @@ pub const DB_CLIENT_CONNECTIONS_CREATE_TIME: &str = "db.client.connections.creat /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_IDLE_MAX: &str = "db.client.connections.idle.max"; /// ## Description /// Deprecated, use `db.client.connection.idle.min` instead. @@ -383,6 +385,7 @@ pub const DB_CLIENT_CONNECTIONS_IDLE_MAX: &str = "db.client.connections.idle.max /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_IDLE_MIN: &str = "db.client.connections.idle.min"; /// ## Description /// Deprecated, use `db.client.connection.max` instead. @@ -397,6 +400,7 @@ pub const DB_CLIENT_CONNECTIONS_IDLE_MIN: &str = "db.client.connections.idle.min /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_MAX: &str = "db.client.connections.max"; /// ## Description /// Deprecated, use `db.client.connection.pending_requests` instead. @@ -411,6 +415,7 @@ pub const DB_CLIENT_CONNECTIONS_MAX: &str = "db.client.connections.max"; /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_PENDING_REQUESTS: &str = "db.client.connections.pending_requests"; /// ## Description /// Deprecated, use `db.client.connection.timeouts` instead. @@ -425,6 +430,7 @@ pub const DB_CLIENT_CONNECTIONS_PENDING_REQUESTS: &str = "db.client.connections. /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_TIMEOUTS: &str = "db.client.connections.timeouts"; /// ## Description /// Deprecated, use `db.client.connection.count` instead. @@ -440,6 +446,7 @@ pub const DB_CLIENT_CONNECTIONS_TIMEOUTS: &str = "db.client.connections.timeouts /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_STATE`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_USAGE: &str = "db.client.connections.usage"; /// ## Description /// Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`. @@ -454,6 +461,7 @@ pub const DB_CLIENT_CONNECTIONS_USAGE: &str = "db.client.connections.usage"; /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_USE_TIME: &str = "db.client.connections.use_time"; /// ## Description /// Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`. @@ -468,9 +476,12 @@ pub const DB_CLIENT_CONNECTIONS_USE_TIME: &str = "db.client.connections.use_time /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` +#[deprecated] pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_time"; /// ## Description /// Duration of database client operations. +/// +/// Batch operations SHOULD be recorded as a single operation. /// ## Metadata /// | | | /// |:-|:- @@ -482,9 +493,9 @@ pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_ti /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::DB_SYSTEM`] | `Required` -/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally required`: If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. +/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally required`: If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name in the query. /// | [`crate::attribute::DB_NAMESPACE`] | `Conditionally required`: If available. -/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally required`: If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. +/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally required`: If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the operation failed. /// | [`crate::attribute::SERVER_PORT`] | `Conditionally required`: If using a port other than the default port for this DBMS and if `server.address` is set. /// | [`crate::attribute::NETWORK_PEER_ADDRESS`] | `Recommended`: If applicable for this database system. @@ -633,6 +644,208 @@ pub const FAAS_NET_IO: &str = "faas.net_io"; /// | [`crate::attribute::FAAS_TRIGGER`] | `Unspecified` pub const FAAS_TIMEOUTS: &str = "faas.timeouts"; /// ## Description +/// GenAI operation duration. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` +/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: if the operation ended in an error +/// | [`crate::attribute::SERVER_PORT`] | `Conditionally required`: If `server.address` is set. +/// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` +pub const GEN_AI_CLIENT_OPERATION_DURATION: &str = "gen_ai.client.operation.duration"; +/// ## Description +/// Measures number of input and output tokens used. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `{token}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` +/// | [`crate::attribute::GEN_AI_TOKEN_TYPE`] | `Required` +/// | [`crate::attribute::SERVER_PORT`] | `Conditionally required`: If `server.address` is set. +/// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` +pub const GEN_AI_CLIENT_TOKEN_USAGE: &str = "gen_ai.client.token.usage"; +/// ## Description +/// Generative AI server request duration such as time-to-last byte or last output token. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` +/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: if the operation ended in an error +/// | [`crate::attribute::SERVER_PORT`] | `Conditionally required`: If `server.address` is set. +/// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` +pub const GEN_AI_SERVER_REQUEST_DURATION: &str = "gen_ai.server.request.duration"; +/// ## Description +/// Time per output token generated after the first token for successful responses. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` +/// | [`crate::attribute::SERVER_PORT`] | `Conditionally required`: If `server.address` is set. +/// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` +pub const GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: &str = "gen_ai.server.time_per_output_token"; +/// ## Description +/// Time to generate first token for successful responses. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` +/// | [`crate::attribute::SERVER_PORT`] | `Conditionally required`: If `server.address` is set. +/// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` +pub const GEN_AI_SERVER_TIME_TO_FIRST_TOKEN: &str = "gen_ai.server.time_to_first_token"; +/// ## Description +/// Heap size target percentage configured by the user, otherwise 100. +/// +/// The value range is \[0.0,100.0\]. Computed from `/gc/gogc:percent`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `%` | +/// | Status: | `Experimental` | +pub const GO_CONFIG_GOGC: &str = "go.config.gogc"; +/// ## Description +/// Count of live goroutines. +/// +/// Computed from `/sched/goroutines:goroutines`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{goroutine}` | +/// | Status: | `Experimental` | +pub const GO_GOROUTINE_COUNT: &str = "go.goroutine.count"; +/// ## Description +/// Memory allocated to the heap by the application. +/// +/// Computed from `/gc/heap/allocs:bytes`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +pub const GO_MEMORY_ALLOCATED: &str = "go.memory.allocated"; +/// ## Description +/// Count of allocations to the heap by the application. +/// +/// Computed from `/gc/heap/allocs:objects`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{allocation}` | +/// | Status: | `Experimental` | +pub const GO_MEMORY_ALLOCATIONS: &str = "go.memory.allocations"; +/// ## Description +/// Heap size target for the end of the GC cycle. +/// +/// Computed from `/gc/heap/goal:bytes`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +pub const GO_MEMORY_GC_GOAL: &str = "go.memory.gc.goal"; +/// ## Description +/// 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. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +pub const GO_MEMORY_LIMIT: &str = "go.memory.limit"; +/// ## Description +/// Memory used by the Go runtime. +/// +/// Computed from `(/memory/classes/total:bytes - /memory/classes/heap/released:bytes)`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::GO_MEMORY_TYPE`] | `Recommended` +pub const GO_MEMORY_USED: &str = "go.memory.used"; +/// ## Description +/// The number of OS threads that can execute user-level Go code simultaneously. +/// +/// Computed from `/sched/gomaxprocs:threads`. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{thread}` | +/// | Status: | `Experimental` | +pub const GO_PROCESSOR_LIMIT: &str = "go.processor.limit"; +/// ## Description +/// The time goroutines have spent in the scheduler in a runnable state before actually running. +/// +/// Computed from `/sched/latencies:seconds`. Bucket boundaries are provided by the runtime, and are subject to change. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const GO_SCHEDULE_DURATION: &str = "go.schedule.duration"; +/// ## Description /// Number of active HTTP requests. /// ## Metadata /// | | | @@ -872,7 +1085,7 @@ pub const JVM_BUFFER_COUNT: &str = "jvm.buffer.count"; /// | [`crate::attribute::JVM_BUFFER_POOL_NAME`] | `Recommended` pub const JVM_BUFFER_MEMORY_LIMIT: &str = "jvm.buffer.memory.limit"; /// ## Description -/// Measure of memory used by buffers. +/// Deprecated, use `jvm.buffer.memory.used` instead. /// ## Metadata /// | | | /// |:-|:- @@ -884,8 +1097,23 @@ pub const JVM_BUFFER_MEMORY_LIMIT: &str = "jvm.buffer.memory.limit"; /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::JVM_BUFFER_POOL_NAME`] | `Recommended` +#[deprecated] pub const JVM_BUFFER_MEMORY_USAGE: &str = "jvm.buffer.memory.usage"; /// ## Description +/// Measure of memory used by buffers. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::JVM_BUFFER_POOL_NAME`] | `Recommended` +pub const JVM_BUFFER_MEMORY_USED: &str = "jvm.buffer.memory.used"; +/// ## Description /// Number of classes currently loaded. /// ## Metadata /// | | | @@ -1232,7 +1460,35 @@ pub const KESTREL_TLS_HANDSHAKE_DURATION: &str = "kestrel.tls_handshake.duration /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` pub const KESTREL_UPGRADED_CONNECTIONS: &str = "kestrel.upgraded_connections"; /// ## Description -/// Measures the duration of process operation. +/// Number of messages that were delivered to the application. +/// +/// Records the number of messages pulled from the broker or number of messages dispatched to the application in push-based scenarios. +/// The metric SHOULD be reported once per message delivery. For example, if receiving and processing operations are both instrumented for a single message delivery, this counter is incremented when the message is received and not reported when it is processed. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{message}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` +/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. +/// | [`crate::attribute::MESSAGING_CONSUMER_GROUP_NAME`] | `Conditionally required`: if applicable. +/// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +/// | [`crate::attribute::MESSAGING_DESTINATION_SUBSCRIPTION_NAME`] | `Conditionally required`: if applicable. +/// | [`crate::attribute::MESSAGING_DESTINATION_TEMPLATE`] | `Conditionally required`: if available. +/// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. +/// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` +/// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +pub const MESSAGING_CLIENT_CONSUMED_MESSAGES: &str = "messaging.client.consumed.messages"; +/// ## Description +/// Duration of messaging operation initiated by a producer or consumer client. +/// +/// This metric SHOULD NOT be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. /// ## Metadata /// | | | /// |:-|:- @@ -1243,16 +1499,22 @@ pub const KESTREL_UPGRADED_CONNECTIONS: &str = "kestrel.upgraded_connections"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` /// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. +/// | [`crate::attribute::MESSAGING_CONSUMER_GROUP_NAME`] | `Conditionally required`: if applicable. /// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +/// | [`crate::attribute::MESSAGING_DESTINATION_SUBSCRIPTION_NAME`] | `Conditionally required`: if applicable. /// | [`crate::attribute::MESSAGING_DESTINATION_TEMPLATE`] | `Conditionally required`: if available. +/// | [`crate::attribute::MESSAGING_OPERATION_TYPE`] | `Conditionally required`: If applicable. /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. /// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` -pub const MESSAGING_PROCESS_DURATION: &str = "messaging.process.duration"; +pub const MESSAGING_CLIENT_OPERATION_DURATION: &str = "messaging.client.operation.duration"; /// ## Description -/// Measures the number of processed messages. +/// Number of messages producer attempted to publish to the broker. +/// +/// This metric MUST NOT count messages that were created haven't yet been attempted to be published. /// ## Metadata /// | | | /// |:-|:- @@ -1263,6 +1525,7 @@ pub const MESSAGING_PROCESS_DURATION: &str = "messaging.process.duration"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` /// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. /// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. @@ -1270,9 +1533,11 @@ pub const MESSAGING_PROCESS_DURATION: &str = "messaging.process.duration"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. /// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` -pub const MESSAGING_PROCESS_MESSAGES: &str = "messaging.process.messages"; +pub const MESSAGING_CLIENT_PUBLISHED_MESSAGES: &str = "messaging.client.published.messages"; /// ## Description -/// Measures the duration of publish operation. +/// Duration of processing operation. +/// +/// This metric MUST be reported for operations with `messaging.operation.type` that matches `process`. /// ## Metadata /// | | | /// |:-|:- @@ -1283,16 +1548,55 @@ pub const MESSAGING_PROCESS_MESSAGES: &str = "messaging.process.messages"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` /// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. +/// | [`crate::attribute::MESSAGING_CONSUMER_GROUP_NAME`] | `Conditionally required`: if applicable. /// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +/// | [`crate::attribute::MESSAGING_DESTINATION_SUBSCRIPTION_NAME`] | `Conditionally required`: if applicable. /// | [`crate::attribute::MESSAGING_DESTINATION_TEMPLATE`] | `Conditionally required`: if available. /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. /// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +pub const MESSAGING_PROCESS_DURATION: &str = "messaging.process.duration"; +/// ## Description +/// Deprecated. Use `messaging.client.consumed.messages` instead. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{message}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. +/// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. +/// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +#[deprecated] +pub const MESSAGING_PROCESS_MESSAGES: &str = "messaging.process.messages"; +/// ## Description +/// Deprecated. Use `messaging.client.operation.duration` instead. +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` +/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. +/// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. +/// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +#[deprecated] pub const MESSAGING_PUBLISH_DURATION: &str = "messaging.publish.duration"; /// ## Description -/// Measures the number of published messages. +/// Deprecated. Use `messaging.client.produced.messages` instead. /// ## Metadata /// | | | /// |:-|:- @@ -1303,16 +1607,14 @@ pub const MESSAGING_PUBLISH_DURATION: &str = "messaging.publish.duration"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. -/// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. -/// | [`crate::attribute::MESSAGING_DESTINATION_TEMPLATE`] | `Conditionally required`: if available. /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. -/// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +#[deprecated] pub const MESSAGING_PUBLISH_MESSAGES: &str = "messaging.publish.messages"; /// ## Description -/// Measures the duration of receive operation. +/// Deprecated. Use `messaging.client.operation.duration` instead. /// ## Metadata /// | | | /// |:-|:- @@ -1323,16 +1625,14 @@ pub const MESSAGING_PUBLISH_MESSAGES: &str = "messaging.publish.messages"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. -/// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. -/// | [`crate::attribute::MESSAGING_DESTINATION_TEMPLATE`] | `Conditionally required`: if available. /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. -/// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +#[deprecated] pub const MESSAGING_RECEIVE_DURATION: &str = "messaging.receive.duration"; /// ## Description -/// Measures the number of received messages. +/// Deprecated. Use `messaging.client.consumed.messages` instead. /// ## Metadata /// | | | /// |:-|:- @@ -1343,15 +1643,101 @@ pub const MESSAGING_RECEIVE_DURATION: &str = "messaging.receive.duration"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::MESSAGING_SYSTEM`] | `Required` +/// | [`crate::attribute::MESSAGING_OPERATION_NAME`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally required`: If and only if the messaging operation has failed. -/// | [`crate::attribute::MESSAGING_DESTINATION_NAME`] | `Conditionally required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. -/// | [`crate::attribute::MESSAGING_DESTINATION_TEMPLATE`] | `Conditionally required`: if available. /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally required`: If available. -/// | [`crate::attribute::MESSAGING_DESTINATION_PARTITION_ID`] | `Unspecified` /// | [`crate::attribute::SERVER_PORT`] | `Unspecified` +#[deprecated] pub const MESSAGING_RECEIVE_MESSAGES: &str = "messaging.receive.messages"; /// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_MAX: &str = "nodejs.eventloop.delay.max"; +/// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_MEAN: &str = "nodejs.eventloop.delay.mean"; +/// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_MIN: &str = "nodejs.eventloop.delay.min"; +/// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_P50: &str = "nodejs.eventloop.delay.p50"; +/// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_P90: &str = "nodejs.eventloop.delay.p90"; +/// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_P99: &str = "nodejs.eventloop.delay.p99"; +/// ## Description +/// 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) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_DELAY_STDDEV: &str = "nodejs.eventloop.delay.stddev"; +/// ## Description +/// Event loop utilization. +/// +/// The value range is \[0.0,1.0\] and can be retrieved from value [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `1` | +/// | Status: | `Experimental` | +pub const NODEJS_EVENTLOOP_UTILIZATION: &str = "nodejs.eventloop.utilization"; +/// ## Description /// Number of times the process has been context switched. /// ## Metadata /// | | | @@ -1377,7 +1763,7 @@ pub const PROCESS_CONTEXT_SWITCHES: &str = "process.context_switches"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::PROCESS_CPU_STATE`] | `Unspecified` +/// | [`crate::attribute::CPU_MODE`] | `Unspecified` pub const PROCESS_CPU_TIME: &str = "process.cpu.time"; /// ## Description /// Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. @@ -1391,7 +1777,7 @@ pub const PROCESS_CPU_TIME: &str = "process.cpu.time"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::PROCESS_CPU_STATE`] | `Unspecified` +/// | [`crate::attribute::CPU_MODE`] | `Unspecified` pub const PROCESS_CPU_UTILIZATION: &str = "process.cpu.utilization"; /// ## Description /// Disk bytes transferred. @@ -1673,8 +2059,8 @@ pub const SYSTEM_CPU_PHYSICAL_COUNT: &str = "system.cpu.physical.count"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::CPU_MODE`] | `Unspecified` /// | [`crate::attribute::SYSTEM_CPU_LOGICAL_NUMBER`] | `Unspecified` -/// | [`crate::attribute::SYSTEM_CPU_STATE`] | `Unspecified` pub const SYSTEM_CPU_TIME: &str = "system.cpu.time"; /// ## Description /// Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs. @@ -1688,8 +2074,8 @@ pub const SYSTEM_CPU_TIME: &str = "system.cpu.time"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::CPU_MODE`] | `Unspecified` /// | [`crate::attribute::SYSTEM_CPU_LOGICAL_NUMBER`] | `Unspecified` -/// | [`crate::attribute::SYSTEM_CPU_STATE`] | `Unspecified` pub const SYSTEM_CPU_UTILIZATION: &str = "system.cpu.utilization"; /// ## Description /// . @@ -1829,6 +2215,24 @@ pub const SYSTEM_FILESYSTEM_UTILIZATION: &str = "system.filesystem.utilization"; /// | Status: | `Experimental` | pub const SYSTEM_LINUX_MEMORY_AVAILABLE: &str = "system.linux.memory.available"; /// ## Description +/// 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 `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). +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::LINUX_MEMORY_SLAB_STATE`] | `Unspecified` +pub const SYSTEM_LINUX_MEMORY_SLAB_USAGE: &str = "system.linux.memory.slab.usage"; +/// ## Description /// Total memory available in the system. /// /// Its value SHOULD equal the sum of `system.memory.state` over all states. @@ -2050,3 +2454,83 @@ pub const SYSTEM_PROCESS_COUNT: &str = "system.process.count"; /// | Unit: | `{process}` | /// | Status: | `Experimental` | pub const SYSTEM_PROCESS_CREATED: &str = "system.process.created"; +/// ## Description +/// Garbage collection duration. +/// +/// The values can be retrieve from [`perf_hooks.PerformanceObserver(...).observe({ entryTypes: ['gc'] })`](https://nodejs.org/api/perf_hooks.html#performanceobserverobserveoptions) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::V8JS_GC_TYPE`] | `Required` +pub const V8JS_GC_DURATION: &str = "v8js.gc.duration"; +/// ## Description +/// Heap space available size. +/// +/// Value can be retrieved from value `space_available_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::V8JS_HEAP_SPACE_NAME`] | `Required` +pub const V8JS_HEAP_SPACE_AVAILABLE_SIZE: &str = "v8js.heap.space.available_size"; +/// ## Description +/// Committed size of a heap space. +/// +/// Value can be retrieved from value `physical_space_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::V8JS_HEAP_SPACE_NAME`] | `Required` +pub const V8JS_HEAP_SPACE_PHYSICAL_SIZE: &str = "v8js.heap.space.physical_size"; +/// ## Description +/// Total heap memory size pre-allocated. +/// +/// The value can be retrieved from value `space_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::V8JS_HEAP_SPACE_NAME`] | `Required` +pub const V8JS_MEMORY_HEAP_LIMIT: &str = "v8js.memory.heap.limit"; +/// ## Description +/// Heap Memory size allocated. +/// +/// The value can be retrieved from value `space_used_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::V8JS_HEAP_SPACE_NAME`] | `Required` +pub const V8JS_MEMORY_HEAP_USED: &str = "v8js.memory.heap.used"; diff --git a/opentelemetry-semantic-conventions/src/resource.rs b/opentelemetry-semantic-conventions/src/resource.rs index a94e04c0b0..32da1299f5 100644 --- a/opentelemetry-semantic-conventions/src/resource.rs +++ b/opentelemetry-semantic-conventions/src/resource.rs @@ -58,7 +58,7 @@ pub use crate::attribute::CONTAINER_IMAGE_REPO_DIGESTS; pub use crate::attribute::CONTAINER_IMAGE_TAGS; pub use crate::attribute::CONTAINER_NAME; pub use crate::attribute::CONTAINER_RUNTIME; -pub use crate::attribute::DEPLOYMENT_ENVIRONMENT; +pub use crate::attribute::DEPLOYMENT_ENVIRONMENT_NAME; pub use crate::attribute::DEVICE_ID; pub use crate::attribute::DEVICE_MANUFACTURER; pub use crate::attribute::DEVICE_MODEL_IDENTIFIER; diff --git a/opentelemetry-semantic-conventions/src/trace.rs b/opentelemetry-semantic-conventions/src/trace.rs index af452467b4..2febbd3671 100644 --- a/opentelemetry-semantic-conventions/src/trace.rs +++ b/opentelemetry-semantic-conventions/src/trace.rs @@ -57,6 +57,7 @@ pub use crate::attribute::AWS_S3_DELETE; pub use crate::attribute::AWS_S3_KEY; pub use crate::attribute::AWS_S3_PART_NUMBER; pub use crate::attribute::AWS_S3_UPLOAD_ID; +pub use crate::attribute::AZ_SERVICE_REQUEST_ID; pub use crate::attribute::CLIENT_ADDRESS; pub use crate::attribute::CLIENT_PORT; pub use crate::attribute::CLOUDEVENTS_EVENT_ID; @@ -85,7 +86,6 @@ pub use crate::attribute::DB_COSMOSDB_REQUEST_CHARGE; pub use crate::attribute::DB_COSMOSDB_REQUEST_CONTENT_LENGTH; pub use crate::attribute::DB_COSMOSDB_STATUS_CODE; pub use crate::attribute::DB_COSMOSDB_SUB_STATUS_CODE; -pub use crate::attribute::DB_ELASTICSEARCH_CLUSTER_NAME; pub use crate::attribute::DB_ELASTICSEARCH_NODE_NAME; pub use crate::attribute::DB_NAMESPACE; pub use crate::attribute::DB_OPERATION_NAME; @@ -95,6 +95,7 @@ pub use crate::attribute::ENDUSER_ID; pub use crate::attribute::ENDUSER_ROLE; pub use crate::attribute::ENDUSER_SCOPE; pub use crate::attribute::ERROR_TYPE; +pub use crate::attribute::EVENT_NAME; pub use crate::attribute::EXCEPTION_ESCAPED; pub use crate::attribute::EXCEPTION_MESSAGE; pub use crate::attribute::EXCEPTION_STACKTRACE; @@ -115,17 +116,22 @@ pub use crate::attribute::FEATURE_FLAG_KEY; pub use crate::attribute::FEATURE_FLAG_PROVIDER_NAME; pub use crate::attribute::FEATURE_FLAG_VARIANT; pub use crate::attribute::GEN_AI_COMPLETION; +pub use crate::attribute::GEN_AI_OPERATION_NAME; pub use crate::attribute::GEN_AI_PROMPT; +pub use crate::attribute::GEN_AI_REQUEST_FREQUENCY_PENALTY; pub use crate::attribute::GEN_AI_REQUEST_MAX_TOKENS; pub use crate::attribute::GEN_AI_REQUEST_MODEL; +pub use crate::attribute::GEN_AI_REQUEST_PRESENCE_PENALTY; +pub use crate::attribute::GEN_AI_REQUEST_STOP_SEQUENCES; pub use crate::attribute::GEN_AI_REQUEST_TEMPERATURE; +pub use crate::attribute::GEN_AI_REQUEST_TOP_K; pub use crate::attribute::GEN_AI_REQUEST_TOP_P; pub use crate::attribute::GEN_AI_RESPONSE_FINISH_REASONS; pub use crate::attribute::GEN_AI_RESPONSE_ID; pub use crate::attribute::GEN_AI_RESPONSE_MODEL; pub use crate::attribute::GEN_AI_SYSTEM; -pub use crate::attribute::GEN_AI_USAGE_COMPLETION_TOKENS; -pub use crate::attribute::GEN_AI_USAGE_PROMPT_TOKENS; +pub use crate::attribute::GEN_AI_USAGE_INPUT_TOKENS; +pub use crate::attribute::GEN_AI_USAGE_OUTPUT_TOKENS; pub use crate::attribute::GRAPHQL_DOCUMENT; pub use crate::attribute::GRAPHQL_OPERATION_NAME; pub use crate::attribute::GRAPHQL_OPERATION_TYPE; @@ -136,9 +142,11 @@ pub use crate::attribute::HTTP_RESPONSE_STATUS_CODE; pub use crate::attribute::HTTP_ROUTE; pub use crate::attribute::MESSAGING_BATCH_MESSAGE_COUNT; pub use crate::attribute::MESSAGING_CLIENT_ID; +pub use crate::attribute::MESSAGING_CONSUMER_GROUP_NAME; pub use crate::attribute::MESSAGING_DESTINATION_ANONYMOUS; pub use crate::attribute::MESSAGING_DESTINATION_NAME; pub use crate::attribute::MESSAGING_DESTINATION_PARTITION_ID; +pub use crate::attribute::MESSAGING_DESTINATION_SUBSCRIPTION_NAME; pub use crate::attribute::MESSAGING_DESTINATION_TEMPLATE; pub use crate::attribute::MESSAGING_DESTINATION_TEMPORARY; pub use crate::attribute::MESSAGING_MESSAGE_BODY_SIZE;