From 5e7e94974d6888c5852e22cbb6b36d9f88aa247f Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Fri, 21 Mar 2025 20:14:47 +0000 Subject: [PATCH 1/4] bump semconv --- .../scripts/generate-consts-from-spec.sh | 8 +- .../templates/registry/rust/weaver.yaml | 2 +- .../src/attribute.rs | 480 ++++++++++++------ opentelemetry-semantic-conventions/src/lib.rs | 2 +- .../src/metric.rs | 424 ++++++++++++++-- .../src/resource.rs | 20 +- .../src/trace.rs | 110 ++-- 7 files changed, 750 insertions(+), 296 deletions(-) diff --git a/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh b/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh index 74c1df9d84..e9a525d56d 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.30.0 -WEAVER_VERSION=v0.12.0 +SPEC_VERSION=1.31.0 +WEAVER_VERSION=v0.13.0 cd "$CRATE_DIR" @@ -49,10 +49,6 @@ expression=' s/\\\[([^\]]+)\]\(([^)]+)\)/[\1](\2)/g ' -# TODO - remove this with semconv 1.31.0. Refer: https://github.com/open-telemetry/semantic-conventions/pull/1827 -# Fix broken and malformed K8s JobSpec link -link_fix_expression='s/\\\[K8s JobSpec\\\]\(https:\/\/kubernetes\.io\/docs\/reference\/generated\/kubernetes-api\/v1\.30\/#jobspec-v1-batch\./[K8s JobSpec](https:\/\/kubernetes\.io\/docs\/reference\/generated\/kubernetes-api\/v1\.30\/#jobspec-v1-batch)./g' - "${SED[@]}" -E "${expression}" src/metric.rs "${SED[@]}" -E "${expression}" src/attribute.rs "${SED[@]}" -E "${link_fix_expression}" src/metric.rs diff --git a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml index cda3945f94..898f487fda 100644 --- a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml +++ b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml @@ -14,7 +14,7 @@ comment_formats: default_comment_format: rust params: - schema_url: "https://opentelemetry.io/schemas/1.30.0" + schema_url: "https://opentelemetry.io/schemas/1.31.0" exclude_root_namespace: [] excluded_attributes: ["messaging.client_id"] diff --git a/opentelemetry-semantic-conventions/src/attribute.rs b/opentelemetry-semantic-conventions/src/attribute.rs index e3e6c61c22..2d0d6fc002 100644 --- a/opentelemetry-semantic-conventions/src/attribute.rs +++ b/opentelemetry-semantic-conventions/src/attribute.rs @@ -8,6 +8,18 @@ //! //! The entire set of semantic attributes (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. The resource, metric, and trace modules reference these attributes. +/// This attribute represents the state of the application. +/// +/// ## Notes +/// +/// 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. +/// +/// # Examples +/// +/// - `"created"` +#[cfg(feature = "semconv_experimental")] +pub const ANDROID_APP_STATE: &str = "android.app.state"; + /// Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). /// /// ## Notes @@ -19,13 +31,12 @@ #[cfg(feature = "semconv_experimental")] pub const ANDROID_OS_API_LEVEL: &str = "android.os.api_level"; -/// Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. +/// Deprecated. Use `android.app.state` instead. /// /// ## Notes /// /// 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 #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `device.app.lifecycle`.")] 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. @@ -950,6 +961,16 @@ pub const CICD_PIPELINE_RUN_ID: &str = "cicd.pipeline.run.id"; #[cfg(feature = "semconv_experimental")] pub const CICD_PIPELINE_RUN_STATE: &str = "cicd.pipeline.run.state"; +/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075"` +#[cfg(feature = "semconv_experimental")] +pub const CICD_PIPELINE_RUN_URL_FULL: &str = "cicd.pipeline.run.url.full"; + /// The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. /// /// ## Notes @@ -973,7 +994,7 @@ pub const CICD_PIPELINE_TASK_NAME: &str = "cicd.pipeline.task.name"; #[cfg(feature = "semconv_experimental")] pub const CICD_PIPELINE_TASK_RUN_ID: &str = "cicd.pipeline.task.run.id"; -/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. +/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. /// /// ## Notes /// @@ -1093,7 +1114,7 @@ pub const CLOUD_PROVIDER: &str = "cloud.provider"; #[cfg(feature = "semconv_experimental")] 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) +/// 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://google.aip.dev/122#full-resource-names) on GCP) /// /// ## Notes /// @@ -1355,7 +1376,6 @@ pub const CLOUDFOUNDRY_SYSTEM_INSTANCE_ID: &str = "cloudfoundry.system.instance. /// /// - `16` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `code.column.number`")] pub const CODE_COLUMN: &str = "code.column"; /// The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. @@ -1396,16 +1416,33 @@ pub const CODE_FILEPATH: &str = "code.filepath"; /// /// - `"serveRequest"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `code.function.name`")] pub const CODE_FUNCTION: &str = "code.function"; -/// The method or function name, or equivalent (usually rightmost part of the code unit's name). +/// The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. /// /// ## Notes /// +/// Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples. +/// The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in +/// `code.stacktrace` without information on arguments. +/// +/// Examples: +/// +/// - Java method: `com.example.MyHttpService.serveRequest` +/// - Java anonymous class method: `com.mycompany.Main$1.myMethod` +/// - Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod` +/// - PHP function: `GuzzleHttp\Client::transfer +/// - Go function: `github.com/my/repo/pkg.foo.func5` +/// - Elixir: `OpenTelemetry.Ctx.new` +/// - Erlang: `opentelemetry_ctx:new` +/// - Rust: `playground::my_module::my_cool_func` +/// - C function: `fopen` +/// /// # Examples /// -/// - `"serveRequest"` +/// - `"com.example.MyHttpService.serveRequest"` +/// - `"GuzzleHttp\\Client::transfer"` +/// - `"fopen"` #[cfg(feature = "semconv_experimental")] pub const CODE_FUNCTION_NAME: &str = "code.function.name"; @@ -1427,10 +1464,9 @@ pub const CODE_LINE_NUMBER: &str = "code.line.number"; /// /// - `42` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `code.line.number`")] pub const CODE_LINENO: &str = "code.lineno"; -/// The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit. +/// Deprecated, namespace is now included into `code.function.name` /// /// ## Notes /// @@ -1440,7 +1476,7 @@ pub const CODE_LINENO: &str = "code.lineno"; #[cfg(feature = "semconv_experimental")] pub const CODE_NAMESPACE: &str = "code.namespace"; -/// A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. +/// A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). /// /// ## Notes /// @@ -1495,7 +1531,6 @@ pub const CONTAINER_COMMAND_LINE: &str = "container.command_line"; /// - `"user"` /// - `"kernel"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cpu.mode`")] pub const CONTAINER_CPU_STATE: &str = "container.cpu.state"; /// The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume. @@ -1602,7 +1637,6 @@ pub const CONTAINER_LABEL: &str = "container.label"; /// /// - `"container.label.app=nginx"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `container.label`.")] pub const CONTAINER_LABELS: &str = "container.labels"; /// Container name used by container runtime. @@ -1627,6 +1661,16 @@ pub const CONTAINER_NAME: &str = "container.name"; #[cfg(feature = "semconv_experimental")] pub const CONTAINER_RUNTIME: &str = "container.runtime"; +/// The logical CPU number \[0..n-1\] +/// +/// ## Notes +/// +/// # Examples +/// +/// - `1` +#[cfg(feature = "semconv_experimental")] +pub const CPU_LOGICAL_NUMBER: &str = "cpu.logical_number"; + /// The mode of the CPU /// /// ## Notes @@ -1642,7 +1686,6 @@ pub const CPU_MODE: &str = "cpu.mode"; /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cassandra.consistency.level`.")] pub const DB_CASSANDRA_CONSISTENCY_LEVEL: &str = "db.cassandra.consistency_level"; /// Deprecated, use `cassandra.coordinator.dc` instead. @@ -1653,7 +1696,6 @@ pub const DB_CASSANDRA_CONSISTENCY_LEVEL: &str = "db.cassandra.consistency_level /// /// - `"us-west-2"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cassandra.coordinator.dc`.")] pub const DB_CASSANDRA_COORDINATOR_DC: &str = "db.cassandra.coordinator.dc"; /// Deprecated, use `cassandra.coordinator.id` instead. @@ -1664,14 +1706,12 @@ pub const DB_CASSANDRA_COORDINATOR_DC: &str = "db.cassandra.coordinator.dc"; /// /// - `"be13faa2-8574-4d71-926d-27f16cf8a7af"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cassandra.coordinator.id`.")] pub const DB_CASSANDRA_COORDINATOR_ID: &str = "db.cassandra.coordinator.id"; /// Deprecated, use `cassandra.query.idempotent` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cassandra.query.idempotent`.")] pub const DB_CASSANDRA_IDEMPOTENCE: &str = "db.cassandra.idempotence"; /// Deprecated, use `cassandra.page.size` instead. @@ -1682,7 +1722,6 @@ pub const DB_CASSANDRA_IDEMPOTENCE: &str = "db.cassandra.idempotence"; /// /// - `5000` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cassandra.page.size`.")] pub const DB_CASSANDRA_PAGE_SIZE: &str = "db.cassandra.page_size"; /// Deprecated, use `cassandra.speculative_execution.count` instead. @@ -1694,7 +1733,6 @@ pub const DB_CASSANDRA_PAGE_SIZE: &str = "db.cassandra.page_size"; /// - `0` /// - `2` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cassandra.speculative_execution.count`.")] pub const DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: &str = "db.cassandra.speculative_execution_count"; @@ -1706,7 +1744,6 @@ pub const DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: &str = /// /// - `"mytable"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.collection.name`.")] 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 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. @@ -1737,7 +1774,6 @@ pub const DB_CLIENT_CONNECTION_STATE: &str = "db.client.connection.state"; /// /// - `"myDataSource"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.pool.name`.")] pub const DB_CLIENT_CONNECTIONS_POOL_NAME: &str = "db.client.connections.pool.name"; /// Deprecated, use `db.client.connection.state` instead. @@ -1748,20 +1784,20 @@ pub const DB_CLIENT_CONNECTIONS_POOL_NAME: &str = "db.client.connections.pool.na /// /// - `"idle"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.state`.")] pub const DB_CLIENT_CONNECTIONS_STATE: &str = "db.client.connections.state"; /// The name of a collection (table, container) within the database. /// /// ## Notes /// -/// It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. +/// It is RECOMMENDED to capture the value as provided by the application +/// without attempting to do any case normalization. /// /// The collection name SHOULD NOT be extracted from `db.query.text`, -/// unless the query format is known to only ever have a single collection name present. +/// when the database system supports cross-table queries in non-batch operations. /// -/// For batch operations, if the individual operations are known to have the same collection name -/// then that collection name SHOULD be used. +/// For batch operations, if the individual operations are known to have the same +/// collection name then that collection name SHOULD be used. /// /// # Examples /// @@ -1778,7 +1814,6 @@ pub const DB_COLLECTION_NAME: &str = "db.collection.name"; /// /// - `"Server=(localdb)\\v11.0;Integrated Security=true;"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `server.address` and `server.port`.")] pub const DB_CONNECTION_STRING: &str = "db.connection_string"; /// Deprecated, use `azure.client.id` instead. @@ -1789,14 +1824,12 @@ pub const DB_CONNECTION_STRING: &str = "db.connection_string"; /// /// - `"3ba4827d-4422-483f-b59f-85b74211c11d"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.client.id`.")] pub const DB_COSMOSDB_CLIENT_ID: &str = "db.cosmosdb.client_id"; /// Deprecated, use `azure.cosmosdb.connection.mode` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.connection.mode`.")] pub const DB_COSMOSDB_CONNECTION_MODE: &str = "db.cosmosdb.connection_mode"; /// Deprecated, use `cosmosdb.consistency.level` instead. @@ -1811,7 +1844,6 @@ pub const DB_COSMOSDB_CONNECTION_MODE: &str = "db.cosmosdb.connection_mode"; /// - `"Strong"` /// - `"Session"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.consistency.level`.")] pub const DB_COSMOSDB_CONSISTENCY_LEVEL: &str = "db.cosmosdb.consistency_level"; /// Deprecated, use `db.collection.name` instead. @@ -1822,14 +1854,12 @@ pub const DB_COSMOSDB_CONSISTENCY_LEVEL: &str = "db.cosmosdb.consistency_level"; /// /// - `"mytable"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.collection.name`.")] pub const DB_COSMOSDB_CONTAINER: &str = "db.cosmosdb.container"; /// Deprecated, no replacement at this time. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "No replacement at this time.")] pub const DB_COSMOSDB_OPERATION_TYPE: &str = "db.cosmosdb.operation_type"; /// Deprecated, use `azure.cosmosdb.operation.contacted_regions` instead. @@ -1844,7 +1874,6 @@ pub const DB_COSMOSDB_OPERATION_TYPE: &str = "db.cosmosdb.operation_type"; /// "Australia Southeast", /// ]` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.operation.contacted_regions`.")] pub const DB_COSMOSDB_REGIONS_CONTACTED: &str = "db.cosmosdb.regions_contacted"; /// Deprecated, use `azure.cosmosdb.operation.request_charge` instead. @@ -1856,14 +1885,12 @@ pub const DB_COSMOSDB_REGIONS_CONTACTED: &str = "db.cosmosdb.regions_contacted"; /// - `46.18` /// - `1.0` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.operation.request_charge`.")] pub const DB_COSMOSDB_REQUEST_CHARGE: &str = "db.cosmosdb.request_charge"; /// Deprecated, use `azure.cosmosdb.request.body.size` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.request.body.size`.")] pub const DB_COSMOSDB_REQUEST_CONTENT_LENGTH: &str = "db.cosmosdb.request_content_length"; /// Deprecated, use `db.response.status_code` instead. @@ -1875,7 +1902,6 @@ pub const DB_COSMOSDB_REQUEST_CONTENT_LENGTH: &str = "db.cosmosdb.request_conten /// - `200` /// - `201` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.response.status_code`.")] pub const DB_COSMOSDB_STATUS_CODE: &str = "db.cosmosdb.status_code"; /// Deprecated, use `azure.cosmosdb.response.sub_status_code` instead. @@ -1887,7 +1913,6 @@ pub const DB_COSMOSDB_STATUS_CODE: &str = "db.cosmosdb.status_code"; /// - `1000` /// - `1002` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.response.sub_status_code`.")] pub const DB_COSMOSDB_SUB_STATUS_CODE: &str = "db.cosmosdb.sub_status_code"; /// Deprecated, use `db.namespace` instead. @@ -1898,7 +1923,6 @@ pub const DB_COSMOSDB_SUB_STATUS_CODE: &str = "db.cosmosdb.sub_status_code"; /// /// - `"e9106fc68e3044f0b1475b04bf4ffd5f"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.namespace`.")] pub const DB_ELASTICSEARCH_CLUSTER_NAME: &str = "db.elasticsearch.cluster.name"; /// Deprecated, use `elasticsearch.node.name` instead. @@ -1909,7 +1933,6 @@ pub const DB_ELASTICSEARCH_CLUSTER_NAME: &str = "db.elasticsearch.cluster.name"; /// /// - `"instance-0000000001"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `elasticsearch.node.name`.")] pub const DB_ELASTICSEARCH_NODE_NAME: &str = "db.elasticsearch.node.name"; /// Deprecated, use `db.operation.parameter` instead. @@ -1921,7 +1944,6 @@ pub const DB_ELASTICSEARCH_NODE_NAME: &str = "db.elasticsearch.node.name"; /// - `"db.elasticsearch.path_parts.index=test-index"` /// - `"db.elasticsearch.path_parts.doc_id=123"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.operation.parameter`.")] pub const DB_ELASTICSEARCH_PATH_PARTS: &str = "db.elasticsearch.path_parts"; /// Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. @@ -1932,9 +1954,6 @@ pub const DB_ELASTICSEARCH_PATH_PARTS: &str = "db.elasticsearch.path_parts"; /// /// - `"mysql-e26b99z.example.com"` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead." -)] pub const DB_INSTANCE_ID: &str = "db.instance.id"; /// Removed, no replacement at this time. @@ -1946,7 +1965,6 @@ pub const DB_INSTANCE_ID: &str = "db.instance.id"; /// - `"org.postgresql.Driver"` /// - `"com.microsoft.sqlserver.jdbc.SQLServerDriver"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Removed as not used.")] pub const DB_JDBC_DRIVER_CLASSNAME: &str = "db.jdbc.driver_classname"; /// Deprecated, use `db.collection.name` instead. @@ -1957,7 +1975,6 @@ pub const DB_JDBC_DRIVER_CLASSNAME: &str = "db.jdbc.driver_classname"; /// /// - `"mytable"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.collection.name`.")] pub const DB_MONGODB_COLLECTION: &str = "db.mongodb.collection"; /// Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute. @@ -1968,7 +1985,6 @@ pub const DB_MONGODB_COLLECTION: &str = "db.mongodb.collection"; /// /// - `"MSSQLSERVER"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, no replacement at this time.")] pub const DB_MSSQL_INSTANCE_NAME: &str = "db.mssql.instance_name"; /// Deprecated, use `db.namespace` instead. @@ -1980,7 +1996,6 @@ pub const DB_MSSQL_INSTANCE_NAME: &str = "db.mssql.instance_name"; /// - `"customers"` /// - `"main"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.namespace`.")] pub const DB_NAME: &str = "db.name"; /// The name of the database, fully qualified within the server address and port. @@ -2008,7 +2023,6 @@ pub const DB_NAMESPACE: &str = "db.namespace"; /// - `"HMSET"` /// - `"SELECT"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.operation.name`.")] pub const DB_OPERATION: &str = "db.operation"; /// The number of queries included in a batch operation. @@ -2033,7 +2047,7 @@ pub const DB_OPERATION_BATCH_SIZE: &str = "db.operation.batch.size"; /// without attempting to do any case normalization. /// /// The operation name SHOULD NOT be extracted from `db.query.text`, -/// unless the query format is known to only ever have a single operation name present. +/// when the database system supports cross-table queries in non-batch operations. /// /// 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 `, @@ -2071,7 +2085,6 @@ pub const DB_OPERATION_PARAMETER: &str = "db.operation.parameter"; /// - `"someval"` /// - `"55"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.operation.parameter`.")] pub const DB_QUERY_PARAMETER: &str = "db.query.parameter"; /// Low cardinality representation of a database query text. @@ -2079,7 +2092,7 @@ pub const DB_QUERY_PARAMETER: &str = "db.query.parameter"; /// ## Notes /// /// `db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries. -/// 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-text) section. +/// 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](../database/database-spans.md#generating-a-summary-of-the-query-text) section. /// /// # Examples /// @@ -2093,7 +2106,7 @@ pub const DB_QUERY_SUMMARY: &str = "db.query.summary"; /// /// ## Notes /// -/// For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +/// For sanitization see [Sanitization of `db.query.text`](../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. /// @@ -2114,7 +2127,6 @@ pub const DB_QUERY_TEXT: &str = "db.query.text"; /// - `1` /// - `15` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.namespace`.")] pub const DB_REDIS_DATABASE_INDEX: &str = "db.redis.database_index"; /// Number of rows returned by the operation. @@ -2153,7 +2165,6 @@ pub const DB_RESPONSE_STATUS_CODE: &str = "db.response.status_code"; /// /// - `"mytable"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.collection.name`.")] pub const DB_SQL_TABLE: &str = "db.sql.table"; /// The database statement being executed. @@ -2165,14 +2176,12 @@ pub const DB_SQL_TABLE: &str = "db.sql.table"; /// - `"SELECT * FROM wuser_table"` /// - `"SET mykey \"WuValue\""` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.query.text`.")] pub const DB_STATEMENT: &str = "db.statement"; /// Deprecated, use `db.system.name` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.system.name`.")] pub const DB_SYSTEM: &str = "db.system"; /// The database management system (DBMS) product as identified by the client instrumentation. @@ -2192,7 +2201,6 @@ pub const DB_SYSTEM_NAME: &str = "db.system.name"; /// - `"readonly_user"` /// - `"reporting_user"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "No replacement at this time.")] pub const DB_USER: &str = "db.user"; /// 'Deprecated, use `deployment.environment.name` instead.' @@ -2204,7 +2212,6 @@ pub const DB_USER: &str = "db.user"; /// - `"staging"` /// - `"production"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, use `deployment.environment.name` instead.")] pub const DEPLOYMENT_ENVIRONMENT: &str = "deployment.environment"; /// Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). @@ -2373,17 +2380,36 @@ pub const DOTNET_GC_HEAP_GENERATION: &str = "dotnet.gc.heap.generation"; #[cfg(feature = "semconv_experimental")] pub const ELASTICSEARCH_NODE_NAME: &str = "elasticsearch.node.name"; -/// Deprecated, use `user.id` instead. +/// Unique identifier of an end user in the system. It maybe a username, email address, or other identifier. /// /// ## Notes /// +/// Unique identifier of an end user in the system. +/// +/// \] \[!Warning\] +/// \] This field contains sensitive (PII) information. +/// /// # Examples /// /// - `"username"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `user.id` attribute.")] pub const ENDUSER_ID: &str = "enduser.id"; +/// Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity. +/// +/// ## Notes +/// +/// Pseudonymous identifier of an end user. +/// +/// \] \[!Warning\] +/// \] This field contains sensitive (linkable PII) information. +/// +/// # Examples +/// +/// - `"QdH5CAWJgqVT4rOr0qtumf"` +#[cfg(feature = "semconv_experimental")] +pub const ENDUSER_PSEUDO_ID: &str = "enduser.pseudo.id"; + /// Deprecated, use `user.roles` instead. /// /// ## Notes @@ -2392,7 +2418,6 @@ pub const ENDUSER_ID: &str = "enduser.id"; /// /// - `"admin"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `user.roles` attribute.")] pub const ENDUSER_ROLE: &str = "enduser.role"; /// Deprecated, no replacement at this time. @@ -2403,7 +2428,6 @@ pub const ENDUSER_ROLE: &str = "enduser.role"; /// /// - `"read:message, write:files"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Removed.")] pub const ENDUSER_SCOPE: &str = "enduser.scope"; /// Describes a class of error the operation ended with. @@ -2447,15 +2471,11 @@ pub const ERROR_TYPE: &str = "error.type"; /// - `"browser.mouse.click"` /// - `"device.app.lifecycle"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by EventName top-level field on the LogRecord")] pub const EVENT_NAME: &str = "event.name"; /// Indicates that the exception is escaping the scope of the span. /// /// ## Notes -#[deprecated( - note = "It's no longer recommended to record exceptions that are handled and do not escape the scope of a span." -)] pub const EXCEPTION_ESCAPED: &str = "exception.escaped"; /// The exception message. @@ -3022,24 +3042,51 @@ pub const GCP_GCE_INSTANCE_HOSTNAME: &str = "gcp.gce.instance.hostname"; #[cfg(feature = "semconv_experimental")] pub const GCP_GCE_INSTANCE_NAME: &str = "gcp.gce.instance.name"; -/// Deprecated, use Event API to report completions contents. +/// Free-form description of the GenAI agent provided by the application. /// /// ## Notes /// /// # Examples /// -/// - `"[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"` +/// - `"Helps with math problems"` +/// - `"Generates fiction stories"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Removed, no replacement at this time.")] -pub const GEN_AI_COMPLETION: &str = "gen_ai.completion"; +pub const GEN_AI_AGENT_DESCRIPTION: &str = "gen_ai.agent.description"; -/// The response format that is requested. +/// The unique identifier of the GenAI agent. /// /// ## Notes /// /// # Examples /// -/// - `"json"` +/// - `"asst_5j66UpCpwteGg4YSxUnt7lPY"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_AGENT_ID: &str = "gen_ai.agent.id"; + +/// Human-readable name of the GenAI agent provided by the application. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"Math Tutor"` +/// - `"Fiction Writer"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_AGENT_NAME: &str = "gen_ai.agent.name"; + +/// Deprecated, use Event API to report completions contents. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_COMPLETION: &str = "gen_ai.completion"; + +/// Deprecated, use `gen_ai.output.type`. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT: &str = "gen_ai.openai.request.response_format"; @@ -3051,7 +3098,6 @@ pub const GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT: &str = "gen_ai.openai.request.r /// /// - `100` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `gen_ai.request.seed` attribute.")] pub const GEN_AI_OPENAI_REQUEST_SEED: &str = "gen_ai.openai.request.seed"; /// The service tier requested. May be a specific tier, default, or auto. @@ -3095,6 +3141,16 @@ pub const GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT: &str = #[cfg(feature = "semconv_experimental")] pub const GEN_AI_OPERATION_NAME: &str = "gen_ai.operation.name"; +/// Represents the content type requested by the client. +/// +/// ## Notes +/// +/// This attribute SHOULD be used when the client requests output of a specific type. The model may return zero or more outputs of this type. +/// This attribute specifies the output modality and not the actual output format. For example, if an image is requested, the actual output could be a URL pointing to an image file. +/// Additional output format details may be recorded in the future in the `gen_ai.output.{type}.*` attributes +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_OUTPUT_TYPE: &str = "gen_ai.output.type"; + /// Deprecated, use Event API to report prompt contents. /// /// ## Notes @@ -3103,9 +3159,18 @@ pub const GEN_AI_OPERATION_NAME: &str = "gen_ai.operation.name"; /// /// - `"[{'role': 'user', 'content': 'What is the capital of France?'}]"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Removed, no replacement at this time.")] pub const GEN_AI_PROMPT: &str = "gen_ai.prompt"; +/// The target number of candidate completions to return. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `3` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_REQUEST_CHOICE_COUNT: &str = "gen_ai.request.choice.count"; + /// The encoding formats requested in an embeddings operation, if specified. /// /// ## Notes @@ -3286,6 +3351,44 @@ pub const GEN_AI_SYSTEM: &str = "gen_ai.system"; #[cfg(feature = "semconv_experimental")] pub const GEN_AI_TOKEN_TYPE: &str = "gen_ai.token.type"; +/// The tool call identifier. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"call_mszuSIzqtI65i1wAUOE8w5H4"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_TOOL_CALL_ID: &str = "gen_ai.tool.call.id"; + +/// Name of the tool utilized by the agent. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"Flights"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_TOOL_NAME: &str = "gen_ai.tool.name"; + +/// Type of the tool utilized by the agent +/// +/// ## Notes +/// +/// Extension: A tool executed on the agent-side to directly call external APIs, bridging the gap between the agent and real-world systems. +/// Agent-side operations involve actions that are performed by the agent on the server or within the agent's controlled environment. +/// Function: A tool executed on the client-side, where the agent generates parameters for a predefined function, and the client executes the logic. +/// Client-side operations are actions taken on the user's end or within the client application. +/// Datastore: A tool used by the agent to access and query structured or unstructured external data for retrieval-augmented tasks or knowledge updates. +/// +/// # Examples +/// +/// - `"function"` +/// - `"extension"` +/// - `"datastore"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_TOOL_TYPE: &str = "gen_ai.tool.type"; + /// Deprecated, use `gen_ai.usage.output_tokens` instead. /// /// ## Notes @@ -3294,7 +3397,6 @@ pub const GEN_AI_TOKEN_TYPE: &str = "gen_ai.token.type"; /// /// - `42` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `gen_ai.usage.output_tokens` attribute.")] pub const GEN_AI_USAGE_COMPLETION_TOKENS: &str = "gen_ai.usage.completion_tokens"; /// The number of tokens used in the GenAI input (prompt). @@ -3325,7 +3427,6 @@ pub const GEN_AI_USAGE_OUTPUT_TOKENS: &str = "gen_ai.usage.output_tokens"; /// /// - `42` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `gen_ai.usage.input_tokens` attribute.")] pub const GEN_AI_USAGE_PROMPT_TOKENS: &str = "gen_ai.usage.prompt_tokens"; /// Two-letter code representing continent’s name. @@ -3640,7 +3741,6 @@ pub const HOST_TYPE: &str = "host.type"; /// /// - `"83.164.160.102"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `client.address`.")] pub const HTTP_CLIENT_IP: &str = "http.client_ip"; /// State of the HTTP connection in the HTTP connection pool. @@ -3658,7 +3758,6 @@ pub const HTTP_CONNECTION_STATE: &str = "http.connection.state"; /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.protocol.name`.")] pub const HTTP_FLAVOR: &str = "http.flavor"; /// Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage. @@ -3669,9 +3768,6 @@ pub const HTTP_FLAVOR: &str = "http.flavor"; /// /// - `"www.example.org"` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage." -)] pub const HTTP_HOST: &str = "http.host"; /// Deprecated, use `http.request.method` instead. @@ -3684,7 +3780,6 @@ pub const HTTP_HOST: &str = "http.host"; /// - `"POST"` /// - `"HEAD"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `http.request.method`.")] pub const HTTP_METHOD: &str = "http.method"; /// The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. @@ -3777,7 +3872,6 @@ pub const HTTP_REQUEST_SIZE: &str = "http.request.size"; /// /// - `3495` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `http.request.header.`.")] pub const HTTP_REQUEST_CONTENT_LENGTH: &str = "http.request_content_length"; /// Deprecated, use `http.request.body.size` instead. @@ -3788,7 +3882,6 @@ pub const HTTP_REQUEST_CONTENT_LENGTH: &str = "http.request_content_length"; /// /// - `5493` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `http.request.body.size`.")] pub const HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: &str = "http.request_content_length_uncompressed"; @@ -3843,7 +3936,6 @@ pub const HTTP_RESPONSE_STATUS_CODE: &str = "http.response.status_code"; /// /// - `3495` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `http.response.header.`.")] pub const HTTP_RESPONSE_CONTENT_LENGTH: &str = "http.response_content_length"; /// Deprecated, use `http.response.body.size` instead. @@ -3854,7 +3946,6 @@ pub const HTTP_RESPONSE_CONTENT_LENGTH: &str = "http.response_content_length"; /// /// - `5493` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replace by `http.response.body.size`.")] pub const HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: &str = "http.response_content_length_uncompressed"; @@ -3880,7 +3971,6 @@ pub const HTTP_ROUTE: &str = "http.route"; /// - `"http"` /// - `"https"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `url.scheme` instead.")] pub const HTTP_SCHEME: &str = "http.scheme"; /// Deprecated, use `server.address` instead. @@ -3891,7 +3981,6 @@ pub const HTTP_SCHEME: &str = "http.scheme"; /// /// - `"example.com"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `server.address`.")] pub const HTTP_SERVER_NAME: &str = "http.server_name"; /// Deprecated, use `http.response.status_code` instead. @@ -3902,7 +3991,6 @@ pub const HTTP_SERVER_NAME: &str = "http.server_name"; /// /// - `200` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `http.response.status_code`.")] pub const HTTP_STATUS_CODE: &str = "http.status_code"; /// Deprecated, use `url.path` and `url.query` instead. @@ -3913,7 +4001,6 @@ pub const HTTP_STATUS_CODE: &str = "http.status_code"; /// /// - `"/search?q=OpenTelemetry#SemConv"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Split to `url.path` and `url.query.")] pub const HTTP_TARGET: &str = "http.target"; /// Deprecated, use `url.full` instead. @@ -3924,7 +4011,6 @@ pub const HTTP_TARGET: &str = "http.target"; /// /// - `"https://www.foo.bar/search?q=OpenTelemetry#SemConv"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `url.full`.")] pub const HTTP_URL: &str = "http.url"; /// Deprecated, use `user_agent.original` instead. @@ -3936,7 +4022,6 @@ pub const HTTP_URL: &str = "http.url"; /// - `"CERN-LineMode/2.15 libwww/2.17b3"` /// - `"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `user_agent.original`.")] pub const HTTP_USER_AGENT: &str = "http.user_agent"; /// An identifier for the hardware component, unique within the monitored host @@ -3983,13 +4068,20 @@ pub const HW_STATE: &str = "hw.state"; #[cfg(feature = "semconv_experimental")] pub const HW_TYPE: &str = "hw.type"; -/// Deprecated use the `device.app.lifecycle` event definition including `ios.state` as a payload field instead. +/// This attribute represents the state of the application. /// /// ## Notes /// -/// The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived +/// The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived +#[cfg(feature = "semconv_experimental")] +pub const IOS_APP_STATE: &str = "ios.app.state"; + +/// Deprecated. use the `ios.app.state` instead. +/// +/// ## Notes +/// +/// The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Moved to a payload field of `device.app.lifecycle`.")] pub const IOS_STATE: &str = "ios.state"; /// Name of the buffer pool. @@ -4198,6 +4290,26 @@ pub const K8S_DEPLOYMENT_NAME: &str = "k8s.deployment.name"; #[cfg(feature = "semconv_experimental")] pub const K8S_DEPLOYMENT_UID: &str = "k8s.deployment.uid"; +/// The name of the horizontal pod autoscaler. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"opentelemetry"` +#[cfg(feature = "semconv_experimental")] +pub const K8S_HPA_NAME: &str = "k8s.hpa.name"; + +/// The UID of the horizontal pod autoscaler. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` +#[cfg(feature = "semconv_experimental")] +pub const K8S_HPA_UID: &str = "k8s.hpa.uid"; + /// The name of the Job. /// /// ## Notes @@ -4294,7 +4406,6 @@ pub const K8S_POD_LABEL: &str = "k8s.pod.label"; /// /// - `"k8s.pod.label.app=my-app"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `k8s.pod.label`.")] pub const K8S_POD_LABELS: &str = "k8s.pod.labels"; /// The name of the Pod. @@ -4337,6 +4448,46 @@ pub const K8S_REPLICASET_NAME: &str = "k8s.replicaset.name"; #[cfg(feature = "semconv_experimental")] pub const K8S_REPLICASET_UID: &str = "k8s.replicaset.uid"; +/// The name of the replication controller. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"opentelemetry"` +#[cfg(feature = "semconv_experimental")] +pub const K8S_REPLICATIONCONTROLLER_NAME: &str = "k8s.replicationcontroller.name"; + +/// The UID of the replication controller. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` +#[cfg(feature = "semconv_experimental")] +pub const K8S_REPLICATIONCONTROLLER_UID: &str = "k8s.replicationcontroller.uid"; + +/// The name of the resource quota. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"opentelemetry"` +#[cfg(feature = "semconv_experimental")] +pub const K8S_RESOURCEQUOTA_NAME: &str = "k8s.resourcequota.name"; + +/// The UID of the resource quota. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` +#[cfg(feature = "semconv_experimental")] +pub const K8S_RESOURCEQUOTA_UID: &str = "k8s.resourcequota.uid"; + /// The name of the StatefulSet. /// /// ## Notes @@ -4465,28 +4616,24 @@ pub const LOG_RECORD_UID: &str = "log.record.uid"; /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `rpc.message.compressed_size`.")] pub const MESSAGE_COMPRESSED_SIZE: &str = "message.compressed_size"; /// Deprecated, use `rpc.message.id` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `rpc.message.id`.")] pub const MESSAGE_ID: &str = "message.id"; /// Deprecated, use `rpc.message.type` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `rpc.message.type`.")] pub const MESSAGE_TYPE: &str = "message.type"; /// Deprecated, use `rpc.message.uncompressed_size` instead. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `rpc.message.uncompressed_size`.")] pub const MESSAGE_UNCOMPRESSED_SIZE: &str = "message.uncompressed_size"; /// The number of messages sent, received, or processed in the scope of the batching operation. @@ -4591,7 +4738,6 @@ pub const MESSAGING_DESTINATION_TEMPORARY: &str = "messaging.destination.tempora /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "No replacement at this time.")] pub const MESSAGING_DESTINATION_PUBLISH_ANONYMOUS: &str = "messaging.destination_publish.anonymous"; /// Deprecated, no replacement at this time. @@ -4603,7 +4749,6 @@ pub const MESSAGING_DESTINATION_PUBLISH_ANONYMOUS: &str = "messaging.destination /// - `"MyQueue"` /// - `"MyTopic"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "No replacement at this time.")] pub const MESSAGING_DESTINATION_PUBLISH_NAME: &str = "messaging.destination_publish.name"; /// Deprecated, use `messaging.consumer.group.name` instead. @@ -4614,7 +4759,6 @@ pub const MESSAGING_DESTINATION_PUBLISH_NAME: &str = "messaging.destination_publ /// /// - `"$Default"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.consumer.group.name`.")] 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. @@ -4679,7 +4823,6 @@ pub const MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY: &str = /// /// - `"my-group"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.consumer.group.name`.")] pub const MESSAGING_KAFKA_CONSUMER_GROUP: &str = "messaging.kafka.consumer.group"; /// Deprecated, use `messaging.destination.partition.id` instead. @@ -4690,7 +4833,6 @@ pub const MESSAGING_KAFKA_CONSUMER_GROUP: &str = "messaging.kafka.consumer.group /// /// - `2` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.destination.partition.id`.")] pub const MESSAGING_KAFKA_DESTINATION_PARTITION: &str = "messaging.kafka.destination.partition"; /// Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. @@ -4713,7 +4855,6 @@ pub const MESSAGING_KAFKA_MESSAGE_KEY: &str = "messaging.kafka.message.key"; /// /// - `42` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.kafka.offset`.")] pub const MESSAGING_KAFKA_MESSAGE_OFFSET: &str = "messaging.kafka.message.offset"; /// A boolean that is true if the message is a tombstone. @@ -4788,7 +4929,6 @@ pub const MESSAGING_MESSAGE_ID: &str = "messaging.message.id"; /// - `"create"` /// - `"process"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.operation.type`.")] pub const MESSAGING_OPERATION: &str = "messaging.operation"; /// The system-specific name of the messaging operation. @@ -4840,9 +4980,6 @@ pub const MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG: &str = "messaging.rabbitmq.me /// /// - `"myConsumerGroup"` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans." -)] pub const MESSAGING_ROCKETMQ_CLIENT_GROUP: &str = "messaging.rocketmq.client_group"; /// Model of message consumption. This only applies to consumer spans. @@ -4930,7 +5067,6 @@ pub const MESSAGING_ROCKETMQ_NAMESPACE: &str = "messaging.rocketmq.namespace"; /// /// - `"subscription-a"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.destination.subscription.name`.")] pub const MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME: &str = "messaging.servicebus.destination.subscription_name"; @@ -4978,7 +5114,6 @@ pub const MESSAGING_SYSTEM: &str = "messaging.system"; /// /// - `"192.168.0.1"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.local.address`.")] pub const NET_HOST_IP: &str = "net.host.ip"; /// Deprecated, use `server.address`. @@ -4989,7 +5124,6 @@ pub const NET_HOST_IP: &str = "net.host.ip"; /// /// - `"example.com"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `server.address`.")] pub const NET_HOST_NAME: &str = "net.host.name"; /// Deprecated, use `server.port`. @@ -5000,7 +5134,6 @@ pub const NET_HOST_NAME: &str = "net.host.name"; /// /// - `8080` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `server.port`.")] pub const NET_HOST_PORT: &str = "net.host.port"; /// Deprecated, use `network.peer.address`. @@ -5011,7 +5144,6 @@ pub const NET_HOST_PORT: &str = "net.host.port"; /// /// - `"127.0.0.1"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.peer.address`.")] pub const NET_PEER_IP: &str = "net.peer.ip"; /// Deprecated, use `server.address` on client spans and `client.address` on server spans. @@ -5022,9 +5154,6 @@ pub const NET_PEER_IP: &str = "net.peer.ip"; /// /// - `"example.com"` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Replaced by `server.address` on client spans and `client.address` on server spans." -)] pub const NET_PEER_NAME: &str = "net.peer.name"; /// Deprecated, use `server.port` on client spans and `client.port` on server spans. @@ -5035,7 +5164,6 @@ pub const NET_PEER_NAME: &str = "net.peer.name"; /// /// - `8080` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `server.port` on client spans and `client.port` on server spans.")] pub const NET_PEER_PORT: &str = "net.peer.port"; /// Deprecated, use `network.protocol.name`. @@ -5048,7 +5176,6 @@ pub const NET_PEER_PORT: &str = "net.peer.port"; /// - `"http"` /// - `"mqtt"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.protocol.name`.")] pub const NET_PROTOCOL_NAME: &str = "net.protocol.name"; /// Deprecated, use `network.protocol.version`. @@ -5059,14 +5186,12 @@ pub const NET_PROTOCOL_NAME: &str = "net.protocol.name"; /// /// - `"3.1.1"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.protocol.version`.")] pub const NET_PROTOCOL_VERSION: &str = "net.protocol.version"; /// Deprecated, use `network.transport` and `network.type`. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Split to `network.transport` and `network.type`.")] pub const NET_SOCK_FAMILY: &str = "net.sock.family"; /// Deprecated, use `network.local.address`. @@ -5077,7 +5202,6 @@ pub const NET_SOCK_FAMILY: &str = "net.sock.family"; /// /// - `"/var/my.sock"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.local.address`.")] pub const NET_SOCK_HOST_ADDR: &str = "net.sock.host.addr"; /// Deprecated, use `network.local.port`. @@ -5088,7 +5212,6 @@ pub const NET_SOCK_HOST_ADDR: &str = "net.sock.host.addr"; /// /// - `8080` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.local.port`.")] pub const NET_SOCK_HOST_PORT: &str = "net.sock.host.port"; /// Deprecated, use `network.peer.address`. @@ -5099,7 +5222,6 @@ pub const NET_SOCK_HOST_PORT: &str = "net.sock.host.port"; /// /// - `"192.168.0.1"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.peer.address`.")] pub const NET_SOCK_PEER_ADDR: &str = "net.sock.peer.addr"; /// Deprecated, no replacement at this time. @@ -5110,7 +5232,6 @@ pub const NET_SOCK_PEER_ADDR: &str = "net.sock.peer.addr"; /// /// - `"/var/my.sock"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Removed.")] pub const NET_SOCK_PEER_NAME: &str = "net.sock.peer.name"; /// Deprecated, use `network.peer.port`. @@ -5121,14 +5242,12 @@ pub const NET_SOCK_PEER_NAME: &str = "net.sock.peer.name"; /// /// - `65531` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.peer.port`.")] pub const NET_SOCK_PEER_PORT: &str = "net.sock.peer.port"; /// Deprecated, use `network.transport`. /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `network.transport`.")] pub const NET_TRANSPORT: &str = "net.transport"; /// The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. @@ -5326,7 +5445,7 @@ pub const NODEJS_EVENTLOOP_STATE: &str = "nodejs.eventloop.state"; /// ## Notes /// /// Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). -/// An example can be found in [Example Image Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). +/// An example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest). /// /// # Examples /// @@ -5394,6 +5513,45 @@ pub const OS_TYPE: &str = "os.type"; #[cfg(feature = "semconv_experimental")] pub const OS_VERSION: &str = "os.version"; +/// A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. +/// +/// ## Notes +/// +/// Implementations SHOULD ensure a low cardinality for this attribute, even across application or SDK restarts. +/// E.g. implementations MUST NOT use UUIDs as values for this attribute. +/// +/// Implementations MAY achieve these goals by following a `[otel.component.type]/[instance-counter]` pattern, e.g. `batching_span_processor/0`. +/// Hereby `otel.component.type` refers to the corresponding attribute value of the component. +/// +/// The value of `instance-counter` MAY be automatically assigned by the component and uniqueness within the enclosing SDK instance MUST be guaranteed. +/// For example, `[instance-counter]` MAY be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an +/// instance of the given component type is started. +/// +/// With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0` +/// as `otel.component.name`, the second one `batching_span_processor/1` and so on. +/// These values will therefore be reused in the case of an application restart. +/// +/// # Examples +/// +/// - `"otlp_grpc_span_exporter/0"` +/// - `"custom-name"` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_COMPONENT_NAME: &str = "otel.component.name"; + +/// A name identifying the type of the OpenTelemetry component. +/// +/// ## Notes +/// +/// If none of the standardized values apply, implementations SHOULD use the language-defined name of the type. +/// E.g. for Java the fully qualified classname SHOULD be used in this case. +/// +/// # Examples +/// +/// - `"batching_span_processor"` +/// - `"com.example.MySpanExporter"` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_COMPONENT_TYPE: &str = "otel.component.type"; + /// Deprecated. Use the `otel.scope.name` attribute /// /// ## Notes @@ -5402,7 +5560,6 @@ pub const OS_VERSION: &str = "os.version"; /// /// - `"io.opentelemetry.contrib.mongodb"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Use the `otel.scope.name` attribute.")] pub const OTEL_LIBRARY_NAME: &str = "otel.library.name"; /// Deprecated. Use the `otel.scope.version` attribute. @@ -5413,7 +5570,6 @@ pub const OTEL_LIBRARY_NAME: &str = "otel.library.name"; /// /// - `"1.0.0"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Use the `otel.scope.version` attribute.")] pub const OTEL_LIBRARY_VERSION: &str = "otel.library.version"; /// The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). @@ -5434,6 +5590,12 @@ pub const OTEL_SCOPE_NAME: &str = "otel.scope.name"; /// - `"1.0.0"` pub const OTEL_SCOPE_VERSION: &str = "otel.scope.version"; +/// The result value of the sampler for this span +/// +/// ## Notes +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SPAN_SAMPLING_RESULT: &str = "otel.span.sampling_result"; + /// Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. /// /// ## Notes @@ -5456,7 +5618,6 @@ pub const OTEL_STATUS_DESCRIPTION: &str = "otel.status_description"; /// /// - `"idle"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.state`.")] pub const STATE: &str = "state"; /// The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. @@ -5477,7 +5638,6 @@ pub const PEER_SERVICE: &str = "peer.service"; /// /// - `"myDataSource"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.pool.name`.")] pub const POOL_NAME: &str = "pool.name"; /// Length of the process.command_args array @@ -5535,7 +5695,6 @@ pub const PROCESS_CONTEXT_SWITCH_TYPE: &str = "process.context_switch_type"; /// /// ## Notes #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cpu.mode`")] pub const PROCESS_CPU_STATE: &str = "process.cpu.state"; /// The date and time the process was created, in ISO 8601 format. @@ -5586,10 +5745,9 @@ pub const PROCESS_EXECUTABLE_BUILD_ID_HTLHASH: &str = "process.executable.build_ /// /// - `"600DCAFE4A110000F2BF38C493F5FB92"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `process.executable.build_id.htlhash`")] pub const PROCESS_EXECUTABLE_BUILD_ID_PROFILING: &str = "process.executable.build_id.profiling"; -/// The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. +/// The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. /// /// ## Notes /// @@ -5840,7 +5998,7 @@ pub const PROCESS_WORKING_DIRECTORY: &str = "process.working_directory"; #[cfg(feature = "semconv_experimental")] pub const PROFILE_FRAME_TYPE: &str = "profile.frame.type"; -/// The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. +/// The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. /// /// ## Notes #[cfg(feature = "semconv_experimental")] @@ -6245,7 +6403,7 @@ pub const SOURCE_ADDRESS: &str = "source.address"; #[cfg(feature = "semconv_experimental")] pub const SOURCE_PORT: &str = "source.port"; -/// The logical CPU number \[0..n-1\] +/// Deprecated, use `cpu.logical_number` instead. /// /// ## Notes /// @@ -6264,7 +6422,6 @@ pub const SYSTEM_CPU_LOGICAL_NUMBER: &str = "system.cpu.logical_number"; /// - `"idle"` /// - `"interrupt"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `cpu.mode`")] pub const SYSTEM_CPU_STATE: &str = "system.cpu.state"; /// The device identifier @@ -6336,9 +6493,6 @@ pub const SYSTEM_MEMORY_STATE: &str = "system.memory.state"; /// /// - `"close_wait"` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Removed, report network connection state with `network.connection.state` attribute" -)] pub const SYSTEM_NETWORK_STATE: &str = "system.network.state"; /// The paging access direction @@ -6389,7 +6543,6 @@ pub const SYSTEM_PROCESS_STATUS: &str = "system.process.status"; /// /// - `"running"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `system.process.status`.")] pub const SYSTEM_PROCESSES_STATUS: &str = "system.processes.status"; /// The name of the auto instrumentation agent or distribution, if used. @@ -6627,7 +6780,6 @@ pub const TLS_CLIENT_NOT_BEFORE: &str = "tls.client.not_before"; /// /// - `"opentelemetry.io"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `server.address`.")] pub const TLS_CLIENT_SERVER_NAME: &str = "tls.client.server_name"; /// Distinguished name of subject of the x.509 certificate presented by the client. @@ -6683,13 +6835,13 @@ pub const TLS_ESTABLISHED: &str = "tls.established"; #[cfg(feature = "semconv_experimental")] pub const TLS_NEXT_PROTOCOL: &str = "tls.next_protocol"; -/// Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +/// Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) /// /// ## Notes #[cfg(feature = "semconv_experimental")] pub const TLS_PROTOCOL_NAME: &str = "tls.protocol.name"; -/// Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +/// Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) /// /// ## Notes /// @@ -6947,7 +7099,7 @@ pub const URL_QUERY: &str = "url.query"; /// /// ## Notes /// -/// This value can be determined precisely with the [public suffix list](http://publicsuffix.org). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. +/// This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. /// /// # Examples /// @@ -6996,7 +7148,7 @@ pub const URL_TEMPLATE: &str = "url.template"; /// /// ## Notes /// -/// This value can be determined precisely with the [public suffix list](http://publicsuffix.org). +/// This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). /// /// # Examples /// @@ -7094,6 +7246,33 @@ pub const USER_AGENT_NAME: &str = "user_agent.name"; /// - `"YourApp/1.0.0 grpc-java-okhttp/1.27.2"` pub const USER_AGENT_ORIGINAL: &str = "user_agent.original"; +/// Human readable operating system name. +/// +/// ## Notes +/// +/// For mapping user agent strings to OS names, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized. +/// +/// # Examples +/// +/// - `"iOS"` +/// - `"Android"` +/// - `"Ubuntu"` +#[cfg(feature = "semconv_experimental")] +pub const USER_AGENT_OS_NAME: &str = "user_agent.os.name"; + +/// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +/// +/// ## Notes +/// +/// For mapping user agent strings to OS versions, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized. +/// +/// # Examples +/// +/// - `"14.2.1"` +/// - `"18.04.1"` +#[cfg(feature = "semconv_experimental")] +pub const USER_AGENT_OS_VERSION: &str = "user_agent.os.version"; + /// Specifies the category of synthetic traffic, such as tests or bots. /// /// ## Notes @@ -7303,7 +7482,6 @@ pub const VCS_REF_TYPE: &str = "vcs.ref.type"; /// /// - `"123"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, use `vcs.change.id` instead.")] pub const VCS_REPOSITORY_CHANGE_ID: &str = "vcs.repository.change.id"; /// Deprecated, use `vcs.change.title` instead. @@ -7316,7 +7494,6 @@ pub const VCS_REPOSITORY_CHANGE_ID: &str = "vcs.repository.change.id"; /// - `"feat: add my new feature"` /// - `"[chore] update dependency"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, use `vcs.change.title` instead.")] pub const VCS_REPOSITORY_CHANGE_TITLE: &str = "vcs.repository.change.title"; /// The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. @@ -7343,7 +7520,6 @@ pub const VCS_REPOSITORY_NAME: &str = "vcs.repository.name"; /// - `"my-feature-branch"` /// - `"tag-1-test"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, use `vcs.ref.head.name` instead.")] pub const VCS_REPOSITORY_REF_NAME: &str = "vcs.repository.ref.name"; /// Deprecated, use `vcs.ref.head.revision` instead. @@ -7357,7 +7533,6 @@ pub const VCS_REPOSITORY_REF_NAME: &str = "vcs.repository.ref.name"; /// - `"123"` /// - `"HEAD"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, use `vcs.ref.head.revision` instead.")] pub const VCS_REPOSITORY_REF_REVISION: &str = "vcs.repository.ref.revision"; /// Deprecated, use `vcs.ref.head.type` instead. @@ -7369,7 +7544,6 @@ pub const VCS_REPOSITORY_REF_REVISION: &str = "vcs.repository.ref.revision"; /// - `"branch"` /// - `"tag"` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Deprecated, use `vcs.ref.head.type` instead.")] pub const VCS_REPOSITORY_REF_TYPE: &str = "vcs.repository.ref.type"; /// The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. diff --git a/opentelemetry-semantic-conventions/src/lib.rs b/opentelemetry-semantic-conventions/src/lib.rs index 21a73cfcb4..3fd02e611d 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.30.0"; +pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.31.0"; diff --git a/opentelemetry-semantic-conventions/src/metric.rs b/opentelemetry-semantic-conventions/src/metric.rs index 89bb91b46a..73ddadafa6 100644 --- a/opentelemetry-semantic-conventions/src/metric.rs +++ b/opentelemetry-semantic-conventions/src/metric.rs @@ -220,7 +220,7 @@ pub const AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT: &str = /// | [`crate::attribute::AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE`] | `Conditionally_required`: when response was received and contained sub-code. /// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If available. /// | [`crate::attribute::DB_NAMESPACE`] | `Conditionally_required`: If available. -/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available. /// | [`crate::attribute::DB_RESPONSE_STATUS_CODE`] | `Conditionally_required`: If the operation failed and status code is available. /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally_required`: If and only if the operation failed. /// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` @@ -448,6 +448,59 @@ pub const CONTAINER_NETWORK_IO: &str = "container.network.io"; #[cfg(feature = "semconv_experimental")] pub const CONTAINER_UPTIME: &str = "container.uptime"; +/// ## Description +/// +/// Operating frequency of the logical CPU in Hertz +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `Hz` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::CPU_LOGICAL_NUMBER`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const CPU_FREQUENCY: &str = "cpu.frequency"; + +/// ## Description +/// +/// Seconds each logical CPU spent on each mode +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `s` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::CPU_LOGICAL_NUMBER`] | `Recommended` +/// | [`crate::attribute::CPU_MODE`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const CPU_TIME: &str = "cpu.time"; + +/// ## Description +/// +/// For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `1` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::CPU_LOGICAL_NUMBER`] | `Recommended` +/// | [`crate::attribute::CPU_MODE`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const CPU_UTILIZATION: &str = "cpu.utilization"; + /// ## Description /// /// The number of connections that are currently in state described by the `state` attribute @@ -617,9 +670,6 @@ pub const DB_CLIENT_CONNECTION_WAIT_TIME: &str = "db.client.connection.wait_time /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`." -)] pub const DB_CLIENT_CONNECTIONS_CREATE_TIME: &str = "db.client.connections.create_time"; /// ## Description @@ -637,7 +687,6 @@ pub const DB_CLIENT_CONNECTIONS_CREATE_TIME: &str = "db.client.connections.creat /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.idle.max`.")] pub const DB_CLIENT_CONNECTIONS_IDLE_MAX: &str = "db.client.connections.idle.max"; /// ## Description @@ -655,7 +704,6 @@ pub const DB_CLIENT_CONNECTIONS_IDLE_MAX: &str = "db.client.connections.idle.max /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.idle.min`.")] pub const DB_CLIENT_CONNECTIONS_IDLE_MIN: &str = "db.client.connections.idle.min"; /// ## Description @@ -673,7 +721,6 @@ pub const DB_CLIENT_CONNECTIONS_IDLE_MIN: &str = "db.client.connections.idle.min /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.max`.")] pub const DB_CLIENT_CONNECTIONS_MAX: &str = "db.client.connections.max"; /// ## Description @@ -691,7 +738,6 @@ pub const DB_CLIENT_CONNECTIONS_MAX: &str = "db.client.connections.max"; /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.pending_requests`.")] pub const DB_CLIENT_CONNECTIONS_PENDING_REQUESTS: &str = "db.client.connections.pending_requests"; /// ## Description @@ -709,7 +755,6 @@ pub const DB_CLIENT_CONNECTIONS_PENDING_REQUESTS: &str = "db.client.connections. /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.timeouts`.")] pub const DB_CLIENT_CONNECTIONS_TIMEOUTS: &str = "db.client.connections.timeouts"; /// ## Description @@ -728,7 +773,6 @@ 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` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `db.client.connection.count`.")] pub const DB_CLIENT_CONNECTIONS_USAGE: &str = "db.client.connections.usage"; /// ## Description @@ -746,9 +790,6 @@ pub const DB_CLIENT_CONNECTIONS_USAGE: &str = "db.client.connections.usage"; /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`." -)] pub const DB_CLIENT_CONNECTIONS_USE_TIME: &str = "db.client.connections.use_time"; /// ## Description @@ -766,9 +807,6 @@ pub const DB_CLIENT_CONNECTIONS_USE_TIME: &str = "db.client.connections.use_time /// |:-|:- | /// | [`crate::attribute::DB_CLIENT_CONNECTIONS_POOL_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] -#[deprecated( - note = "Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`." -)] pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_time"; /// ## Description @@ -787,7 +825,6 @@ pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_ti /// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` /// | [`crate::attribute::SERVER_PORT`] | `Conditionally_required`: If using a port other than the default port for this DBMS and if `server.address` is set. #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.client.active_instance.count`.")] pub const DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT: &str = "db.client.cosmosdb.active_instance.count"; @@ -811,7 +848,6 @@ pub const DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT: &str = /// | [`crate::attribute::DB_NAMESPACE`] | `Conditionally_required`: If available. /// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `azure.cosmosdb.client.operation.request_charge`.")] pub const DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE: &str = "db.client.cosmosdb.operation.request_charge"; @@ -832,9 +868,9 @@ pub const DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE: &str = /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If readily available and if a database call is performed on a single collection. /// | [`crate::attribute::DB_NAMESPACE`] | `Conditionally_required`: If available. -/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. /// | [`crate::attribute::DB_QUERY_SUMMARY`] | `{"recommended": "if readily available or if instrumentation supports query summarization."}` /// | [`crate::attribute::DB_QUERY_TEXT`] | `Opt_in` /// | [`crate::attribute::DB_RESPONSE_STATUS_CODE`] | `Conditionally_required`: If the operation failed and status code is available. @@ -860,9 +896,9 @@ pub const DB_CLIENT_OPERATION_DURATION: &str = "db.client.operation.duration"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If readily available and if a database call is performed on a single collection. /// | [`crate::attribute::DB_NAMESPACE`] | `Conditionally_required`: If available. -/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. /// | [`crate::attribute::DB_QUERY_SUMMARY`] | `{"recommended": "if readily available or if instrumentation supports query summarization."}` /// | [`crate::attribute::DB_QUERY_TEXT`] | `Opt_in` /// | [`crate::attribute::DB_RESPONSE_STATUS_CODE`] | `Conditionally_required`: If the operation failed and status code is available. @@ -1931,6 +1967,90 @@ pub const HW_ENERGY: &str = "hw.energy"; #[cfg(feature = "semconv_experimental")] pub const HW_ERRORS: &str = "hw.errors"; +/// ## Description +/// +/// Ambient (external) temperature of the physical host +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `Cel` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::HW_ID`] | `Required` +/// | [`crate::attribute::HW_NAME`] | `Recommended` +/// | [`crate::attribute::HW_PARENT`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const HW_HOST_AMBIENT_TEMPERATURE: &str = "hw.host.ambient_temperature"; + +/// ## Description +/// +/// Total energy consumed by the entire physical host, in joules +/// +/// ## Notes +/// +/// The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `J` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::HW_ID`] | `Required` +/// | [`crate::attribute::HW_NAME`] | `Recommended` +/// | [`crate::attribute::HW_PARENT`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const HW_HOST_ENERGY: &str = "hw.host.energy"; + +/// ## Description +/// +/// By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `Cel` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::HW_ID`] | `Required` +/// | [`crate::attribute::HW_NAME`] | `Recommended` +/// | [`crate::attribute::HW_PARENT`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const HW_HOST_HEATING_MARGIN: &str = "hw.host.heating_margin"; + +/// ## Description +/// +/// Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred) +/// +/// ## Notes +/// +/// The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `W` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::HW_ID`] | `Required` +/// | [`crate::attribute::HW_NAME`] | `Recommended` +/// | [`crate::attribute::HW_PARENT`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const HW_HOST_POWER: &str = "hw.host.power"; + /// ## Description /// /// Instantaneous power consumed by the component @@ -2029,7 +2149,6 @@ pub const JVM_BUFFER_MEMORY_LIMIT: &str = "jvm.buffer.memory.limit"; /// |:-|:- | /// | [`crate::attribute::JVM_BUFFER_POOL_NAME`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `jvm.buffer.memory.used`.")] pub const JVM_BUFFER_MEMORY_USAGE: &str = "jvm.buffer.memory.usage"; /// ## Description @@ -2419,6 +2538,9 @@ pub const K8S_DEPLOYMENT_DESIRED_PODS: &str = "k8s.deployment.desired_pods"; /// /// This metric aligns with the `currentReplicas` field of the /// [K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource /// ## Metadata /// | | | /// |:-|:- @@ -2436,6 +2558,9 @@ pub const K8S_HPA_CURRENT_PODS: &str = "k8s.hpa.current_pods"; /// /// This metric aligns with the `desiredReplicas` field of the /// [K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource /// ## Metadata /// | | | /// |:-|:- @@ -2453,6 +2578,9 @@ pub const K8S_HPA_DESIRED_PODS: &str = "k8s.hpa.desired_pods"; /// /// This metric aligns with the `maxReplicas` field of the /// [K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource /// ## Metadata /// | | | /// |:-|:- @@ -2470,6 +2598,9 @@ pub const K8S_HPA_MAX_PODS: &str = "k8s.hpa.max_pods"; /// /// This metric aligns with the `minReplicas` field of the /// [K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource /// ## Metadata /// | | | /// |:-|:- @@ -2845,12 +2976,15 @@ pub const K8S_REPLICASET_DESIRED_PODS: &str = "k8s.replicaset.desired_pods"; /// ## Description /// -/// Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller +/// Deprecated, use `k8s.replicationcontroller.available_pods` instead. /// /// ## Notes /// /// This metric aligns with the `availableReplicas` field of the /// [K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource /// ## Metadata /// | | | /// |:-|:- @@ -2863,12 +2997,15 @@ pub const K8S_REPLICATION_CONTROLLER_AVAILABLE_PODS: &str = /// ## Description /// -/// Number of desired replica pods in this replication controller +/// Deprecated, use `k8s.replicationcontroller.desired_pods` instead. /// /// ## Notes /// /// This metric aligns with the `replicas` field of the /// [K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource /// ## Metadata /// | | | /// |:-|:- @@ -2878,6 +3015,47 @@ pub const K8S_REPLICATION_CONTROLLER_AVAILABLE_PODS: &str = #[cfg(feature = "semconv_experimental")] pub const K8S_REPLICATION_CONTROLLER_DESIRED_PODS: &str = "k8s.replication_controller.desired_pods"; +/// ## Description +/// +/// Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller +/// +/// ## Notes +/// +/// This metric aligns with the `availableReplicas` field of the +/// [K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{pod}` | +/// | Status: | `Development` | +#[cfg(feature = "semconv_experimental")] +pub const K8S_REPLICATIONCONTROLLER_AVAILABLE_PODS: &str = + "k8s.replicationcontroller.available_pods"; + +/// ## Description +/// +/// Number of desired replica pods in this replication controller +/// +/// ## Notes +/// +/// This metric aligns with the `replicas` field of the +/// [K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core) +/// +/// This metric SHOULD, at a minimum, be reported against a +/// [`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{pod}` | +/// | Status: | `Development` | +#[cfg(feature = "semconv_experimental")] +pub const K8S_REPLICATIONCONTROLLER_DESIRED_PODS: &str = "k8s.replicationcontroller.desired_pods"; + /// ## Description /// /// The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision @@ -3237,7 +3415,6 @@ pub const MESSAGING_CLIENT_OPERATION_DURATION: &str = "messaging.client.operatio /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally_required`: If available. /// | [`crate::attribute::SERVER_PORT`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.client.sent.messages`.")] pub const MESSAGING_CLIENT_PUBLISHED_MESSAGES: &str = "messaging.client.published.messages"; /// ## Description @@ -3316,7 +3493,6 @@ pub const MESSAGING_PROCESS_DURATION: &str = "messaging.process.duration"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally_required`: If available. /// | [`crate::attribute::SERVER_PORT`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.client.consumed.messages`.")] pub const MESSAGING_PROCESS_MESSAGES: &str = "messaging.process.messages"; /// ## Description @@ -3337,7 +3513,6 @@ pub const MESSAGING_PROCESS_MESSAGES: &str = "messaging.process.messages"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally_required`: If available. /// | [`crate::attribute::SERVER_PORT`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.client.operation.duration`.")] pub const MESSAGING_PUBLISH_DURATION: &str = "messaging.publish.duration"; /// ## Description @@ -3358,7 +3533,6 @@ pub const MESSAGING_PUBLISH_DURATION: &str = "messaging.publish.duration"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally_required`: If available. /// | [`crate::attribute::SERVER_PORT`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.client.produced.messages`.")] pub const MESSAGING_PUBLISH_MESSAGES: &str = "messaging.publish.messages"; /// ## Description @@ -3379,7 +3553,6 @@ pub const MESSAGING_PUBLISH_MESSAGES: &str = "messaging.publish.messages"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally_required`: If available. /// | [`crate::attribute::SERVER_PORT`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.client.operation.duration`.")] pub const MESSAGING_RECEIVE_DURATION: &str = "messaging.receive.duration"; /// ## Description @@ -3400,7 +3573,6 @@ pub const MESSAGING_RECEIVE_DURATION: &str = "messaging.receive.duration"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Conditionally_required`: If available. /// | [`crate::attribute::SERVER_PORT`] | `Recommended` #[cfg(feature = "semconv_experimental")] -#[deprecated(note = "Replaced by `messaging.client.consumed.messages`.")] pub const MESSAGING_RECEIVE_MESSAGES: &str = "messaging.receive.messages"; /// ## Description @@ -3552,6 +3724,169 @@ pub const NODEJS_EVENTLOOP_TIME: &str = "nodejs.eventloop.time"; #[cfg(feature = "semconv_experimental")] pub const NODEJS_EVENTLOOP_UTILIZATION: &str = "nodejs.eventloop.utilization"; +/// ## Description +/// +/// The number of spans for which the export has finished, either successful or failed +/// +/// ## Notes +/// +/// For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` must contain the failure cause. +/// For exporters with partial success semantics (e.g. OTLP with `rejected_spans`), rejected spans must count as failed and only non-rejected spans count as success. +/// If no rejection reason is available, `rejected` SHOULD be used as value for `error.type` +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::ERROR_TYPE`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_NAME`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_TYPE`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `{"recommended": "when applicable"}` +/// | [`crate::attribute::SERVER_PORT`] | `{"recommended": "when applicable"}` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_EXPORTER_SPAN_EXPORTED_COUNT: &str = "otel.sdk.exporter.span.exported.count"; + +/// ## Description +/// +/// The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) +/// +/// ## Notes +/// +/// For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` must contain the failure cause +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::OTEL_COMPONENT_NAME`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_TYPE`] | `Recommended` +/// | [`crate::attribute::SERVER_ADDRESS`] | `{"recommended": "when applicable"}` +/// | [`crate::attribute::SERVER_PORT`] | `{"recommended": "when applicable"}` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_EXPORTER_SPAN_INFLIGHT_COUNT: &str = "otel.sdk.exporter.span.inflight.count"; + +/// ## Description +/// +/// The number of spans for which the processing has finished, either successful or failed +/// +/// ## Notes +/// +/// For successful processing, `error.type` MUST NOT be set. For failed processing, `error.type` must contain the failure cause. +/// For the SDK Simple and Batching Span Processor a span is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::ERROR_TYPE`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_NAME`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_TYPE`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_PROCESSOR_SPAN_PROCESSED_COUNT: &str = "otel.sdk.processor.span.processed.count"; + +/// ## Description +/// +/// The maximum number of spans the queue of a given instance of an SDK span processor can hold +/// +/// ## Notes +/// +/// Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::OTEL_COMPONENT_NAME`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_TYPE`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY: &str = "otel.sdk.processor.span.queue.capacity"; + +/// ## Description +/// +/// The number of spans in the queue of a given instance of an SDK span processor +/// +/// ## Notes +/// +/// Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::OTEL_COMPONENT_NAME`] | `Recommended` +/// | [`crate::attribute::OTEL_COMPONENT_TYPE`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE: &str = "otel.sdk.processor.span.queue.size"; + +/// ## Description +/// +/// The number of created spans for which the end operation was called +/// +/// ## Notes +/// +/// For spans with `recording=true`: Implementations MUST record both `otel.sdk.span.live.count` and `otel.sdk.span.ended.count`. +/// For spans with `recording=false`: If implementations decide to record this metric, they MUST also record `otel.sdk.span.live.count` +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::OTEL_SPAN_SAMPLING_RESULT`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_SPAN_ENDED_COUNT: &str = "otel.sdk.span.ended.count"; + +/// ## Description +/// +/// The number of created spans for which the end operation has not been called yet +/// +/// ## Notes +/// +/// For spans with `recording=true`: Implementations MUST record both `otel.sdk.span.live.count` and `otel.sdk.span.ended.count`. +/// For spans with `recording=false`: If implementations decide to record this metric, they MUST also record `otel.sdk.span.ended.count` +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{span}` | +/// | Status: | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::OTEL_SPAN_SAMPLING_RESULT`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const OTEL_SDK_SPAN_LIVE_COUNT: &str = "otel.sdk.span.live.count"; + /// ## Description /// /// Number of times the process has been context switched @@ -3559,7 +3894,7 @@ pub const NODEJS_EVENTLOOP_UTILIZATION: &str = "nodejs.eventloop.utilization"; /// | | | /// |:-|:- /// | Instrument: | `counter` | -/// | Unit: | `{count}` | +/// | Unit: | `{context_switch}` | /// | Status: | `Development` | /// /// ## Attributes @@ -3668,7 +4003,7 @@ pub const PROCESS_NETWORK_IO: &str = "process.network.io"; /// | | | /// |:-|:- /// | Instrument: | `updowncounter` | -/// | Unit: | `{count}` | +/// | Unit: | `{file_descriptor}` | /// | Status: | `Development` | #[cfg(feature = "semconv_experimental")] pub const PROCESS_OPEN_FILE_DESCRIPTOR_COUNT: &str = "process.open_file_descriptor.count"; @@ -3937,18 +4272,13 @@ pub const SIGNALR_SERVER_CONNECTION_DURATION: &str = "signalr.server.connection. /// ## Description /// -/// Reports the current frequency of the CPU in Hz +/// Deprecated. Use `cpu.frequency` instead /// ## Metadata /// | | | /// |:-|:- /// | Instrument: | `gauge` | /// | Unit: | `{Hz}` | /// | Status: | `Development` | -/// -/// ## Attributes -/// | Name | Requirement | -/// |:-|:- | -/// | [`crate::attribute::SYSTEM_CPU_LOGICAL_NUMBER`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_CPU_FREQUENCY: &str = "system.cpu.frequency"; @@ -3986,37 +4316,25 @@ pub const SYSTEM_CPU_PHYSICAL_COUNT: &str = "system.cpu.physical.count"; /// ## Description /// -/// Seconds each logical CPU spent on each mode +/// Deprecated. Use `cpu.time` instead /// ## Metadata /// | | | /// |:-|:- /// | Instrument: | `counter` | /// | Unit: | `s` | /// | Status: | `Development` | -/// -/// ## Attributes -/// | Name | Requirement | -/// |:-|:- | -/// | [`crate::attribute::CPU_MODE`] | `Recommended` -/// | [`crate::attribute::SYSTEM_CPU_LOGICAL_NUMBER`] | `Recommended` #[cfg(feature = "semconv_experimental")] 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 +/// Deprecated. Use `cpu.utilization` instead /// ## Metadata /// | | | /// |:-|:- /// | Instrument: | `gauge` | /// | Unit: | `1` | /// | Status: | `Development` | -/// -/// ## Attributes -/// | Name | Requirement | -/// |:-|:- | -/// | [`crate::attribute::CPU_MODE`] | `Recommended` -/// | [`crate::attribute::SYSTEM_CPU_LOGICAL_NUMBER`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_CPU_UTILIZATION: &str = "system.cpu.utilization"; diff --git a/opentelemetry-semantic-conventions/src/resource.rs b/opentelemetry-semantic-conventions/src/resource.rs index ca297d6190..6521e37778 100644 --- a/opentelemetry-semantic-conventions/src/resource.rs +++ b/opentelemetry-semantic-conventions/src/resource.rs @@ -15,7 +15,7 @@ //! //! ```rust //! use opentelemetry::KeyValue; -//! use opentelemetry_sdk::{trace::SdkTracerProvider, Resource}; +//! use opentelemetry_sdk::{trace::{config, SdkTracerProvider}, Resource}; //! use opentelemetry_semantic_conventions as semconv; //! //! let _tracer = SdkTracerProvider::builder() @@ -281,6 +281,12 @@ pub use crate::attribute::K8S_DEPLOYMENT_NAME; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::K8S_DEPLOYMENT_UID; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::K8S_HPA_NAME; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::K8S_HPA_UID; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::K8S_JOB_NAME; @@ -314,6 +320,18 @@ pub use crate::attribute::K8S_REPLICASET_NAME; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::K8S_REPLICASET_UID; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::K8S_REPLICATIONCONTROLLER_NAME; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::K8S_REPLICATIONCONTROLLER_UID; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::K8S_RESOURCEQUOTA_NAME; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::K8S_RESOURCEQUOTA_UID; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::K8S_STATEFULSET_NAME; diff --git a/opentelemetry-semantic-conventions/src/trace.rs b/opentelemetry-semantic-conventions/src/trace.rs index 7cbe6df87c..05bf10b38e 100644 --- a/opentelemetry-semantic-conventions/src/trace.rs +++ b/opentelemetry-semantic-conventions/src/trace.rs @@ -28,6 +28,9 @@ //! .start(&tracer); //! ``` +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::ANDROID_APP_STATE; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS; @@ -208,7 +211,6 @@ pub use crate::attribute::ELASTICSEARCH_NODE_NAME; pub use crate::attribute::ERROR_TYPE; -#[allow(deprecated)] pub use crate::attribute::EXCEPTION_ESCAPED; pub use crate::attribute::EXCEPTION_MESSAGE; @@ -235,9 +237,6 @@ pub use crate::attribute::FAAS_DOCUMENT_OPERATION; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::FAAS_DOCUMENT_TIME; -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::FAAS_INVOCATION_ID; - #[cfg(feature = "semconv_experimental")] pub use crate::attribute::FAAS_INVOKED_NAME; @@ -278,7 +277,13 @@ pub use crate::attribute::FEATURE_FLAG_VARIANT; pub use crate::attribute::FEATURE_FLAG_VERSION; #[cfg(feature = "semconv_experimental")] -pub use crate::attribute::GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT; +pub use crate::attribute::GEN_AI_AGENT_DESCRIPTION; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::GEN_AI_AGENT_ID; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::GEN_AI_AGENT_NAME; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_OPENAI_REQUEST_SERVICE_TIER; @@ -292,6 +297,12 @@ pub use crate::attribute::GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_OPERATION_NAME; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::GEN_AI_OUTPUT_TYPE; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::GEN_AI_REQUEST_CHOICE_COUNT; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_REQUEST_ENCODING_FORMATS; @@ -334,6 +345,12 @@ pub use crate::attribute::GEN_AI_RESPONSE_MODEL; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_SYSTEM; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::GEN_AI_TOOL_CALL_ID; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::GEN_AI_TOOL_NAME; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_USAGE_INPUT_TOKENS; @@ -376,52 +393,7 @@ pub use crate::attribute::HTTP_RESPONSE_STATUS_CODE; pub use crate::attribute::HTTP_ROUTE; #[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_BATCH_MESSAGE_COUNT; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_CLIENT_ID; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_CONSUMER_GROUP_NAME; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_DESTINATION_ANONYMOUS; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_DESTINATION_NAME; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_DESTINATION_PARTITION_ID; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_DESTINATION_SUBSCRIPTION_NAME; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_DESTINATION_TEMPLATE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_DESTINATION_TEMPORARY; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_MESSAGE_BODY_SIZE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_MESSAGE_CONVERSATION_ID; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_MESSAGE_ENVELOPE_SIZE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_MESSAGE_ID; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_OPERATION_NAME; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_OPERATION_TYPE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::MESSAGING_SYSTEM; +pub use crate::attribute::IOS_APP_STATE; pub use crate::attribute::NETWORK_LOCAL_ADDRESS; @@ -454,36 +426,6 @@ pub use crate::attribute::PROCESS_EXIT_CODE; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::PROCESS_PID; -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_CONNECT_RPC_ERROR_CODE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_CONNECT_RPC_REQUEST_METADATA; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_CONNECT_RPC_RESPONSE_METADATA; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_GRPC_REQUEST_METADATA; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_GRPC_RESPONSE_METADATA; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_GRPC_STATUS_CODE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_JSONRPC_ERROR_CODE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_JSONRPC_ERROR_MESSAGE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_JSONRPC_REQUEST_ID; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::RPC_JSONRPC_VERSION; - #[cfg(feature = "semconv_experimental")] pub use crate::attribute::RPC_MESSAGE_COMPRESSED_SIZE; @@ -509,6 +451,12 @@ pub use crate::attribute::SERVER_ADDRESS; pub use crate::attribute::SERVER_PORT; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::SESSION_ID; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::SESSION_PREVIOUS_ID; + pub use crate::attribute::URL_FULL; pub use crate::attribute::URL_PATH; From 7217551f44cff99c32fa8a5619e407920a11f7f8 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Fri, 21 Mar 2025 20:19:31 +0000 Subject: [PATCH 2/4] update changelog --- opentelemetry-semantic-conventions/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opentelemetry-semantic-conventions/CHANGELOG.md b/opentelemetry-semantic-conventions/CHANGELOG.md index b9f49349ff..00047284c7 100644 --- a/opentelemetry-semantic-conventions/CHANGELOG.md +++ b/opentelemetry-semantic-conventions/CHANGELOG.md @@ -2,6 +2,12 @@ ## vNext +## 0.29.0 + + Released 2025-Mar-21 + + - Update to [v1.31.0](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.31.0) of the semantic conventions. + ## 0.28.0 Released 2025-Feb-10 From 57689ec4711bbcc68f363977df7e6b688a03a681 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Fri, 21 Mar 2025 20:28:29 +0000 Subject: [PATCH 3/4] build error --- .../scripts/generate-consts-from-spec.sh | 2 -- .../scripts/templates/registry/rust/resource.rs.j2 | 2 +- opentelemetry-semantic-conventions/src/resource.rs | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh b/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh index e9a525d56d..d3bbea5592 100755 --- a/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh +++ b/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh @@ -51,7 +51,5 @@ expression=' "${SED[@]}" -E "${expression}" src/metric.rs "${SED[@]}" -E "${expression}" src/attribute.rs -"${SED[@]}" -E "${link_fix_expression}" src/metric.rs - cargo fmt diff --git a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 index 8189317a04..f936bea41b 100644 --- a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 +++ b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 @@ -16,7 +16,7 @@ //! //! ```rust //! use opentelemetry::KeyValue; -//! use opentelemetry_sdk::{trace::{config, SdkTracerProvider}, Resource}; +//! use opentelemetry_sdk::{trace::{SdkTracerProvider}, Resource}; //! use opentelemetry_semantic_conventions as semconv; //! //! let _tracer = SdkTracerProvider::builder() diff --git a/opentelemetry-semantic-conventions/src/resource.rs b/opentelemetry-semantic-conventions/src/resource.rs index 6521e37778..b0f0eaeb88 100644 --- a/opentelemetry-semantic-conventions/src/resource.rs +++ b/opentelemetry-semantic-conventions/src/resource.rs @@ -15,7 +15,7 @@ //! //! ```rust //! use opentelemetry::KeyValue; -//! use opentelemetry_sdk::{trace::{config, SdkTracerProvider}, Resource}; +//! use opentelemetry_sdk::{trace::{SdkTracerProvider}, Resource}; //! use opentelemetry_semantic_conventions as semconv; //! //! let _tracer = SdkTracerProvider::builder() From ccc1fe27cb08f028e6e0ef479d911aee6648d374 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Fri, 21 Mar 2025 20:30:15 +0000 Subject: [PATCH 4/4] build error --- .../scripts/templates/registry/rust/resource.rs.j2 | 2 +- opentelemetry-semantic-conventions/src/resource.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 index f936bea41b..325a82e676 100644 --- a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 +++ b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/resource.rs.j2 @@ -16,7 +16,7 @@ //! //! ```rust //! use opentelemetry::KeyValue; -//! use opentelemetry_sdk::{trace::{SdkTracerProvider}, Resource}; +//! use opentelemetry_sdk::{trace::SdkTracerProvider, Resource}; //! use opentelemetry_semantic_conventions as semconv; //! //! let _tracer = SdkTracerProvider::builder() diff --git a/opentelemetry-semantic-conventions/src/resource.rs b/opentelemetry-semantic-conventions/src/resource.rs index b0f0eaeb88..27c523b255 100644 --- a/opentelemetry-semantic-conventions/src/resource.rs +++ b/opentelemetry-semantic-conventions/src/resource.rs @@ -15,7 +15,7 @@ //! //! ```rust //! use opentelemetry::KeyValue; -//! use opentelemetry_sdk::{trace::{SdkTracerProvider}, Resource}; +//! use opentelemetry_sdk::{trace::SdkTracerProvider, Resource}; //! use opentelemetry_semantic_conventions as semconv; //! //! let _tracer = SdkTracerProvider::builder()