diff --git a/opentelemetry-semantic-conventions/CHANGELOG.md b/opentelemetry-semantic-conventions/CHANGELOG.md index c2bc9c1143..7ff44a9301 100644 --- a/opentelemetry-semantic-conventions/CHANGELOG.md +++ b/opentelemetry-semantic-conventions/CHANGELOG.md @@ -2,6 +2,9 @@ ## vNext +- Update to [v1.29.0](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.29.0) of the semantic conventions. +- Update to [v0.11.0](https://github.com/open-telemetry/weaver/releases/tag/v0.11.0) of the semantic conventions. + ## 0.27.0 Released 2024-Nov-11 diff --git a/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh b/opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh index 9861338c5f..7dd423477b 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.28.0 -WEAVER_VERSION=v0.10.0 +SPEC_VERSION=1.29.0 +WEAVER_VERSION=v0.11.0 cd "$CRATE_DIR" diff --git a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/attribute.rs.j2 b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/attribute.rs.j2 index a605d7c13f..d81f6739f8 100644 --- a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/attribute.rs.j2 +++ b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/attribute.rs.j2 @@ -11,7 +11,9 @@ {% for root_ns in ctx %} {% for attr in root_ns.attributes | rejectattr("name", "in", params.excluded_attributes) %} -{{ [attr.brief, concat_if("\n\n## Notes\n\n", attr.note), attr_macros.examples(attr)] | comment }} +{# Escape any `<...>` tags to `[...]` to avoid Rustdoc warnings and HTML parsing issues. #} +{% set safe_note = attr.note | replace('<', '[') | replace('>', ']') %} +{{ [attr.brief, concat_if("\n\n## Notes\n\n", safe_note), attr_macros.examples(attr)] | comment }} {% if attr is experimental %} #[cfg(feature = "semconv_experimental")] {% endif %} diff --git a/opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml b/opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml index 43d484bc17..e1ec32584b 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.28.0" + schema_url: "https://opentelemetry.io/schemas/1.29.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 367a6d8d34..91b70da95a 100644 --- a/opentelemetry-semantic-conventions/src/attribute.rs +++ b/opentelemetry-semantic-conventions/src/attribute.rs @@ -10,6 +10,8 @@ /// 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 +/// /// # Examples /// /// - `"33"` @@ -28,6 +30,8 @@ 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. /// +/// ## Notes +/// /// # Examples /// /// - `"golang-binary-amd64-v0.1.0.attestation"` @@ -39,6 +43,8 @@ pub const ARTIFACT_ATTESTATION_FILENAME: &str = "artifact.attestation.filename"; /// The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). /// +/// ## Notes +/// /// # Examples /// /// - `"1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408"` @@ -47,6 +53,8 @@ pub const ARTIFACT_ATTESTATION_HASH: &str = "artifact.attestation.hash"; /// The id of the build [software attestation](https://slsa.dev/attestation-model). /// +/// ## Notes +/// /// # Examples /// /// - `"123"` @@ -92,6 +100,8 @@ pub const ARTIFACT_HASH: &str = "artifact.hash"; /// The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact. /// +/// ## Notes +/// /// # Examples /// /// - `"pkg:github/package-url/purl-spec@1209109710924"` @@ -101,6 +111,8 @@ pub const ARTIFACT_PURL: &str = "artifact.purl"; /// The version of the artifact. /// +/// ## Notes +/// /// # Examples /// /// - `"v0.1.0"` @@ -111,6 +123,8 @@ pub const ARTIFACT_VERSION: &str = "artifact.version"; /// ASP.NET Core exception middleware handling result /// +/// ## Notes +/// /// # Examples /// /// - `"handled"` @@ -119,6 +133,8 @@ pub const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT: &str = "aspnetcore.diagnostic /// Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception. /// +/// ## Notes +/// /// # Examples /// /// - `"Contoso.MyHandler"` @@ -126,6 +142,8 @@ pub const ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE: &str = "aspnetcore.diagnostics.ha /// Rate limiting policy name. /// +/// ## Notes +/// /// # Examples /// /// - `"fixed"` @@ -135,6 +153,8 @@ pub const ASPNETCORE_RATE_LIMITING_POLICY: &str = "aspnetcore.rate_limiting.poli /// Rate-limiting result, shows whether the lease was acquired or contains a rejection reason /// +/// ## Notes +/// /// # Examples /// /// - `"acquired"` @@ -143,6 +163,8 @@ pub const ASPNETCORE_RATE_LIMITING_RESULT: &str = "aspnetcore.rate_limiting.resu /// Flag indicating if request was handled by the application pipeline. /// +/// ## Notes +/// /// # Examples /// /// - `true` @@ -150,6 +172,8 @@ pub const ASPNETCORE_REQUEST_IS_UNHANDLED: &str = "aspnetcore.request.is_unhandl /// A value that indicates whether the matched route is a fallback route. /// +/// ## Notes +/// /// # Examples /// /// - `true` @@ -157,6 +181,8 @@ pub const ASPNETCORE_ROUTING_IS_FALLBACK: &str = "aspnetcore.routing.is_fallback /// Match result - success or failure /// +/// ## Notes +/// /// # Examples /// /// - `"success"` @@ -165,6 +191,8 @@ pub const ASPNETCORE_ROUTING_MATCH_STATUS: &str = "aspnetcore.routing.match_stat /// The JSON-serialized value of each item in the `AttributeDefinitions` request field. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -175,6 +203,8 @@ pub const AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: &str = "aws.dynamodb.attribute_def /// The value of the `AttributesToGet` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -184,12 +214,16 @@ pub const AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: &str = "aws.dynamodb.attribute_def #[cfg(feature = "semconv_experimental")] pub const AWS_DYNAMODB_ATTRIBUTES_TO_GET: &str = "aws.dynamodb.attributes_to_get"; -/// The value of the `ConsistentRead` request parameter +/// The value of the `ConsistentRead` request parameter. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const AWS_DYNAMODB_CONSISTENT_READ: &str = "aws.dynamodb.consistent_read"; /// The JSON-serialized value of each item in the `ConsumedCapacity` response field. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -200,6 +234,8 @@ pub const AWS_DYNAMODB_CONSUMED_CAPACITY: &str = "aws.dynamodb.consumed_capacity /// The value of the `Count` response parameter. /// +/// ## Notes +/// /// # Examples /// /// - `10` @@ -208,6 +244,8 @@ pub const AWS_DYNAMODB_COUNT: &str = "aws.dynamodb.count"; /// The value of the `ExclusiveStartTableName` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `"Users"` @@ -217,6 +255,8 @@ pub const AWS_DYNAMODB_EXCLUSIVE_START_TABLE: &str = "aws.dynamodb.exclusive_sta /// The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -228,6 +268,8 @@ pub const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: &str = /// The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -238,6 +280,8 @@ pub const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: &str = "aws.dynamodb.global_sec /// The value of the `IndexName` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `"name_to_group"` @@ -246,6 +290,8 @@ pub const AWS_DYNAMODB_INDEX_NAME: &str = "aws.dynamodb.index_name"; /// The JSON-serialized value of the `ItemCollectionMetrics` response field. /// +/// ## Notes +/// /// # Examples /// /// - `"{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob, \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" : \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\": \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }"` @@ -254,6 +300,8 @@ pub const AWS_DYNAMODB_ITEM_COLLECTION_METRICS: &str = "aws.dynamodb.item_collec /// The value of the `Limit` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `10` @@ -262,6 +310,8 @@ pub const AWS_DYNAMODB_LIMIT: &str = "aws.dynamodb.limit"; /// The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -272,6 +322,8 @@ pub const AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: &str = "aws.dynamodb.local_secon /// The value of the `ProjectionExpression` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `"Title"` @@ -282,6 +334,8 @@ pub const AWS_DYNAMODB_PROJECTION: &str = "aws.dynamodb.projection"; /// The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `1.0` @@ -291,6 +345,8 @@ pub const AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: &str = "aws.dynamodb.provision /// The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `1.0` @@ -298,12 +354,16 @@ pub const AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: &str = "aws.dynamodb.provision #[cfg(feature = "semconv_experimental")] pub const AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: &str = "aws.dynamodb.provisioned_write_capacity"; -/// The value of the `ScanIndexForward` request parameter +/// The value of the `ScanIndexForward` request parameter. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const AWS_DYNAMODB_SCAN_FORWARD: &str = "aws.dynamodb.scan_forward"; /// The value of the `ScannedCount` response parameter. /// +/// ## Notes +/// /// # Examples /// /// - `50` @@ -312,6 +372,8 @@ pub const AWS_DYNAMODB_SCANNED_COUNT: &str = "aws.dynamodb.scanned_count"; /// The value of the `Segment` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `10` @@ -320,6 +382,8 @@ pub const AWS_DYNAMODB_SEGMENT: &str = "aws.dynamodb.segment"; /// The value of the `Select` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `"ALL_ATTRIBUTES"` @@ -329,6 +393,8 @@ pub const AWS_DYNAMODB_SELECT: &str = "aws.dynamodb.select"; /// The number of items in the `TableNames` response parameter. /// +/// ## Notes +/// /// # Examples /// /// - `20` @@ -337,6 +403,8 @@ pub const AWS_DYNAMODB_TABLE_COUNT: &str = "aws.dynamodb.table_count"; /// The keys in the `RequestItems` object field. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -348,6 +416,8 @@ pub const AWS_DYNAMODB_TABLE_NAMES: &str = "aws.dynamodb.table_names"; /// The value of the `TotalSegments` request parameter. /// +/// ## Notes +/// /// # Examples /// /// - `100` @@ -356,6 +426,8 @@ pub const AWS_DYNAMODB_TOTAL_SEGMENTS: &str = "aws.dynamodb.total_segments"; /// The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). /// +/// ## Notes +/// /// # Examples /// /// - `"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"` @@ -364,18 +436,24 @@ pub const AWS_ECS_CLUSTER_ARN: &str = "aws.ecs.cluster.arn"; /// The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). /// +/// ## Notes +/// /// # Examples /// /// - `"arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9"` #[cfg(feature = "semconv_experimental")] pub const AWS_ECS_CONTAINER_ARN: &str = "aws.ecs.container.arn"; -/// The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task +/// The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const AWS_ECS_LAUNCHTYPE: &str = "aws.ecs.launchtype"; /// The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). /// +/// ## Notes +/// /// # Examples /// /// - `"arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b"` @@ -385,6 +463,8 @@ pub const AWS_ECS_TASK_ARN: &str = "aws.ecs.task.arn"; /// The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry-family"` @@ -393,6 +473,8 @@ pub const AWS_ECS_TASK_FAMILY: &str = "aws.ecs.task.family"; /// The ID of a running ECS task. The ID MUST be extracted from `task.arn`. /// +/// ## Notes +/// /// # Examples /// /// - `"10838bed-421f-43ef-870a-f43feacbbb5b"` @@ -402,6 +484,8 @@ pub const AWS_ECS_TASK_ID: &str = "aws.ecs.task.id"; /// The revision for the task definition used to create the ECS task. /// +/// ## Notes +/// /// # Examples /// /// - `"8"` @@ -411,6 +495,8 @@ pub const AWS_ECS_TASK_REVISION: &str = "aws.ecs.task.revision"; /// The ARN of an EKS cluster. /// +/// ## Notes +/// /// # Examples /// /// - `"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"` @@ -474,6 +560,8 @@ pub const AWS_LOG_STREAM_ARNS: &str = "aws.log.stream.arns"; /// The name(s) of the AWS log stream(s) an application is writing to. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -484,6 +572,8 @@ pub const AWS_LOG_STREAM_NAMES: &str = "aws.log.stream.names"; /// The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. /// +/// ## Notes +/// /// # Examples /// /// - `"79b9da39-b7ae-508a-a6bc-864b2829c622"` @@ -599,6 +689,8 @@ pub const AWS_S3_UPLOAD_ID: &str = "aws.s3.upload_id"; /// [Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. /// +/// ## Notes +/// /// # Examples /// /// - `"Microsoft.Storage"` @@ -609,6 +701,8 @@ pub const AZ_NAMESPACE: &str = "az.namespace"; /// The unique identifier of the service request. It's generated by the Azure service and returned with the response. /// +/// ## Notes +/// /// # Examples /// /// - `"00000000-0000-0000-0000-000000000000"` @@ -671,6 +765,8 @@ pub const BROWSER_PLATFORM: &str = "browser.platform"; /// The human readable name of the pipeline within a CI/CD system. /// +/// ## Notes +/// /// # Examples /// /// - `"Build and Test"` @@ -682,13 +778,17 @@ pub const CICD_PIPELINE_NAME: &str = "cicd.pipeline.name"; /// The unique identifier of a pipeline run within a CI/CD system. /// +/// ## Notes +/// /// # Examples /// /// - `"120912"` #[cfg(feature = "semconv_experimental")] pub const CICD_PIPELINE_RUN_ID: &str = "cicd.pipeline.run.id"; -/// The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. +/// 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 /// /// # Examples /// @@ -701,13 +801,17 @@ pub const CICD_PIPELINE_TASK_NAME: &str = "cicd.pipeline.task.name"; /// The unique identifier of a task run within a pipeline. /// +/// ## Notes +/// /// # Examples /// /// - `"12097"` #[cfg(feature = "semconv_experimental")] pub const CICD_PIPELINE_TASK_RUN_ID: &str = "cicd.pipeline.task.run.id"; -/// The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. +/// 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 /// @@ -717,6 +821,8 @@ pub const CICD_PIPELINE_TASK_RUN_URL_FULL: &str = "cicd.pipeline.task.run.url.fu /// The type of the task within a pipeline. /// +/// ## Notes +/// /// # Examples /// /// - `"build"` @@ -751,6 +857,8 @@ pub const CLIENT_PORT: &str = "client.port"; /// The cloud account ID the resource is assigned to. /// +/// ## Notes +/// /// # Examples /// /// - `"111111111111"` @@ -778,7 +886,9 @@ pub const CLOUD_AVAILABILITY_ZONE: &str = "cloud.availability_zone"; #[cfg(feature = "semconv_experimental")] pub const CLOUD_PLATFORM: &str = "cloud.platform"; -/// Name of the cloud provider +/// Name of the cloud provider. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const CLOUD_PROVIDER: &str = "cloud.provider"; @@ -813,7 +923,7 @@ pub const CLOUD_REGION: &str = "cloud.region"; /// - **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) /// - **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, /// *not* the function app, having the form -/// `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. +/// `/subscriptions/[SUBSCRIPTION_GUID]/resourceGroups/[RG]/providers/Microsoft.Web/sites/[FUNCAPP]/functions/[FUNC]`. /// This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share /// a TracerProvider. /// @@ -827,6 +937,8 @@ pub const CLOUD_RESOURCE_ID: &str = "cloud.resource_id"; /// The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. /// +/// ## Notes +/// /// # Examples /// /// - `"123e4567-e89b-12d3-a456-426614174000"` @@ -836,6 +948,8 @@ pub const CLOUDEVENTS_EVENT_ID: &str = "cloudevents.event_id"; /// The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. /// +/// ## Notes +/// /// # Examples /// /// - `"https://github.com/cloudevents"` @@ -846,6 +960,8 @@ pub const CLOUDEVENTS_EVENT_SOURCE: &str = "cloudevents.event_source"; /// The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. /// +/// ## Notes +/// /// # Examples /// /// - `"1.0"` @@ -854,6 +970,8 @@ pub const CLOUDEVENTS_EVENT_SPEC_VERSION: &str = "cloudevents.event_spec_version /// The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). /// +/// ## Notes +/// /// # Examples /// /// - `"mynewfile.jpg"` @@ -862,6 +980,8 @@ pub const CLOUDEVENTS_EVENT_SUBJECT: &str = "cloudevents.event_subject"; /// The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. /// +/// ## Notes +/// /// # Examples /// /// - `"com.github.pull_request.opened"` @@ -875,7 +995,7 @@ pub const CLOUDEVENTS_EVENT_TYPE: &str = "cloudevents.event_type"; /// /// Application instrumentation should use the value from environment /// variable `VCAP_APPLICATION.application_id`. This is the same value as -/// reported by `cf app --guid`. +/// reported by `cf app [app-name] --guid`. /// /// # Examples /// @@ -887,7 +1007,7 @@ pub const CLOUDFOUNDRY_APP_ID: &str = "cloudfoundry.app.id"; /// /// ## Notes /// -/// CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +/// CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). /// It is used for logs and metrics emitted by CloudFoundry. It is /// supposed to contain the application instance index for applications /// deployed on the runtime. @@ -922,7 +1042,7 @@ pub const CLOUDFOUNDRY_APP_NAME: &str = "cloudfoundry.app.name"; /// /// Application instrumentation should use the value from environment /// variable `VCAP_APPLICATION.org_id`. This is the same value as -/// reported by `cf org --guid`. +/// reported by `cf org [org-name] --guid`. /// /// # Examples /// @@ -979,7 +1099,7 @@ pub const CLOUDFOUNDRY_PROCESS_TYPE: &str = "cloudfoundry.process.type"; /// /// Application instrumentation should use the value from environment /// variable `VCAP_APPLICATION.space_id`. This is the same value as -/// reported by `cf space --guid`. +/// reported by `cf space [space-name] --guid`. /// /// # Examples /// @@ -1041,6 +1161,8 @@ pub const CLOUDFOUNDRY_SYSTEM_INSTANCE_ID: &str = "cloudfoundry.system.instance. /// The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. /// +/// ## Notes +/// /// # Examples /// /// - `16` @@ -1049,6 +1171,8 @@ pub const CODE_COLUMN: &str = "code.column"; /// The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). /// +/// ## Notes +/// /// # Examples /// /// - `"/usr/local/MyApplication/content_root/app/index.php"` @@ -1057,6 +1181,8 @@ pub const CODE_FILEPATH: &str = "code.filepath"; /// The method or function name, or equivalent (usually rightmost part of the code unit's name). /// +/// ## Notes +/// /// # Examples /// /// - `"serveRequest"` @@ -1065,6 +1191,8 @@ pub const CODE_FUNCTION: &str = "code.function"; /// The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. /// +/// ## Notes +/// /// # Examples /// /// - `42` @@ -1073,6 +1201,8 @@ pub const CODE_LINENO: &str = "code.lineno"; /// The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. /// +/// ## Notes +/// /// # Examples /// /// - `"com.example.MyHttpService"` @@ -1081,6 +1211,8 @@ 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. /// +/// ## Notes +/// /// # Examples /// /// - `"at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\n"` @@ -1101,6 +1233,8 @@ pub const CONTAINER_COMMAND: &str = "container.command"; /// All the command arguments (including the command/executable itself) run by the container. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -1113,6 +1247,8 @@ pub const CONTAINER_COMMAND_ARGS: &str = "container.command_args"; /// The full command run by the container as a single string representing the full command. /// +/// ## Notes +/// /// # Examples /// /// - `"otelcontribcol --config config.yaml"` @@ -1121,6 +1257,8 @@ pub const CONTAINER_COMMAND_LINE: &str = "container.command_line"; /// Deprecated, use `cpu.mode` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"user"` @@ -1155,6 +1293,8 @@ pub const CONTAINER_CSI_VOLUME_ID: &str = "container.csi.volume.id"; /// Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. /// +/// ## Notes +/// /// # Examples /// /// - `"a3bf90e006b2"` @@ -1177,6 +1317,8 @@ pub const CONTAINER_IMAGE_ID: &str = "container.image.id"; /// Name of the image the container was built on. /// +/// ## Notes +/// /// # Examples /// /// - `"gcr.io/opentelemetry/operator"` @@ -1200,6 +1342,8 @@ pub const CONTAINER_IMAGE_REPO_DIGESTS: &str = "container.image.repo_digests"; /// Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -1211,6 +1355,8 @@ pub const CONTAINER_IMAGE_TAGS: &str = "container.image.tags"; /// Container labels, `` being the label name, the value being the label value. /// +/// ## Notes +/// /// # Examples /// /// - `"container.label.app=nginx"` @@ -1219,6 +1365,8 @@ pub const CONTAINER_LABEL: &str = "container.label"; /// Deprecated, use `container.label` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"container.label.app=nginx"` @@ -1228,6 +1376,8 @@ pub const CONTAINER_LABELS: &str = "container.labels"; /// Container name used by container runtime. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry-autoconf"` @@ -1236,6 +1386,8 @@ pub const CONTAINER_NAME: &str = "container.name"; /// The container runtime managing this container. /// +/// ## Notes +/// /// # Examples /// /// - `"docker"` @@ -1246,6 +1398,8 @@ pub const CONTAINER_RUNTIME: &str = "container.runtime"; /// The mode of the CPU /// +/// ## Notes +/// /// # Examples /// /// - `"user"` @@ -1253,12 +1407,16 @@ pub const CONTAINER_RUNTIME: &str = "container.runtime"; #[cfg(feature = "semconv_experimental")] pub const CPU_MODE: &str = "cpu.mode"; -/// The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html) +/// The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const DB_CASSANDRA_CONSISTENCY_LEVEL: &str = "db.cassandra.consistency_level"; /// The data center of the coordinating node for a query. /// +/// ## Notes +/// /// # Examples /// /// - `"us-west-2"` @@ -1267,18 +1425,24 @@ pub const DB_CASSANDRA_COORDINATOR_DC: &str = "db.cassandra.coordinator.dc"; /// The ID of the coordinating node for a query. /// +/// ## Notes +/// /// # Examples /// /// - `"be13faa2-8574-4d71-926d-27f16cf8a7af"` #[cfg(feature = "semconv_experimental")] pub const DB_CASSANDRA_COORDINATOR_ID: &str = "db.cassandra.coordinator.id"; -/// Whether or not the query is idempotent +/// Whether or not the query is idempotent. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const DB_CASSANDRA_IDEMPOTENCE: &str = "db.cassandra.idempotence"; /// The fetch size used for paging, i.e. how many rows will be returned at once. /// +/// ## Notes +/// /// # Examples /// /// - `5000` @@ -1287,6 +1451,8 @@ pub const DB_CASSANDRA_PAGE_SIZE: &str = "db.cassandra.page_size"; /// The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. /// +/// ## Notes +/// /// # Examples /// /// - `0` @@ -1297,6 +1463,8 @@ pub const DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: &str = /// Deprecated, use `db.collection.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"mytable"` @@ -1306,6 +1474,8 @@ 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. /// +/// ## Notes +/// /// # Examples /// /// - `"myDataSource"` @@ -1314,6 +1484,8 @@ pub const DB_CLIENT_CONNECTION_POOL_NAME: &str = "db.client.connection.pool.name /// The state of a connection in the pool /// +/// ## Notes +/// /// # Examples /// /// - `"idle"` @@ -1322,6 +1494,8 @@ pub const DB_CLIENT_CONNECTION_STATE: &str = "db.client.connection.state"; /// Deprecated, use `db.client.connection.pool.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"myDataSource"` @@ -1331,6 +1505,8 @@ pub const DB_CLIENT_CONNECTIONS_POOL_NAME: &str = "db.client.connections.pool.na /// Deprecated, use `db.client.connection.state` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"idle"` @@ -1343,8 +1519,13 @@ pub const DB_CLIENT_CONNECTIONS_STATE: &str = "db.client.connections.state"; /// ## Notes /// /// It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. -/// If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. -/// For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +/// +/// 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. +/// +/// For batch operations, if the individual operations are known to have the same collection name +/// then that collection name SHOULD be used. +/// /// This attribute has stability level RELEASE CANDIDATE. /// /// # Examples @@ -1356,6 +1537,8 @@ pub const DB_COLLECTION_NAME: &str = "db.collection.name"; /// Deprecated, use `server.address`, `server.port` attributes instead. /// +/// ## Notes +/// /// # Examples /// /// - `"Server=(localdb)\\v11.0;Integrated Security=true;"` @@ -1365,18 +1548,38 @@ pub const DB_CONNECTION_STRING: &str = "db.connection_string"; /// Unique Cosmos client instance id. /// +/// ## Notes +/// /// # Examples /// /// - `"3ba4827d-4422-483f-b59f-85b74211c11d"` #[cfg(feature = "semconv_experimental")] pub const DB_COSMOSDB_CLIENT_ID: &str = "db.cosmosdb.client_id"; -/// Cosmos client connection mode +/// Cosmos client connection mode. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const DB_COSMOSDB_CONNECTION_MODE: &str = "db.cosmosdb.connection_mode"; +/// Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"Eventual"` +/// - `"ConsistentPrefix"` +/// - `"BoundedStaleness"` +/// - `"Strong"` +/// - `"Session"` +#[cfg(feature = "semconv_experimental")] +pub const DB_COSMOSDB_CONSISTENCY_LEVEL: &str = "db.cosmosdb.consistency_level"; + /// Deprecated, use `db.collection.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"mytable"` @@ -1384,11 +1587,32 @@ pub const DB_COSMOSDB_CONNECTION_MODE: &str = "db.cosmosdb.connection_mode"; #[deprecated(note = "Replaced by `db.collection.name`.")] pub const DB_COSMOSDB_CONTAINER: &str = "db.cosmosdb.container"; -/// Cosmos DB Operation Type +/// 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"; -/// RU consumed for that operation +/// List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. +/// +/// ## Notes +/// +/// Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location) +/// +/// # Examples +/// +/// - `[ +/// "North Central US", +/// "Australia East", +/// "Australia Southeast", +/// ]` +#[cfg(feature = "semconv_experimental")] +pub const DB_COSMOSDB_REGIONS_CONTACTED: &str = "db.cosmosdb.regions_contacted"; + +/// Request units consumed for the operation. +/// +/// ## Notes /// /// # Examples /// @@ -1397,12 +1621,16 @@ pub const DB_COSMOSDB_OPERATION_TYPE: &str = "db.cosmosdb.operation_type"; #[cfg(feature = "semconv_experimental")] pub const DB_COSMOSDB_REQUEST_CHARGE: &str = "db.cosmosdb.request_charge"; -/// Request payload size in bytes +/// Request payload size in bytes. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const DB_COSMOSDB_REQUEST_CONTENT_LENGTH: &str = "db.cosmosdb.request_content_length"; /// Deprecated, use `db.response.status_code` instead. /// +/// ## Notes +/// /// # Examples /// /// - `200` @@ -1413,6 +1641,8 @@ pub const DB_COSMOSDB_STATUS_CODE: &str = "db.cosmosdb.status_code"; /// Cosmos DB sub status code. /// +/// ## Notes +/// /// # Examples /// /// - `1000` @@ -1422,6 +1652,8 @@ pub const DB_COSMOSDB_SUB_STATUS_CODE: &str = "db.cosmosdb.sub_status_code"; /// Deprecated, use `db.namespace` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"e9106fc68e3044f0b1475b04bf4ffd5f"` @@ -1431,6 +1663,8 @@ pub const DB_ELASTICSEARCH_CLUSTER_NAME: &str = "db.elasticsearch.cluster.name"; /// Represents the human-readable identifier of the node/instance to which a request was routed. /// +/// ## Notes +/// /// # Examples /// /// - `"instance-0000000001"` @@ -1441,7 +1675,7 @@ pub const DB_ELASTICSEARCH_NODE_NAME: &str = "db.elasticsearch.node.name"; /// /// ## Notes /// -/// Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. +/// Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.[key]`, where `[key]` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. /// /// # Examples /// @@ -1452,6 +1686,8 @@ 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. /// +/// ## Notes +/// /// # Examples /// /// - `"mysql-e26b99z.example.com"` @@ -1463,6 +1699,8 @@ pub const DB_INSTANCE_ID: &str = "db.instance.id"; /// Removed, no replacement at this time. /// +/// ## Notes +/// /// # Examples /// /// - `"org.postgresql.Driver"` @@ -1473,6 +1711,8 @@ pub const DB_JDBC_DRIVER_CLASSNAME: &str = "db.jdbc.driver_classname"; /// Deprecated, use `db.collection.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"mytable"` @@ -1482,6 +1722,8 @@ pub const DB_MONGODB_COLLECTION: &str = "db.mongodb.collection"; /// Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute. /// +/// ## Notes +/// /// # Examples /// /// - `"MSSQLSERVER"` @@ -1491,6 +1733,8 @@ pub const DB_MSSQL_INSTANCE_NAME: &str = "db.mssql.instance_name"; /// Deprecated, use `db.namespace` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"customers"` @@ -1517,6 +1761,8 @@ pub const DB_NAMESPACE: &str = "db.namespace"; /// Deprecated, use `db.operation.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"findAndModify"` @@ -1545,9 +1791,17 @@ pub const DB_OPERATION_BATCH_SIZE: &str = "db.operation.batch.size"; /// /// ## Notes /// -/// It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. -/// If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. -/// For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +/// It is RECOMMENDED to capture the value as provided by the application +/// 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. +/// +/// For batch operations, if the individual operations are known to have the same operation name +/// then that operation name SHOULD be used prepended by `BATCH `, +/// otherwise `db.operation.name` SHOULD be `BATCH` or some other database +/// system specific term if more applicable. +/// /// This attribute has stability level RELEASE CANDIDATE. /// /// # Examples @@ -1558,12 +1812,12 @@ pub const DB_OPERATION_BATCH_SIZE: &str = "db.operation.batch.size"; #[cfg(feature = "semconv_experimental")] pub const DB_OPERATION_NAME: &str = "db.operation.name"; -/// A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. +/// A database operation parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value. /// /// ## Notes /// -/// Query parameters should only be captured when `db.query.text` is parameterized with placeholders. -/// If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +/// If a parameter has no name and instead is referenced only by index, then `[key]` SHOULD be the 0-based index. +/// If `db.query.text` is also captured, then `db.operation.parameter.[key]` SHOULD match up with the parameterized placeholders present in `db.query.text`. /// This attribute has stability level RELEASE CANDIDATE. /// /// # Examples @@ -1571,25 +1825,55 @@ pub const DB_OPERATION_NAME: &str = "db.operation.name"; /// - `"someval"` /// - `"55"` #[cfg(feature = "semconv_experimental")] +pub const DB_OPERATION_PARAMETER: &str = "db.operation.parameter"; + +/// A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"someval"` +/// - `"55"` +#[cfg(feature = "semconv_experimental")] +#[deprecated(note = "Replaced by `db.operation.parameter`.")] pub const DB_QUERY_PARAMETER: &str = "db.query.parameter"; -/// The database query being executed. +/// Low cardinality representation of a database query text. /// /// ## Notes /// -/// For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). -/// For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. -/// Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +/// `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. /// This attribute has stability level RELEASE CANDIDATE. /// /// # Examples /// -/// - `"SELECT * FROM wuser_table where username = ?"` -/// - `"SET mykey \"WuValue\""` +/// - `"SELECT wuser_table"` +/// - `"INSERT shipping_details SELECT orders"` +/// - `"get user by id"` #[cfg(feature = "semconv_experimental")] -pub const DB_QUERY_TEXT: &str = "db.query.text"; +pub const DB_QUERY_SUMMARY: &str = "db.query.summary"; -/// Deprecated, use `db.namespace` instead. +/// The database query being executed. +/// +/// ## Notes +/// +/// For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +/// For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. +/// Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +/// This attribute has stability level RELEASE CANDIDATE. +/// +/// # Examples +/// +/// - `"SELECT * FROM wuser_table where username = ?"` +/// - `"SET mykey ?"` +#[cfg(feature = "semconv_experimental")] +pub const DB_QUERY_TEXT: &str = "db.query.text"; + +/// Deprecated, use `db.namespace` instead. +/// +/// ## Notes /// /// # Examples /// @@ -1600,6 +1884,18 @@ pub const DB_QUERY_TEXT: &str = "db.query.text"; #[deprecated(note = "Replaced by `db.namespace`.")] pub const DB_REDIS_DATABASE_INDEX: &str = "db.redis.database_index"; +/// Number of rows returned by the operation. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `10` +/// - `30` +/// - `1000` +#[cfg(feature = "semconv_experimental")] +pub const DB_RESPONSE_RETURNED_ROWS: &str = "db.response.returned_rows"; + /// Database response status code. /// /// ## Notes @@ -1619,6 +1915,8 @@ pub const DB_RESPONSE_STATUS_CODE: &str = "db.response.status_code"; /// Deprecated, use `db.collection.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"mytable"` @@ -1628,6 +1926,8 @@ pub const DB_SQL_TABLE: &str = "db.sql.table"; /// The database statement being executed. /// +/// ## Notes +/// /// # Examples /// /// - `"SELECT * FROM wuser_table"` @@ -1647,6 +1947,8 @@ pub const DB_SYSTEM: &str = "db.system"; /// Deprecated, no replacement at this time. /// +/// ## Notes +/// /// # Examples /// /// - `"readonly_user"` @@ -1657,6 +1959,8 @@ pub const DB_USER: &str = "db.user"; /// 'Deprecated, use `deployment.environment.name` instead.' /// +/// ## Notes +/// /// # Examples /// /// - `"staging"` @@ -1686,6 +1990,8 @@ pub const DEPLOYMENT_ENVIRONMENT_NAME: &str = "deployment.environment.name"; /// The id of the deployment. /// +/// ## Notes +/// /// # Examples /// /// - `"1208"` @@ -1694,6 +2000,8 @@ pub const DEPLOYMENT_ID: &str = "deployment.id"; /// The name of the deployment. /// +/// ## Notes +/// /// # Examples /// /// - `"deploy my app"` @@ -1701,7 +2009,9 @@ pub const DEPLOYMENT_ID: &str = "deployment.id"; #[cfg(feature = "semconv_experimental")] pub const DEPLOYMENT_NAME: &str = "deployment.name"; -/// The status of the deployment +/// The status of the deployment. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const DEPLOYMENT_STATUS: &str = "deployment.status"; @@ -1721,6 +2031,8 @@ pub const DESTINATION_ADDRESS: &str = "destination.address"; /// Destination port number /// +/// ## Notes +/// /// # Examples /// /// - `3389` @@ -1781,6 +2093,8 @@ pub const DEVICE_MODEL_NAME: &str = "device.model.name"; /// The disk IO operation direction. /// +/// ## Notes +/// /// # Examples /// /// - `"read"` @@ -1802,6 +2116,8 @@ pub const DNS_QUESTION_NAME: &str = "dns.question.name"; /// Name of the garbage collector managed heap generation. /// +/// ## Notes +/// /// # Examples /// /// - `"gen0"` @@ -1812,6 +2128,8 @@ pub const DOTNET_GC_HEAP_GENERATION: &str = "dotnet.gc.heap.generation"; /// Deprecated, use `user.id` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"username"` @@ -1821,6 +2139,8 @@ pub const ENDUSER_ID: &str = "enduser.id"; /// Deprecated, use `user.roles` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"admin"` @@ -1830,6 +2150,8 @@ pub const ENDUSER_ROLE: &str = "enduser.role"; /// Deprecated, no replacement at this time. /// +/// ## Notes +/// /// # Examples /// /// - `"read:message, write:files"` @@ -1906,6 +2228,8 @@ pub const EXCEPTION_ESCAPED: &str = "exception.escaped"; /// The exception message. /// +/// ## Notes +/// /// # Examples /// /// - `"Division by zero"` @@ -1914,6 +2238,8 @@ pub const EXCEPTION_MESSAGE: &str = "exception.message"; /// 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. /// +/// ## Notes +/// /// # Examples /// /// - `"Exception in thread \"main\" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\n"` @@ -1921,18 +2247,24 @@ pub const EXCEPTION_STACKTRACE: &str = "exception.stacktrace"; /// The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. /// +/// ## Notes +/// /// # Examples /// /// - `"java.net.ConnectException"` /// - `"OSError"` pub const EXCEPTION_TYPE: &str = "exception.type"; -/// A boolean that is true if the serverless function is executed for the first time (aka cold-start) +/// A boolean that is true if the serverless function is executed for the first time (aka cold-start). +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const FAAS_COLDSTART: &str = "faas.coldstart"; /// A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). /// +/// ## Notes +/// /// # Examples /// /// - `"0/5 * * * ? *"` @@ -1941,6 +2273,8 @@ pub const FAAS_CRON: &str = "faas.cron"; /// The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. /// +/// ## Notes +/// /// # Examples /// /// - `"myBucketName"` @@ -1950,6 +2284,8 @@ pub const FAAS_DOCUMENT_COLLECTION: &str = "faas.document.collection"; /// The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. /// +/// ## Notes +/// /// # Examples /// /// - `"myFile.txt"` @@ -1957,12 +2293,16 @@ pub const FAAS_DOCUMENT_COLLECTION: &str = "faas.document.collection"; #[cfg(feature = "semconv_experimental")] pub const FAAS_DOCUMENT_NAME: &str = "faas.document.name"; -/// Describes the type of the operation that was performed on the data +/// Describes the type of the operation that was performed on the data. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const FAAS_DOCUMENT_OPERATION: &str = "faas.document.operation"; /// A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). /// +/// ## Notes +/// /// # Examples /// /// - `"2020-01-23T13:47:06Z"` @@ -1983,6 +2323,8 @@ pub const FAAS_INSTANCE: &str = "faas.instance"; /// The invocation ID of the current function invocation. /// +/// ## Notes +/// /// # Examples /// /// - `"af9d5aa4-a685-4c5f-a22b-444f80b3cc28"` @@ -2047,7 +2389,7 @@ pub const FAAS_MAX_MEMORY: &str = "faas.max_memory"; /// definition of function name MUST be used for this attribute /// (and consequently the span name) for the listed cloud providers/products: /// -/// - **Azure:** The full name `/`, i.e., function app name +/// - **Azure:** The full name `[FUNCAPP]/[FUNC]`, i.e., function app name /// followed by a forward slash followed by the function name (this form /// can also be seen in the resource JSON for the function). /// This means that a span attribute MUST be used, as an Azure function @@ -2063,13 +2405,17 @@ pub const FAAS_NAME: &str = "faas.name"; /// A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). /// +/// ## Notes +/// /// # Examples /// /// - `"2020-01-23T13:47:06Z"` #[cfg(feature = "semconv_experimental")] pub const FAAS_TIME: &str = "faas.time"; -/// Type of the trigger which caused this function invocation +/// Type of the trigger which caused this function invocation. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const FAAS_TRIGGER: &str = "faas.trigger"; @@ -2094,7 +2440,42 @@ pub const FAAS_TRIGGER: &str = "faas.trigger"; #[cfg(feature = "semconv_experimental")] pub const FAAS_VERSION: &str = "faas.version"; -/// The unique identifier of the feature flag. +/// The unique identifier for the flag evaluation context. For example, the targeting key. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"5157782b-2203-4c80-a857-dbbd5e7761db"` +#[cfg(feature = "semconv_experimental")] +pub const FEATURE_FLAG_CONTEXT_ID: &str = "feature_flag.context.id"; + +/// A message explaining the nature of an error occurring during flag evaluation. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"Flag `header-color`expected type`string`but found type`number`"` +#[cfg(feature = "semconv_experimental")] +pub const FEATURE_FLAG_EVALUATION_ERROR_MESSAGE: &str = "feature_flag.evaluation.error.message"; + +/// The reason code which shows how a feature flag value was determined. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"static"` +/// - `"targeting_match"` +/// - `"error"` +/// - `"default"` +#[cfg(feature = "semconv_experimental")] +pub const FEATURE_FLAG_EVALUATION_REASON: &str = "feature_flag.evaluation.reason"; + +/// The lookup key of the feature flag. +/// +/// ## Notes /// /// # Examples /// @@ -2102,7 +2483,9 @@ pub const FAAS_VERSION: &str = "faas.version"; #[cfg(feature = "semconv_experimental")] pub const FEATURE_FLAG_KEY: &str = "feature_flag.key"; -/// The name of the service provider that performs the flag evaluation. +/// Identifies the feature flag provider. +/// +/// ## Notes /// /// # Examples /// @@ -2110,7 +2493,19 @@ pub const FEATURE_FLAG_KEY: &str = "feature_flag.key"; #[cfg(feature = "semconv_experimental")] pub const FEATURE_FLAG_PROVIDER_NAME: &str = "feature_flag.provider_name"; -/// SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. +/// The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"proj-1"` +/// - `"ab98sgs"` +/// - `"service1/dev"` +#[cfg(feature = "semconv_experimental")] +pub const FEATURE_FLAG_SET_ID: &str = "feature_flag.set.id"; + +/// A semantic identifier for an evaluated flag value. /// /// ## Notes /// @@ -2119,10 +2514,6 @@ pub const FEATURE_FLAG_PROVIDER_NAME: &str = "feature_flag.provider_name"; /// provide additional context for understanding the meaning behind a value. /// For example, the variant `red` maybe be used for the value `#c05543`. /// -/// A stringified version of the value can be used in situations where a -/// semantic identifier is unavailable. String representation of the value -/// should be determined by the implementer. -/// /// # Examples /// /// - `"red"` @@ -2131,6 +2522,17 @@ pub const FEATURE_FLAG_PROVIDER_NAME: &str = "feature_flag.provider_name"; #[cfg(feature = "semconv_experimental")] pub const FEATURE_FLAG_VARIANT: &str = "feature_flag.variant"; +/// The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"1"` +/// - `"01ABCDEF"` +#[cfg(feature = "semconv_experimental")] +pub const FEATURE_FLAG_VERSION: &str = "feature_flag.version"; + /// Time when the file was last accessed, in ISO 8601 format. /// /// ## Notes @@ -2184,6 +2586,8 @@ pub const FILE_CREATED: &str = "file.created"; /// Directory where the file is located. It should include the drive letter, when appropriate. /// +/// ## Notes +/// /// # Examples /// /// - `"/home/user"` @@ -2219,6 +2623,8 @@ pub const FILE_FORK_NAME: &str = "file.fork_name"; /// Primary Group ID (GID) of the file. /// +/// ## Notes +/// /// # Examples /// /// - `"1000"` @@ -2227,6 +2633,8 @@ pub const FILE_GROUP_ID: &str = "file.group.id"; /// Primary group name of the file. /// +/// ## Notes +/// /// # Examples /// /// - `"users"` @@ -2235,6 +2643,8 @@ pub const FILE_GROUP_NAME: &str = "file.group.name"; /// Inode representing the file in the filesystem. /// +/// ## Notes +/// /// # Examples /// /// - `"256383"` @@ -2243,6 +2653,8 @@ pub const FILE_INODE: &str = "file.inode"; /// Mode of the file in octal representation. /// +/// ## Notes +/// /// # Examples /// /// - `"0640"` @@ -2251,6 +2663,8 @@ pub const FILE_MODE: &str = "file.mode"; /// Time when the file content was last modified, in ISO 8601 format. /// +/// ## Notes +/// /// # Examples /// /// - `"2021-01-01T12:00:00Z"` @@ -2259,6 +2673,8 @@ pub const FILE_MODIFIED: &str = "file.modified"; /// Name of the file including the extension, without the directory. /// +/// ## Notes +/// /// # Examples /// /// - `"example.png"` @@ -2267,6 +2683,8 @@ pub const FILE_NAME: &str = "file.name"; /// The user ID (UID) or security identifier (SID) of the file owner. /// +/// ## Notes +/// /// # Examples /// /// - `"1000"` @@ -2275,6 +2693,8 @@ pub const FILE_OWNER_ID: &str = "file.owner.id"; /// Username of the file owner. /// +/// ## Notes +/// /// # Examples /// /// - `"root"` @@ -2283,6 +2703,8 @@ pub const FILE_OWNER_NAME: &str = "file.owner.name"; /// Full path to the file, including the file name. It should include the drive letter, when appropriate. /// +/// ## Notes +/// /// # Examples /// /// - `"/home/alice/example.png"` @@ -2290,7 +2712,9 @@ pub const FILE_OWNER_NAME: &str = "file.owner.name"; #[cfg(feature = "semconv_experimental")] pub const FILE_PATH: &str = "file.path"; -/// File size in bytes +/// File size in bytes. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const FILE_SIZE: &str = "file.size"; @@ -2324,6 +2748,8 @@ pub const GCP_CLIENT_SERVICE: &str = "gcp.client.service"; /// The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. /// +/// ## Notes +/// /// # Examples /// /// - `"job-name-xxxx"` @@ -2333,6 +2759,8 @@ pub const GCP_CLOUD_RUN_JOB_EXECUTION: &str = "gcp.cloud_run.job.execution"; /// The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. /// +/// ## Notes +/// /// # Examples /// /// - `0` @@ -2342,6 +2770,8 @@ pub const GCP_CLOUD_RUN_JOB_TASK_INDEX: &str = "gcp.cloud_run.job.task_index"; /// The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). /// +/// ## Notes +/// /// # Examples /// /// - `"my-host1234.example.com"` @@ -2351,6 +2781,8 @@ pub const GCP_GCE_INSTANCE_HOSTNAME: &str = "gcp.gce.instance.hostname"; /// The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). /// +/// ## Notes +/// /// # Examples /// /// - `"instance-1"` @@ -2360,6 +2792,8 @@ pub const GCP_GCE_INSTANCE_NAME: &str = "gcp.gce.instance.name"; /// Deprecated, use Event API to report completions contents. /// +/// ## Notes +/// /// # Examples /// /// - `"[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"` @@ -2369,6 +2803,8 @@ pub const GEN_AI_COMPLETION: &str = "gen_ai.completion"; /// The response format that is requested. /// +/// ## Notes +/// /// # Examples /// /// - `"json"` @@ -2377,13 +2813,17 @@ pub const GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT: &str = "gen_ai.openai.request.r /// Requests with same seed value more likely to return same result. /// +/// ## Notes +/// /// # Examples /// /// - `100` #[cfg(feature = "semconv_experimental")] pub const GEN_AI_OPENAI_REQUEST_SEED: &str = "gen_ai.openai.request.seed"; -/// The service tier requested. May be a specific tier, detault, or auto. +/// The service tier requested. May be a specific tier, default, or auto. +/// +/// ## Notes /// /// # Examples /// @@ -2394,13 +2834,26 @@ pub const GEN_AI_OPENAI_REQUEST_SERVICE_TIER: &str = "gen_ai.openai.request.serv /// The service tier used for the response. /// +/// ## Notes +/// /// # Examples /// /// - `"scale"` -/// - `"detault"` +/// - `"default"` #[cfg(feature = "semconv_experimental")] pub const GEN_AI_OPENAI_RESPONSE_SERVICE_TIER: &str = "gen_ai.openai.response.service_tier"; +/// A fingerprint to track any eventual change in the Generative AI environment. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"fp_44709d6fcb"` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT: &str = + "gen_ai.openai.response.system_fingerprint"; + /// The name of the operation being performed. /// /// ## Notes @@ -2411,6 +2864,8 @@ pub const GEN_AI_OPERATION_NAME: &str = "gen_ai.operation.name"; /// Deprecated, use Event API to report prompt contents. /// +/// ## Notes +/// /// # Examples /// /// - `"[{'role': 'user', 'content': 'What is the capital of France?'}]"` @@ -2418,8 +2873,28 @@ pub const GEN_AI_OPERATION_NAME: &str = "gen_ai.operation.name"; #[deprecated(note = "Removed, no replacement at this time.")] pub const GEN_AI_PROMPT: &str = "gen_ai.prompt"; +/// The encoding formats requested in an embeddings operation, if specified. +/// +/// ## Notes +/// +/// In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request. +/// +/// # Examples +/// +/// - `[ +/// "base64", +/// ]` +/// - `[ +/// "float", +/// "binary", +/// ]` +#[cfg(feature = "semconv_experimental")] +pub const GEN_AI_REQUEST_ENCODING_FORMATS: &str = "gen_ai.request.encoding_formats"; + /// The frequency penalty setting for the GenAI request. /// +/// ## Notes +/// /// # Examples /// /// - `0.1` @@ -2428,6 +2903,8 @@ pub const GEN_AI_REQUEST_FREQUENCY_PENALTY: &str = "gen_ai.request.frequency_pen /// The maximum number of tokens the model generates for a request. /// +/// ## Notes +/// /// # Examples /// /// - `100` @@ -2436,6 +2913,8 @@ pub const GEN_AI_REQUEST_MAX_TOKENS: &str = "gen_ai.request.max_tokens"; /// The name of the GenAI model a request is being made to. /// +/// ## Notes +/// /// # Examples /// /// - `"gpt-4"` @@ -2444,6 +2923,8 @@ pub const GEN_AI_REQUEST_MODEL: &str = "gen_ai.request.model"; /// The presence penalty setting for the GenAI request. /// +/// ## Notes +/// /// # Examples /// /// - `0.1` @@ -2452,6 +2933,8 @@ pub const GEN_AI_REQUEST_PRESENCE_PENALTY: &str = "gen_ai.request.presence_penal /// List of sequences that the model will use to stop generating further tokens. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -2463,6 +2946,8 @@ pub const GEN_AI_REQUEST_STOP_SEQUENCES: &str = "gen_ai.request.stop_sequences"; /// The temperature setting for the GenAI request. /// +/// ## Notes +/// /// # Examples /// /// - `0.0` @@ -2471,6 +2956,8 @@ pub const GEN_AI_REQUEST_TEMPERATURE: &str = "gen_ai.request.temperature"; /// The top_k sampling setting for the GenAI request. /// +/// ## Notes +/// /// # Examples /// /// - `1.0` @@ -2479,6 +2966,8 @@ pub const GEN_AI_REQUEST_TOP_K: &str = "gen_ai.request.top_k"; /// The top_p sampling setting for the GenAI request. /// +/// ## Notes +/// /// # Examples /// /// - `1.0` @@ -2487,6 +2976,8 @@ pub const GEN_AI_REQUEST_TOP_P: &str = "gen_ai.request.top_p"; /// Array of reasons the model stopped generating tokens, corresponding to each generation received. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -2501,6 +2992,8 @@ pub const GEN_AI_RESPONSE_FINISH_REASONS: &str = "gen_ai.response.finish_reasons /// The unique identifier for the completion. /// +/// ## Notes +/// /// # Examples /// /// - `"chatcmpl-123"` @@ -2509,6 +3002,8 @@ pub const GEN_AI_RESPONSE_ID: &str = "gen_ai.response.id"; /// The name of the model that generated the response. /// +/// ## Notes +/// /// # Examples /// /// - `"gpt-4-0613"` @@ -2537,6 +3032,8 @@ pub const GEN_AI_SYSTEM: &str = "gen_ai.system"; /// The type of token being counted. /// +/// ## Notes +/// /// # Examples /// /// - `"input"` @@ -2546,6 +3043,8 @@ pub const GEN_AI_TOKEN_TYPE: &str = "gen_ai.token.type"; /// Deprecated, use `gen_ai.usage.output_tokens` instead. /// +/// ## Notes +/// /// # Examples /// /// - `42` @@ -2555,6 +3054,8 @@ pub const GEN_AI_USAGE_COMPLETION_TOKENS: &str = "gen_ai.usage.completion_tokens /// The number of tokens used in the GenAI input (prompt). /// +/// ## Notes +/// /// # Examples /// /// - `100` @@ -2563,6 +3064,8 @@ pub const GEN_AI_USAGE_INPUT_TOKENS: &str = "gen_ai.usage.input_tokens"; /// The number of tokens used in the GenAI response (completion). /// +/// ## Notes +/// /// # Examples /// /// - `180` @@ -2571,6 +3074,8 @@ pub const GEN_AI_USAGE_OUTPUT_TOKENS: &str = "gen_ai.usage.output_tokens"; /// Deprecated, use `gen_ai.usage.input_tokens` instead. /// +/// ## Notes +/// /// # Examples /// /// - `42` @@ -2578,74 +3083,157 @@ pub const GEN_AI_USAGE_OUTPUT_TOKENS: &str = "gen_ai.usage.output_tokens"; #[deprecated(note = "Replaced by `gen_ai.usage.input_tokens` attribute.")] pub const GEN_AI_USAGE_PROMPT_TOKENS: &str = "gen_ai.usage.prompt_tokens"; -/// The type of memory. -/// -/// # Examples +/// Two-letter code representing continent’s name. /// -/// - `"other"` -/// - `"stack"` +/// ## Notes #[cfg(feature = "semconv_experimental")] -pub const GO_MEMORY_TYPE: &str = "go.memory.type"; +pub const GEO_CONTINENT_CODE: &str = "geo.continent.code"; -/// The GraphQL document being executed. +/// Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)). /// /// ## Notes /// -/// The value may be sanitized to exclude sensitive information. -/// /// # Examples /// -/// - `"query findBookById { bookById(id: ?) { name } }"` +/// - `"CA"` #[cfg(feature = "semconv_experimental")] -pub const GRAPHQL_DOCUMENT: &str = "graphql.document"; +pub const GEO_COUNTRY_ISO_CODE: &str = "geo.country.iso_code"; -/// The name of the operation being executed. +/// Locality name. Represents the name of a city, town, village, or similar populated place. +/// +/// ## Notes /// /// # Examples /// -/// - `"findBookById"` +/// - `"Montreal"` +/// - `"Berlin"` #[cfg(feature = "semconv_experimental")] -pub const GRAPHQL_OPERATION_NAME: &str = "graphql.operation.name"; +pub const GEO_LOCALITY_NAME: &str = "geo.locality.name"; -/// The type of the operation being executed. +/// Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). +/// +/// ## Notes /// /// # Examples /// -/// - `"query"` -/// - `"mutation"` -/// - `"subscription"` +/// - `45.505918` #[cfg(feature = "semconv_experimental")] -pub const GRAPHQL_OPERATION_TYPE: &str = "graphql.operation.type"; +pub const GEO_LOCATION_LAT: &str = "geo.location.lat"; -/// Unique identifier for the application +/// Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). +/// +/// ## Notes /// /// # Examples /// -/// - `"2daa2797-e42b-4624-9322-ec3f968df4da"` +/// - `-73.61483` #[cfg(feature = "semconv_experimental")] -pub const HEROKU_APP_ID: &str = "heroku.app.id"; +pub const GEO_LOCATION_LON: &str = "geo.location.lon"; -/// Commit hash for the current release +/// Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. +/// +/// ## Notes /// /// # Examples /// -/// - `"e6134959463efd8966b20e75b913cafe3f5ec"` +/// - `"94040"` #[cfg(feature = "semconv_experimental")] -pub const HEROKU_RELEASE_COMMIT: &str = "heroku.release.commit"; +pub const GEO_POSTAL_CODE: &str = "geo.postal_code"; -/// Time and date the release was created +/// Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)). +/// +/// ## Notes /// /// # Examples /// -/// - `"2022-10-23T18:00:42Z"` -#[cfg(feature = "semconv_experimental")] -pub const HEROKU_RELEASE_CREATION_TIMESTAMP: &str = "heroku.release.creation_timestamp"; - -/// The CPU architecture the host system is running on +/// - `"CA-QC"` #[cfg(feature = "semconv_experimental")] -pub const HOST_ARCH: &str = "host.arch"; +pub const GEO_REGION_ISO_CODE: &str = "geo.region.iso_code"; -/// The amount of level 2 memory cache available to the processor (in Bytes). +/// The type of memory. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"other"` +/// - `"stack"` +#[cfg(feature = "semconv_experimental")] +pub const GO_MEMORY_TYPE: &str = "go.memory.type"; + +/// The GraphQL document being executed. +/// +/// ## Notes +/// +/// The value may be sanitized to exclude sensitive information. +/// +/// # Examples +/// +/// - `"query findBookById { bookById(id: ?) { name } }"` +#[cfg(feature = "semconv_experimental")] +pub const GRAPHQL_DOCUMENT: &str = "graphql.document"; + +/// The name of the operation being executed. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"findBookById"` +#[cfg(feature = "semconv_experimental")] +pub const GRAPHQL_OPERATION_NAME: &str = "graphql.operation.name"; + +/// The type of the operation being executed. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"query"` +/// - `"mutation"` +/// - `"subscription"` +#[cfg(feature = "semconv_experimental")] +pub const GRAPHQL_OPERATION_TYPE: &str = "graphql.operation.type"; + +/// Unique identifier for the application +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"2daa2797-e42b-4624-9322-ec3f968df4da"` +#[cfg(feature = "semconv_experimental")] +pub const HEROKU_APP_ID: &str = "heroku.app.id"; + +/// Commit hash for the current release +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"e6134959463efd8966b20e75b913cafe3f5ec"` +#[cfg(feature = "semconv_experimental")] +pub const HEROKU_RELEASE_COMMIT: &str = "heroku.release.commit"; + +/// Time and date the release was created +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"2022-10-23T18:00:42Z"` +#[cfg(feature = "semconv_experimental")] +pub const HEROKU_RELEASE_CREATION_TIMESTAMP: &str = "heroku.release.creation_timestamp"; + +/// The CPU architecture the host system is running on. +/// +/// ## Notes +#[cfg(feature = "semconv_experimental")] +pub const HOST_ARCH: &str = "host.arch"; + +/// The amount of level 2 memory cache available to the processor (in Bytes). +/// +/// ## Notes /// /// # Examples /// @@ -2655,6 +3243,8 @@ pub const HOST_CPU_CACHE_L2_SIZE: &str = "host.cpu.cache.l2.size"; /// Family or generation of the CPU. /// +/// ## Notes +/// /// # Examples /// /// - `"6"` @@ -2664,6 +3254,8 @@ pub const HOST_CPU_FAMILY: &str = "host.cpu.family"; /// Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. /// +/// ## Notes +/// /// # Examples /// /// - `"6"` @@ -2673,6 +3265,8 @@ pub const HOST_CPU_MODEL_ID: &str = "host.cpu.model.id"; /// Model designation of the processor. /// +/// ## Notes +/// /// # Examples /// /// - `"11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz"` @@ -2681,6 +3275,8 @@ pub const HOST_CPU_MODEL_NAME: &str = "host.cpu.model.name"; /// Stepping or core revisions. /// +/// ## Notes +/// /// # Examples /// /// - `"1"` @@ -2702,6 +3298,8 @@ pub const HOST_CPU_VENDOR_ID: &str = "host.cpu.vendor.id"; /// Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. /// +/// ## Notes +/// /// # Examples /// /// - `"fdbf79e8af94cb7f9e8df36789187052"` @@ -2710,6 +3308,8 @@ pub const HOST_ID: &str = "host.id"; /// VM image ID or host OS image ID. For Cloud, this value is from the provider. /// +/// ## Notes +/// /// # Examples /// /// - `"ami-07b06b442921831e5"` @@ -2718,6 +3318,8 @@ pub const HOST_IMAGE_ID: &str = "host.image.id"; /// Name of the VM image or OS install the host was instantiated from. /// +/// ## Notes +/// /// # Examples /// /// - `"infra-ami-eks-worker-node-7d4ec78312"` @@ -2727,6 +3329,8 @@ pub const HOST_IMAGE_NAME: &str = "host.image.name"; /// The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). /// +/// ## Notes +/// /// # Examples /// /// - `"0.1"` @@ -2765,6 +3369,8 @@ pub const HOST_MAC: &str = "host.mac"; /// Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry-test"` @@ -2773,6 +3379,8 @@ pub const HOST_NAME: &str = "host.name"; /// Type of host. For Cloud, this must be the machine type. /// +/// ## Notes +/// /// # Examples /// /// - `"n1-standard-1"` @@ -2781,6 +3389,8 @@ pub const HOST_TYPE: &str = "host.type"; /// Deprecated, use `client.address` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"83.164.160.102"` @@ -2790,6 +3400,8 @@ pub const HTTP_CLIENT_IP: &str = "http.client_ip"; /// State of the HTTP connection in the HTTP connection pool. /// +/// ## Notes +/// /// # Examples /// /// - `"active"` @@ -2797,13 +3409,17 @@ pub const HTTP_CLIENT_IP: &str = "http.client_ip"; #[cfg(feature = "semconv_experimental")] pub const HTTP_CONNECTION_STATE: &str = "http.connection.state"; -/// Deprecated, use `network.protocol.name` instead +/// Deprecated, use `network.protocol.name` instead. +/// +/// ## 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. /// +/// ## Notes +/// /// # Examples /// /// - `"www.example.org"` @@ -2815,6 +3431,8 @@ pub const HTTP_HOST: &str = "http.host"; /// Deprecated, use `http.request.method` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"GET"` @@ -2826,6 +3444,8 @@ 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. /// +/// ## Notes +/// /// # Examples /// /// - `3495` @@ -2874,6 +3494,8 @@ pub const HTTP_REQUEST_METHOD: &str = "http.request.method"; /// Original HTTP method sent by the client in the request line. /// +/// ## Notes +/// /// # Examples /// /// - `"GeT"` @@ -2894,6 +3516,8 @@ pub const HTTP_REQUEST_RESEND_COUNT: &str = "http.request.resend_count"; /// The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any. /// +/// ## Notes +/// /// # Examples /// /// - `1437` @@ -2902,6 +3526,8 @@ pub const HTTP_REQUEST_SIZE: &str = "http.request.size"; /// Deprecated, use `http.request.header.` instead. /// +/// ## Notes +/// /// # Examples /// /// - `3495` @@ -2911,6 +3537,8 @@ pub const HTTP_REQUEST_CONTENT_LENGTH: &str = "http.request_content_length"; /// Deprecated, use `http.request.body.size` instead. /// +/// ## Notes +/// /// # Examples /// /// - `5493` @@ -2921,6 +3549,8 @@ pub const HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: &str = /// The size of the response 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. /// +/// ## Notes +/// /// # Examples /// /// - `3495` @@ -2943,6 +3573,8 @@ pub const HTTP_RESPONSE_HEADER: &str = "http.response.header"; /// The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any. /// +/// ## Notes +/// /// # Examples /// /// - `1437` @@ -2951,6 +3583,8 @@ pub const HTTP_RESPONSE_SIZE: &str = "http.response.size"; /// [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). /// +/// ## Notes +/// /// # Examples /// /// - `200` @@ -2958,6 +3592,8 @@ pub const HTTP_RESPONSE_STATUS_CODE: &str = "http.response.status_code"; /// Deprecated, use `http.response.header.` instead. /// +/// ## Notes +/// /// # Examples /// /// - `3495` @@ -2967,6 +3603,8 @@ pub const HTTP_RESPONSE_CONTENT_LENGTH: &str = "http.response_content_length"; /// Deprecated, use `http.response.body.size` instead. /// +/// ## Notes +/// /// # Examples /// /// - `5493` @@ -2990,6 +3628,8 @@ pub const HTTP_ROUTE: &str = "http.route"; /// Deprecated, use `url.scheme` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"http"` @@ -3000,6 +3640,8 @@ pub const HTTP_SCHEME: &str = "http.scheme"; /// Deprecated, use `server.address` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"example.com"` @@ -3009,6 +3651,8 @@ pub const HTTP_SERVER_NAME: &str = "http.server_name"; /// Deprecated, use `http.response.status_code` instead. /// +/// ## Notes +/// /// # Examples /// /// - `200` @@ -3018,6 +3662,8 @@ pub const HTTP_STATUS_CODE: &str = "http.status_code"; /// Deprecated, use `url.path` and `url.query` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"/search?q=OpenTelemetry#SemConv"` @@ -3027,6 +3673,8 @@ pub const HTTP_TARGET: &str = "http.target"; /// Deprecated, use `url.full` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"https://www.foo.bar/search?q=OpenTelemetry#SemConv"` @@ -3036,6 +3684,8 @@ pub const HTTP_URL: &str = "http.url"; /// Deprecated, use `user_agent.original` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"CERN-LineMode/2.15 libwww/2.17b3"` @@ -3046,6 +3696,8 @@ pub const HTTP_USER_AGENT: &str = "http.user_agent"; /// An identifier for the hardware component, unique within the monitored host /// +/// ## Notes +/// /// # Examples /// /// - `"win32battery_battery_testsysa33_1"` @@ -3054,6 +3706,8 @@ pub const HW_ID: &str = "hw.id"; /// An easily-recognizable name for the hardware component /// +/// ## Notes +/// /// # Examples /// /// - `"eth0"` @@ -3062,6 +3716,8 @@ pub const HW_NAME: &str = "hw.name"; /// Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) /// +/// ## Notes +/// /// # Examples /// /// - `"dellStorage_perc_0"` @@ -3069,6 +3725,8 @@ pub const HW_NAME: &str = "hw.name"; pub const HW_PARENT: &str = "hw.parent"; /// The current state of the component +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const HW_STATE: &str = "hw.state"; @@ -3141,17 +3799,23 @@ pub const JVM_MEMORY_POOL_NAME: &str = "jvm.memory.pool.name"; /// The type of memory. /// +/// ## Notes +/// /// # Examples /// /// - `"heap"` /// - `"non_heap"` pub const JVM_MEMORY_TYPE: &str = "jvm.memory.type"; -/// Whether the thread is daemon or not +/// Whether the thread is daemon or not. +/// +/// ## Notes pub const JVM_THREAD_DAEMON: &str = "jvm.thread.daemon"; /// State of the thread. /// +/// ## Notes +/// /// # Examples /// /// - `"runnable"` @@ -3160,6 +3824,8 @@ pub const JVM_THREAD_STATE: &str = "jvm.thread.state"; /// The name of the cluster. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry-cluster"` @@ -3185,10 +3851,10 @@ pub const K8S_CLUSTER_NAME: &str = "k8s.cluster.name"; /// [ISO/IEC 9834-8 and ITU-T X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). /// Which states: /// -/// > If generated according to one of the mechanisms defined in Rec. -/// > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be -/// > different from all other UUIDs generated before 3603 A.D., or is -/// > extremely likely to be different (depending on the mechanism chosen). +/// \] If generated according to one of the mechanisms defined in Rec. +/// \] ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be +/// \] different from all other UUIDs generated before 3603 A.D., or is +/// \] extremely likely to be different (depending on the mechanism chosen). /// /// Therefore, UIDs between clusters should be extremely unlikely to /// conflict. @@ -3201,18 +3867,24 @@ pub const K8S_CLUSTER_UID: &str = "k8s.cluster.uid"; /// The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). /// +/// ## Notes +/// /// # Examples /// /// - `"redis"` #[cfg(feature = "semconv_experimental")] pub const K8S_CONTAINER_NAME: &str = "k8s.container.name"; -/// Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec +/// Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const K8S_CONTAINER_RESTART_COUNT: &str = "k8s.container.restart_count"; /// Last terminated reason of the Container. /// +/// ## Notes +/// /// # Examples /// /// - `"Evicted"` @@ -3223,6 +3895,8 @@ pub const K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON: &str = /// The name of the CronJob. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry"` @@ -3231,6 +3905,8 @@ pub const K8S_CRONJOB_NAME: &str = "k8s.cronjob.name"; /// The UID of the CronJob. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3239,6 +3915,8 @@ pub const K8S_CRONJOB_UID: &str = "k8s.cronjob.uid"; /// The name of the DaemonSet. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry"` @@ -3247,6 +3925,8 @@ pub const K8S_DAEMONSET_NAME: &str = "k8s.daemonset.name"; /// The UID of the DaemonSet. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3255,6 +3935,8 @@ pub const K8S_DAEMONSET_UID: &str = "k8s.daemonset.uid"; /// The name of the Deployment. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry"` @@ -3263,6 +3945,8 @@ pub const K8S_DEPLOYMENT_NAME: &str = "k8s.deployment.name"; /// The UID of the Deployment. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3271,6 +3955,8 @@ pub const K8S_DEPLOYMENT_UID: &str = "k8s.deployment.uid"; /// The name of the Job. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry"` @@ -3279,6 +3965,8 @@ pub const K8S_JOB_NAME: &str = "k8s.job.name"; /// The UID of the Job. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3287,6 +3975,8 @@ pub const K8S_JOB_UID: &str = "k8s.job.uid"; /// The name of the namespace that the pod is running in. /// +/// ## Notes +/// /// # Examples /// /// - `"default"` @@ -3295,6 +3985,8 @@ pub const K8S_NAMESPACE_NAME: &str = "k8s.namespace.name"; /// The name of the Node. /// +/// ## Notes +/// /// # Examples /// /// - `"node-1"` @@ -3303,6 +3995,8 @@ pub const K8S_NODE_NAME: &str = "k8s.node.name"; /// The UID of the Node. /// +/// ## Notes +/// /// # Examples /// /// - `"1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"` @@ -3311,6 +4005,8 @@ pub const K8S_NODE_UID: &str = "k8s.node.uid"; /// The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. /// +/// ## Notes +/// /// # Examples /// /// - `"k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true"` @@ -3321,6 +4017,8 @@ pub const K8S_POD_ANNOTATION: &str = "k8s.pod.annotation"; /// The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. /// +/// ## Notes +/// /// # Examples /// /// - `"k8s.pod.label.app=my-app"` @@ -3331,6 +4029,8 @@ pub const K8S_POD_LABEL: &str = "k8s.pod.label"; /// Deprecated, use `k8s.pod.label` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"k8s.pod.label.app=my-app"` @@ -3340,6 +4040,8 @@ pub const K8S_POD_LABELS: &str = "k8s.pod.labels"; /// The name of the Pod. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry-pod-autoconf"` @@ -3348,6 +4050,8 @@ pub const K8S_POD_NAME: &str = "k8s.pod.name"; /// The UID of the Pod. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3356,6 +4060,8 @@ pub const K8S_POD_UID: &str = "k8s.pod.uid"; /// The name of the ReplicaSet. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry"` @@ -3364,6 +4070,8 @@ pub const K8S_REPLICASET_NAME: &str = "k8s.replicaset.name"; /// The UID of the ReplicaSet. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3372,6 +4080,8 @@ pub const K8S_REPLICASET_UID: &str = "k8s.replicaset.uid"; /// The name of the StatefulSet. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry"` @@ -3380,6 +4090,8 @@ pub const K8S_STATEFULSET_NAME: &str = "k8s.statefulset.name"; /// The UID of the StatefulSet. /// +/// ## Notes +/// /// # Examples /// /// - `"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"` @@ -3388,6 +4100,8 @@ pub const K8S_STATEFULSET_UID: &str = "k8s.statefulset.uid"; /// The name of the K8s volume. /// +/// ## Notes +/// /// # Examples /// /// - `"volume0"` @@ -3396,6 +4110,8 @@ pub const K8S_VOLUME_NAME: &str = "k8s.volume.name"; /// The type of the K8s volume. /// +/// ## Notes +/// /// # Examples /// /// - `"emptyDir"` @@ -3405,6 +4121,8 @@ pub const K8S_VOLUME_TYPE: &str = "k8s.volume.type"; /// The Linux Slab memory state /// +/// ## Notes +/// /// # Examples /// /// - `"reclaimable"` @@ -3414,6 +4132,8 @@ pub const LINUX_MEMORY_SLAB_STATE: &str = "linux.memory.slab.state"; /// The basename of the file. /// +/// ## Notes +/// /// # Examples /// /// - `"audit.log"` @@ -3422,6 +4142,8 @@ pub const LOG_FILE_NAME: &str = "log.file.name"; /// The basename of the file, with symlinks resolved. /// +/// ## Notes +/// /// # Examples /// /// - `"uuid.log"` @@ -3430,6 +4152,8 @@ pub const LOG_FILE_NAME_RESOLVED: &str = "log.file.name_resolved"; /// The full path to the file. /// +/// ## Notes +/// /// # Examples /// /// - `"/var/log/mysql/audit.log"` @@ -3438,13 +4162,17 @@ pub const LOG_FILE_PATH: &str = "log.file.path"; /// The full path to the file, with symlinks resolved. /// +/// ## Notes +/// /// # Examples /// /// - `"/var/lib/docker/uuid.log"` #[cfg(feature = "semconv_experimental")] pub const LOG_FILE_PATH_RESOLVED: &str = "log.file.path_resolved"; -/// The stream associated with the log. See below for a list of well-known values +/// The stream associated with the log. See below for a list of well-known values. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const LOG_IOSTREAM: &str = "log.iostream"; @@ -3474,22 +4202,30 @@ pub const LOG_RECORD_ORIGINAL: &str = "log.record.original"; #[cfg(feature = "semconv_experimental")] pub const LOG_RECORD_UID: &str = "log.record.uid"; -/// Deprecated, use `rpc.message.compressed_size` instead +/// Deprecated, use `rpc.message.compressed_size` instead. +/// +/// ## 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 +/// 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 +/// 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 +/// 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"; @@ -3510,6 +4246,8 @@ pub const MESSAGING_BATCH_MESSAGE_COUNT: &str = "messaging.batch.message_count"; /// A unique identifier for the client that consumes or produces a message. /// +/// ## Notes +/// /// # Examples /// /// - `"client-5"` @@ -3530,7 +4268,9 @@ pub const MESSAGING_CLIENT_ID: &str = "messaging.client.id"; #[cfg(feature = "semconv_experimental")] pub const MESSAGING_CONSUMER_GROUP_NAME: &str = "messaging.consumer.group.name"; -/// A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name) +/// A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const MESSAGING_DESTINATION_ANONYMOUS: &str = "messaging.destination.anonymous"; @@ -3550,6 +4290,8 @@ pub const MESSAGING_DESTINATION_NAME: &str = "messaging.destination.name"; /// The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. /// +/// ## Notes +/// /// # Examples /// /// - `"1"` @@ -3580,17 +4322,23 @@ pub const MESSAGING_DESTINATION_SUBSCRIPTION_NAME: &str = "messaging.destination #[cfg(feature = "semconv_experimental")] pub const MESSAGING_DESTINATION_TEMPLATE: &str = "messaging.destination.template"; -/// A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed +/// A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const MESSAGING_DESTINATION_TEMPORARY: &str = "messaging.destination.temporary"; -/// Deprecated, no replacement at this time +/// Deprecated, no replacement at this time. +/// +/// ## 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. /// +/// ## Notes +/// /// # Examples /// /// - `"MyQueue"` @@ -3601,6 +4349,8 @@ pub const MESSAGING_DESTINATION_PUBLISH_NAME: &str = "messaging.destination_publ /// Deprecated, use `messaging.consumer.group.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"$Default"` @@ -3610,6 +4360,8 @@ pub const MESSAGING_EVENTHUBS_CONSUMER_GROUP: &str = "messaging.eventhubs.consum /// The UTC epoch seconds at which the message has been accepted and stored in the entity. /// +/// ## Notes +/// /// # Examples /// /// - `1701393730` @@ -3619,6 +4371,8 @@ pub const MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME: &str = /// The ack deadline in seconds set for the modify ack deadline request. /// +/// ## Notes +/// /// # Examples /// /// - `10` @@ -3628,6 +4382,8 @@ pub const MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE: &str = /// The ack id for a given message. /// +/// ## Notes +/// /// # Examples /// /// - `"ack_id"` @@ -3636,6 +4392,8 @@ pub const MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID: &str = "messaging.gcp_pubsub.mess /// The delivery attempt for a given message. /// +/// ## Notes +/// /// # Examples /// /// - `2` @@ -3645,6 +4403,8 @@ pub const MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT: &str = /// The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. /// +/// ## Notes +/// /// # Examples /// /// - `"ordering_key"` @@ -3654,6 +4414,8 @@ pub const MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY: &str = /// Deprecated, use `messaging.consumer.group.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"my-group"` @@ -3663,6 +4425,8 @@ pub const MESSAGING_KAFKA_CONSUMER_GROUP: &str = "messaging.kafka.consumer.group /// Deprecated, use `messaging.destination.partition.id` instead. /// +/// ## Notes +/// /// # Examples /// /// - `2` @@ -3684,6 +4448,8 @@ pub const MESSAGING_KAFKA_MESSAGE_KEY: &str = "messaging.kafka.message.key"; /// Deprecated, use `messaging.kafka.offset` instead. /// +/// ## Notes +/// /// # Examples /// /// - `42` @@ -3691,12 +4457,16 @@ pub const MESSAGING_KAFKA_MESSAGE_KEY: &str = "messaging.kafka.message.key"; #[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 +/// A boolean that is true if the message is a tombstone. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const MESSAGING_KAFKA_MESSAGE_TOMBSTONE: &str = "messaging.kafka.message.tombstone"; /// The offset of a record in the corresponding Kafka partition. /// +/// ## Notes +/// /// # Examples /// /// - `42` @@ -3718,6 +4488,8 @@ pub const MESSAGING_MESSAGE_BODY_SIZE: &str = "messaging.message.body.size"; /// The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". /// +/// ## Notes +/// /// # Examples /// /// - `"MyConversationId"` @@ -3739,6 +4511,8 @@ pub const MESSAGING_MESSAGE_ENVELOPE_SIZE: &str = "messaging.message.envelope.si /// A value used by the messaging system as an identifier for the message, represented as a string. /// +/// ## Notes +/// /// # Examples /// /// - `"452a7c7c7c7048c2f887f61572b18fc2"` @@ -3747,6 +4521,8 @@ pub const MESSAGING_MESSAGE_ID: &str = "messaging.message.id"; /// Deprecated, use `messaging.operation.type` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"publish"` @@ -3758,6 +4534,8 @@ pub const MESSAGING_OPERATION: &str = "messaging.operation"; /// The system-specific name of the messaging operation. /// +/// ## Notes +/// /// # Examples /// /// - `"ack"` @@ -3776,6 +4554,8 @@ pub const MESSAGING_OPERATION_TYPE: &str = "messaging.operation.type"; /// RabbitMQ message routing key. /// +/// ## Notes +/// /// # Examples /// /// - `"myKey"` @@ -3785,6 +4565,8 @@ pub const MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY: &str = /// RabbitMQ message delivery tag /// +/// ## Notes +/// /// # Examples /// /// - `123` @@ -3793,6 +4575,8 @@ pub const MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG: &str = "messaging.rabbitmq.me /// Deprecated, use `messaging.consumer.group.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"myConsumerGroup"` @@ -3802,12 +4586,16 @@ pub const MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG: &str = "messaging.rabbitmq.me )] pub const MESSAGING_ROCKETMQ_CLIENT_GROUP: &str = "messaging.rocketmq.client_group"; -/// Model of message consumption. This only applies to consumer spans +/// Model of message consumption. This only applies to consumer spans. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const MESSAGING_ROCKETMQ_CONSUMPTION_MODEL: &str = "messaging.rocketmq.consumption_model"; /// The delay time level for delay message, which determines the message delay time. /// +/// ## Notes +/// /// # Examples /// /// - `3` @@ -3817,6 +4605,8 @@ pub const MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL: &str = /// The timestamp in milliseconds that the delay message is expected to be delivered to consumer. /// +/// ## Notes +/// /// # Examples /// /// - `1665987217045` @@ -3826,6 +4616,8 @@ pub const MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP: &str = /// It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. /// +/// ## Notes +/// /// # Examples /// /// - `"myMessageGroup"` @@ -3834,6 +4626,8 @@ pub const MESSAGING_ROCKETMQ_MESSAGE_GROUP: &str = "messaging.rocketmq.message.g /// Key(s) of message, another way to mark message besides message id. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -3845,18 +4639,24 @@ pub const MESSAGING_ROCKETMQ_MESSAGE_KEYS: &str = "messaging.rocketmq.message.ke /// The secondary classifier of message besides topic. /// +/// ## Notes +/// /// # Examples /// /// - `"tagA"` #[cfg(feature = "semconv_experimental")] pub const MESSAGING_ROCKETMQ_MESSAGE_TAG: &str = "messaging.rocketmq.message.tag"; -/// Type of message +/// Type of message. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const MESSAGING_ROCKETMQ_MESSAGE_TYPE: &str = "messaging.rocketmq.message.type"; /// Namespace of RocketMQ resources, resources in different namespaces are individual. /// +/// ## Notes +/// /// # Examples /// /// - `"myNamespace"` @@ -3865,6 +4665,8 @@ pub const MESSAGING_ROCKETMQ_NAMESPACE: &str = "messaging.rocketmq.namespace"; /// Deprecated, use `messaging.destination.subscription.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"subscription-a"` @@ -3873,12 +4675,16 @@ pub const MESSAGING_ROCKETMQ_NAMESPACE: &str = "messaging.rocketmq.namespace"; pub const MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME: &str = "messaging.servicebus.destination.subscription_name"; -/// Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock) +/// Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const MESSAGING_SERVICEBUS_DISPOSITION_STATUS: &str = "messaging.servicebus.disposition_status"; /// Number of deliveries that have been attempted for this message. /// +/// ## Notes +/// /// # Examples /// /// - `2` @@ -3888,6 +4694,8 @@ pub const MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT: &str = /// The UTC epoch seconds at which the message has been accepted and stored in the entity. /// +/// ## Notes +/// /// # Examples /// /// - `1701393730` @@ -3905,6 +4713,8 @@ pub const MESSAGING_SYSTEM: &str = "messaging.system"; /// Deprecated, use `network.local.address`. /// +/// ## Notes +/// /// # Examples /// /// - `"192.168.0.1"` @@ -3914,6 +4724,8 @@ pub const NET_HOST_IP: &str = "net.host.ip"; /// Deprecated, use `server.address`. /// +/// ## Notes +/// /// # Examples /// /// - `"example.com"` @@ -3923,6 +4735,8 @@ pub const NET_HOST_NAME: &str = "net.host.name"; /// Deprecated, use `server.port`. /// +/// ## Notes +/// /// # Examples /// /// - `8080` @@ -3932,6 +4746,8 @@ pub const NET_HOST_PORT: &str = "net.host.port"; /// Deprecated, use `network.peer.address`. /// +/// ## Notes +/// /// # Examples /// /// - `"127.0.0.1"` @@ -3941,6 +4757,8 @@ pub const NET_PEER_IP: &str = "net.peer.ip"; /// Deprecated, use `server.address` on client spans and `client.address` on server spans. /// +/// ## Notes +/// /// # Examples /// /// - `"example.com"` @@ -3952,6 +4770,8 @@ pub const NET_PEER_NAME: &str = "net.peer.name"; /// Deprecated, use `server.port` on client spans and `client.port` on server spans. /// +/// ## Notes +/// /// # Examples /// /// - `8080` @@ -3961,6 +4781,8 @@ pub const NET_PEER_PORT: &str = "net.peer.port"; /// Deprecated, use `network.protocol.name`. /// +/// ## Notes +/// /// # Examples /// /// - `"amqp"` @@ -3972,6 +4794,8 @@ pub const NET_PROTOCOL_NAME: &str = "net.protocol.name"; /// Deprecated, use `network.protocol.version`. /// +/// ## Notes +/// /// # Examples /// /// - `"3.1.1"` @@ -3979,13 +4803,17 @@ pub const NET_PROTOCOL_NAME: &str = "net.protocol.name"; #[deprecated(note = "Replaced by `network.protocol.version`.")] pub const NET_PROTOCOL_VERSION: &str = "net.protocol.version"; -/// Deprecated, use `network.transport` and `network.type` +/// 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`. /// +/// ## Notes +/// /// # Examples /// /// - `"/var/my.sock"` @@ -3995,6 +4823,8 @@ pub const NET_SOCK_HOST_ADDR: &str = "net.sock.host.addr"; /// Deprecated, use `network.local.port`. /// +/// ## Notes +/// /// # Examples /// /// - `8080` @@ -4004,6 +4834,8 @@ pub const NET_SOCK_HOST_PORT: &str = "net.sock.host.port"; /// Deprecated, use `network.peer.address`. /// +/// ## Notes +/// /// # Examples /// /// - `"192.168.0.1"` @@ -4013,6 +4845,8 @@ pub const NET_SOCK_PEER_ADDR: &str = "net.sock.peer.addr"; /// Deprecated, no replacement at this time. /// +/// ## Notes +/// /// # Examples /// /// - `"/var/my.sock"` @@ -4022,6 +4856,8 @@ pub const NET_SOCK_PEER_NAME: &str = "net.sock.peer.name"; /// Deprecated, use `network.peer.port`. /// +/// ## Notes +/// /// # Examples /// /// - `65531` @@ -4029,13 +4865,17 @@ pub const NET_SOCK_PEER_NAME: &str = "net.sock.peer.name"; #[deprecated(note = "Replaced by `network.peer.port`.")] pub const NET_SOCK_PEER_PORT: &str = "net.sock.peer.port"; -/// Deprecated, use `network.transport` +/// 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. /// +/// ## Notes +/// /// # Examples /// /// - `"DE"` @@ -4044,6 +4884,8 @@ pub const NETWORK_CARRIER_ICC: &str = "network.carrier.icc"; /// The mobile carrier country code. /// +/// ## Notes +/// /// # Examples /// /// - `"310"` @@ -4052,6 +4894,8 @@ pub const NETWORK_CARRIER_MCC: &str = "network.carrier.mcc"; /// The mobile carrier network code. /// +/// ## Notes +/// /// # Examples /// /// - `"001"` @@ -4060,6 +4904,8 @@ pub const NETWORK_CARRIER_MNC: &str = "network.carrier.mnc"; /// The name of the mobile carrier. /// +/// ## Notes +/// /// # Examples /// /// - `"sprint"` @@ -4068,6 +4914,8 @@ pub const NETWORK_CARRIER_NAME: &str = "network.carrier.name"; /// This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. /// +/// ## Notes +/// /// # Examples /// /// - `"LTE"` @@ -4076,14 +4924,28 @@ pub const NETWORK_CONNECTION_SUBTYPE: &str = "network.connection.subtype"; /// The internet connection type. /// +/// ## Notes +/// /// # Examples /// /// - `"wifi"` #[cfg(feature = "semconv_experimental")] pub const NETWORK_CONNECTION_TYPE: &str = "network.connection.type"; +/// The network interface name. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"lo"` +/// - `"eth0"` +pub const NETWORK_INTERFACE_NAME: &str = "network.interface.name"; + /// The network IO operation direction. /// +/// ## Notes +/// /// # Examples /// /// - `"transmit"` @@ -4092,6 +4954,8 @@ pub const NETWORK_IO_DIRECTION: &str = "network.io.direction"; /// Local address of the network connection - IP address or Unix domain socket name. /// +/// ## Notes +/// /// # Examples /// /// - `"10.1.2.80"` @@ -4100,6 +4964,8 @@ pub const NETWORK_LOCAL_ADDRESS: &str = "network.local.address"; /// Local port number of the network connection. /// +/// ## Notes +/// /// # Examples /// /// - `65123` @@ -4107,6 +4973,8 @@ pub const NETWORK_LOCAL_PORT: &str = "network.local.port"; /// Peer address of the network connection - IP address or Unix domain socket name. /// +/// ## Notes +/// /// # Examples /// /// - `"10.1.2.80"` @@ -4115,12 +4983,14 @@ pub const NETWORK_PEER_ADDRESS: &str = "network.peer.address"; /// Peer port number of the network connection. /// +/// ## Notes +/// /// # Examples /// /// - `65123` pub const NETWORK_PEER_PORT: &str = "network.peer.port"; -/// [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. +/// [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. /// /// ## Notes /// @@ -4145,7 +5015,7 @@ pub const NETWORK_PROTOCOL_NAME: &str = "network.protocol.name"; /// - `"2"` pub const NETWORK_PROTOCOL_VERSION: &str = "network.protocol.version"; -/// [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). +/// [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). /// /// ## Notes /// @@ -4161,7 +5031,7 @@ pub const NETWORK_PROTOCOL_VERSION: &str = "network.protocol.version"; /// - `"udp"` pub const NETWORK_TRANSPORT: &str = "network.transport"; -/// [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. +/// [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. /// /// ## Notes /// @@ -4173,7 +5043,9 @@ pub const NETWORK_TRANSPORT: &str = "network.transport"; /// - `"ipv6"` pub const NETWORK_TYPE: &str = "network.type"; -/// The state of event loop time +/// The state of event loop time. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const NODEJS_EVENTLOOP_STATE: &str = "nodejs.eventloop.state"; @@ -4200,6 +5072,8 @@ pub const OPENTRACING_REF_TYPE: &str = "opentracing.ref_type"; /// Unique identifier for a particular build or compilation of the operating system. /// +/// ## Notes +/// /// # Examples /// /// - `"TQ3C.230805.001.B2"` @@ -4210,6 +5084,8 @@ pub const OS_BUILD_ID: &str = "os.build_id"; /// Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. /// +/// ## Notes +/// /// # Examples /// /// - `"Microsoft Windows [Version 10.0.18363.778]"` @@ -4219,6 +5095,8 @@ pub const OS_DESCRIPTION: &str = "os.description"; /// Human readable operating system name. /// +/// ## Notes +/// /// # Examples /// /// - `"iOS"` @@ -4227,12 +5105,16 @@ pub const OS_DESCRIPTION: &str = "os.description"; #[cfg(feature = "semconv_experimental")] pub const OS_NAME: &str = "os.name"; -/// The operating system type +/// The operating system type. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const OS_TYPE: &str = "os.type"; /// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). /// +/// ## Notes +/// /// # Examples /// /// - `"14.2.1"` @@ -4242,6 +5124,8 @@ pub const OS_VERSION: &str = "os.version"; /// Deprecated. Use the `otel.scope.name` attribute /// +/// ## Notes +/// /// # Examples /// /// - `"io.opentelemetry.contrib.mongodb"` @@ -4251,6 +5135,8 @@ pub const OTEL_LIBRARY_NAME: &str = "otel.library.name"; /// Deprecated. Use the `otel.scope.version` attribute. /// +/// ## Notes +/// /// # Examples /// /// - `"1.0.0"` @@ -4260,6 +5146,8 @@ pub const OTEL_LIBRARY_VERSION: &str = "otel.library.version"; /// The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). /// +/// ## Notes +/// /// # Examples /// /// - `"io.opentelemetry.contrib.mongodb"` @@ -4267,16 +5155,22 @@ pub const OTEL_SCOPE_NAME: &str = "otel.scope.name"; /// The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). /// +/// ## Notes +/// /// # Examples /// /// - `"1.0.0"` pub const OTEL_SCOPE_VERSION: &str = "otel.scope.version"; -/// Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET +/// Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. +/// +/// ## Notes pub const OTEL_STATUS_CODE: &str = "otel.status_code"; /// Description of the Status if it has a value, otherwise not set. /// +/// ## Notes +/// /// # Examples /// /// - `"resource not found"` @@ -4284,6 +5178,8 @@ pub const OTEL_STATUS_DESCRIPTION: &str = "otel.status_description"; /// Deprecated, use `db.client.connection.state` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"idle"` @@ -4293,6 +5189,8 @@ 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. /// +/// ## Notes +/// /// # Examples /// /// - `"AuthTokenCache"` @@ -4301,6 +5199,8 @@ pub const PEER_SERVICE: &str = "peer.service"; /// Deprecated, use `db.client.connection.pool.name` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"myDataSource"` @@ -4322,6 +5222,8 @@ pub const PROCESS_ARGS_COUNT: &str = "process.args_count"; /// The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. /// +/// ## Notes +/// /// # Examples /// /// - `"cmd/otelcol"` @@ -4330,6 +5232,8 @@ pub const PROCESS_COMMAND: &str = "process.command"; /// All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -4341,23 +5245,31 @@ pub const PROCESS_COMMAND_ARGS: &str = "process.command_args"; /// The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"C:\\cmd\\otecol --config=\"my directory\\config.yaml\""` #[cfg(feature = "semconv_experimental")] pub const PROCESS_COMMAND_LINE: &str = "process.command_line"; -/// Specifies whether the context switches for this data point were voluntary or involuntary +/// Specifies whether the context switches for this data point were voluntary or involuntary. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const PROCESS_CONTEXT_SWITCH_TYPE: &str = "process.context_switch_type"; -/// Deprecated, use `cpu.mode` instead +/// Deprecated, use `cpu.mode` instead. +/// +/// ## 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. /// +/// ## Notes +/// /// # Examples /// /// - `"2023-11-21T09:25:34.853Z"` @@ -4366,6 +5278,8 @@ pub const PROCESS_CREATION_TIME: &str = "process.creation.time"; /// The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). /// +/// ## Notes +/// /// # Examples /// /// - `"c89b11207f6479603b0d49bf291c092c2b719293"` @@ -4374,6 +5288,8 @@ pub const PROCESS_EXECUTABLE_BUILD_ID_GNU: &str = "process.executable.build_id.g /// The Go build ID as retrieved by `go tool buildid `. /// +/// ## Notes +/// /// # Examples /// /// - `"foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY"` @@ -4382,14 +5298,29 @@ pub const PROCESS_EXECUTABLE_BUILD_ID_GO: &str = "process.executable.build_id.go /// Profiling specific build ID for executables. See the OTel specification for Profiles for more information. /// +/// ## Notes +/// +/// # Examples +/// +/// - `"600DCAFE4A110000F2BF38C493F5FB92"` +#[cfg(feature = "semconv_experimental")] +pub const PROCESS_EXECUTABLE_BUILD_ID_HTLHASH: &str = "process.executable.build_id.htlhash"; + +/// "Deprecated, use `process.executable.build_id.htlhash` instead." +/// +/// ## Notes +/// /// # Examples /// /// - `"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`. /// +/// ## Notes +/// /// # Examples /// /// - `"otelcol"` @@ -4398,6 +5329,8 @@ pub const PROCESS_EXECUTABLE_NAME: &str = "process.executable.name"; /// The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. /// +/// ## Notes +/// /// # Examples /// /// - `"/usr/bin/cmd/otelcol"` @@ -4406,6 +5339,8 @@ pub const PROCESS_EXECUTABLE_PATH: &str = "process.executable.path"; /// The exit code of the process. /// +/// ## Notes +/// /// # Examples /// /// - `127` @@ -4414,6 +5349,8 @@ pub const PROCESS_EXIT_CODE: &str = "process.exit.code"; /// The date and time the process exited, in ISO 8601 format. /// +/// ## Notes +/// /// # Examples /// /// - `"2023-11-21T09:26:12.315Z"` @@ -4422,30 +5359,53 @@ pub const PROCESS_EXIT_TIME: &str = "process.exit.time"; /// The PID of the process's group leader. This is also the process group ID (PGID) of the process. /// +/// ## Notes +/// /// # Examples /// /// - `23` #[cfg(feature = "semconv_experimental")] pub const PROCESS_GROUP_LEADER_PID: &str = "process.group_leader.pid"; -/// Whether the process is connected to an interactive shell +/// Whether the process is connected to an interactive shell. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const PROCESS_INTERACTIVE: &str = "process.interactive"; +/// The control group associated with the process. +/// +/// ## Notes +/// +/// Control groups (cgroups) are a kernel feature used to organize and manage process resources. This attribute provides the path(s) to the cgroup(s) associated with the process, which should match the contents of the [/proc/\[PID\]/cgroup](https://man7.org/linux/man-pages/man7/cgroups.7.html) file. +/// +/// # Examples +/// +/// - `"1:name=systemd:/user.slice/user-1000.slice/session-3.scope"` +/// - `"0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope"` +#[cfg(feature = "semconv_experimental")] +pub const PROCESS_LINUX_CGROUP: &str = "process.linux.cgroup"; + /// The username of the user that owns the process. /// +/// ## Notes +/// /// # Examples /// /// - `"root"` #[cfg(feature = "semconv_experimental")] pub const PROCESS_OWNER: &str = "process.owner"; -/// The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults +/// The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const PROCESS_PAGING_FAULT_TYPE: &str = "process.paging.fault_type"; /// Parent Process identifier (PPID). /// +/// ## Notes +/// /// # Examples /// /// - `111` @@ -4454,6 +5414,8 @@ pub const PROCESS_PARENT_PID: &str = "process.parent_pid"; /// Process identifier (PID). /// +/// ## Notes +/// /// # Examples /// /// - `1234` @@ -4462,6 +5424,8 @@ pub const PROCESS_PID: &str = "process.pid"; /// The real user ID (RUID) of the process. /// +/// ## Notes +/// /// # Examples /// /// - `1000` @@ -4470,6 +5434,8 @@ pub const PROCESS_REAL_USER_ID: &str = "process.real_user.id"; /// The username of the real user of the process. /// +/// ## Notes +/// /// # Examples /// /// - `"operator"` @@ -4478,6 +5444,8 @@ pub const PROCESS_REAL_USER_NAME: &str = "process.real_user.name"; /// An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. /// +/// ## Notes +/// /// # Examples /// /// - `"Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0"` @@ -4486,6 +5454,8 @@ pub const PROCESS_RUNTIME_DESCRIPTION: &str = "process.runtime.description"; /// The name of the runtime of this process. /// +/// ## Notes +/// /// # Examples /// /// - `"OpenJDK Runtime Environment"` @@ -4494,6 +5464,8 @@ pub const PROCESS_RUNTIME_NAME: &str = "process.runtime.name"; /// The version of the runtime of this process, as returned by the runtime without modification. /// +/// ## Notes +/// /// # Examples /// /// - `"14.0.2"` @@ -4502,6 +5474,8 @@ pub const PROCESS_RUNTIME_VERSION: &str = "process.runtime.version"; /// The saved user ID (SUID) of the process. /// +/// ## Notes +/// /// # Examples /// /// - `1002` @@ -4510,6 +5484,8 @@ pub const PROCESS_SAVED_USER_ID: &str = "process.saved_user.id"; /// The username of the saved user. /// +/// ## Notes +/// /// # Examples /// /// - `"operator"` @@ -4518,6 +5494,8 @@ pub const PROCESS_SAVED_USER_NAME: &str = "process.saved_user.name"; /// The PID of the process's session leader. This is also the session ID (SID) of the process. /// +/// ## Notes +/// /// # Examples /// /// - `14` @@ -4540,6 +5518,8 @@ pub const PROCESS_TITLE: &str = "process.title"; /// The effective user ID (EUID) of the process. /// +/// ## Notes +/// /// # Examples /// /// - `1001` @@ -4548,6 +5528,8 @@ pub const PROCESS_USER_ID: &str = "process.user.id"; /// The username of the effective user of the process. /// +/// ## Notes +/// /// # Examples /// /// - `"root"` @@ -4568,6 +5550,8 @@ pub const PROCESS_VPID: &str = "process.vpid"; /// The working directory of the process. /// +/// ## Notes +/// /// # Examples /// /// - `"/root"` @@ -4576,13 +5560,17 @@ pub const PROCESS_WORKING_DIRECTORY: &str = "process.working_directory"; /// Describes the interpreter or compiler of a single frame. /// +/// ## Notes +/// /// # Examples /// /// - `"cpython"` #[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://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const RPC_CONNECT_RPC_ERROR_CODE: &str = "rpc.connect_rpc.error_code"; @@ -4634,12 +5622,16 @@ pub const RPC_GRPC_REQUEST_METADATA: &str = "rpc.grpc.request.metadata"; #[cfg(feature = "semconv_experimental")] pub const RPC_GRPC_RESPONSE_METADATA: &str = "rpc.grpc.response.metadata"; -/// The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request +/// The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const RPC_GRPC_STATUS_CODE: &str = "rpc.grpc.status_code"; /// `error.code` property of response if it is an error response. /// +/// ## Notes +/// /// # Examples /// /// - `-32700` @@ -4649,6 +5641,8 @@ pub const RPC_JSONRPC_ERROR_CODE: &str = "rpc.jsonrpc.error_code"; /// `error.message` property of response if it is an error response. /// +/// ## Notes +/// /// # Examples /// /// - `"Parse error"` @@ -4658,6 +5652,8 @@ pub const RPC_JSONRPC_ERROR_MESSAGE: &str = "rpc.jsonrpc.error_message"; /// `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. /// +/// ## Notes +/// /// # Examples /// /// - `"10"` @@ -4668,6 +5664,8 @@ pub const RPC_JSONRPC_REQUEST_ID: &str = "rpc.jsonrpc.request_id"; /// Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. /// +/// ## Notes +/// /// # Examples /// /// - `"2.0"` @@ -4675,7 +5673,9 @@ pub const RPC_JSONRPC_REQUEST_ID: &str = "rpc.jsonrpc.request_id"; #[cfg(feature = "semconv_experimental")] pub const RPC_JSONRPC_VERSION: &str = "rpc.jsonrpc.version"; -/// Compressed size of the message in bytes +/// Compressed size of the message in bytes. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const RPC_MESSAGE_COMPRESSED_SIZE: &str = "rpc.message.compressed_size"; @@ -4687,11 +5687,15 @@ pub const RPC_MESSAGE_COMPRESSED_SIZE: &str = "rpc.message.compressed_size"; #[cfg(feature = "semconv_experimental")] pub const RPC_MESSAGE_ID: &str = "rpc.message.id"; -/// Whether this is a received or sent message +/// Whether this is a received or sent message. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const RPC_MESSAGE_TYPE: &str = "rpc.message.type"; -/// Uncompressed size of the message in bytes +/// Uncompressed size of the message in bytes. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const RPC_MESSAGE_UNCOMPRESSED_SIZE: &str = "rpc.message.uncompressed_size"; @@ -4719,7 +5723,9 @@ pub const RPC_METHOD: &str = "rpc.method"; #[cfg(feature = "semconv_experimental")] pub const RPC_SERVICE: &str = "rpc.service"; -/// A string identifying the remoting system. See below for a list of well-known identifiers +/// A string identifying the remoting system. See below for a list of well-known identifiers. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const RPC_SYSTEM: &str = "rpc.system"; @@ -4765,7 +5771,7 @@ pub const SERVER_PORT: &str = "server.port"; /// /// UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is /// needed. Similar to what can be seen in the man page for the -/// [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) file, the underlying +/// [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying /// data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it /// or not via another resource attribute. /// @@ -4811,6 +5817,8 @@ pub const SERVICE_NAMESPACE: &str = "service.namespace"; /// The version string of the service API or implementation. The format is not defined by these conventions. /// +/// ## Notes +/// /// # Examples /// /// - `"2.0.0"` @@ -4819,6 +5827,8 @@ pub const SERVICE_VERSION: &str = "service.version"; /// A unique id to identify a session. /// +/// ## Notes +/// /// # Examples /// /// - `"00112233-4455-6677-8899-aabbccddeeff"` @@ -4827,6 +5837,8 @@ pub const SESSION_ID: &str = "session.id"; /// The previous `session.id` for this user, when known. /// +/// ## Notes +/// /// # Examples /// /// - `"00112233-4455-6677-8899-aabbccddeeff"` @@ -4835,6 +5847,8 @@ pub const SESSION_PREVIOUS_ID: &str = "session.previous_id"; /// SignalR HTTP connection closure status. /// +/// ## Notes +/// /// # Examples /// /// - `"app_shutdown"` @@ -4843,6 +5857,8 @@ pub const SIGNALR_CONNECTION_STATUS: &str = "signalr.connection.status"; /// [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) /// +/// ## Notes +/// /// # Examples /// /// - `"web_sockets"` @@ -4865,6 +5881,8 @@ pub const SOURCE_ADDRESS: &str = "source.address"; /// Source port number /// +/// ## Notes +/// /// # Examples /// /// - `3389` @@ -4874,6 +5892,8 @@ pub const SOURCE_PORT: &str = "source.port"; /// The logical CPU number \[0..n-1\] /// +/// ## Notes +/// /// # Examples /// /// - `1` @@ -4882,6 +5902,8 @@ pub const SYSTEM_CPU_LOGICAL_NUMBER: &str = "system.cpu.logical_number"; /// Deprecated, use `cpu.mode` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"idle"` @@ -4892,6 +5914,8 @@ pub const SYSTEM_CPU_STATE: &str = "system.cpu.state"; /// The device identifier /// +/// ## Notes +/// /// # Examples /// /// - `"(identifier)"` @@ -4900,6 +5924,8 @@ pub const SYSTEM_DEVICE: &str = "system.device"; /// The filesystem mode /// +/// ## Notes +/// /// # Examples /// /// - `"rw, ro"` @@ -4908,6 +5934,8 @@ pub const SYSTEM_FILESYSTEM_MODE: &str = "system.filesystem.mode"; /// The filesystem mount path /// +/// ## Notes +/// /// # Examples /// /// - `"/mnt/data"` @@ -4916,6 +5944,8 @@ pub const SYSTEM_FILESYSTEM_MOUNTPOINT: &str = "system.filesystem.mountpoint"; /// The filesystem state /// +/// ## Notes +/// /// # Examples /// /// - `"used"` @@ -4924,6 +5954,8 @@ pub const SYSTEM_FILESYSTEM_STATE: &str = "system.filesystem.state"; /// The filesystem type /// +/// ## Notes +/// /// # Examples /// /// - `"ext4"` @@ -4932,6 +5964,8 @@ pub const SYSTEM_FILESYSTEM_TYPE: &str = "system.filesystem.type"; /// The memory state /// +/// ## Notes +/// /// # Examples /// /// - `"free"` @@ -4941,6 +5975,8 @@ pub const SYSTEM_MEMORY_STATE: &str = "system.memory.state"; /// A stateless protocol MUST NOT set this attribute /// +/// ## Notes +/// /// # Examples /// /// - `"close_wait"` @@ -4949,6 +5985,8 @@ pub const SYSTEM_NETWORK_STATE: &str = "system.network.state"; /// The paging access direction /// +/// ## Notes +/// /// # Examples /// /// - `"in"` @@ -4957,6 +5995,8 @@ pub const SYSTEM_PAGING_DIRECTION: &str = "system.paging.direction"; /// The memory paging state /// +/// ## Notes +/// /// # Examples /// /// - `"free"` @@ -4965,6 +6005,8 @@ pub const SYSTEM_PAGING_STATE: &str = "system.paging.state"; /// The memory paging type /// +/// ## Notes +/// /// # Examples /// /// - `"minor"` @@ -4973,6 +6015,8 @@ pub const SYSTEM_PAGING_TYPE: &str = "system.paging.type"; /// The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) /// +/// ## Notes +/// /// # Examples /// /// - `"running"` @@ -4981,6 +6025,8 @@ pub const SYSTEM_PROCESS_STATUS: &str = "system.process.status"; /// Deprecated, use `system.process.status` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"running"` @@ -5003,13 +6049,17 @@ pub const TELEMETRY_DISTRO_NAME: &str = "telemetry.distro.name"; /// The version string of the auto instrumentation agent or distribution, if used. /// +/// ## Notes +/// /// # Examples /// /// - `"1.2.3"` #[cfg(feature = "semconv_experimental")] pub const TELEMETRY_DISTRO_VERSION: &str = "telemetry.distro.version"; -/// The language of the telemetry SDK +/// The language of the telemetry SDK. +/// +/// ## Notes pub const TELEMETRY_SDK_LANGUAGE: &str = "telemetry.sdk.language"; /// The name of the telemetry SDK as defined above. @@ -5030,12 +6080,16 @@ pub const TELEMETRY_SDK_NAME: &str = "telemetry.sdk.name"; /// The version string of the telemetry SDK. /// +/// ## Notes +/// /// # Examples /// /// - `"1.2.3"` pub const TELEMETRY_SDK_VERSION: &str = "telemetry.sdk.version"; -/// The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). +/// The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case). +/// +/// ## Notes /// /// # Examples /// @@ -5047,6 +6101,8 @@ pub const TEST_CASE_NAME: &str = "test.case.name"; /// The status of the actual test case result from test execution. /// +/// ## Notes +/// /// # Examples /// /// - `"pass"` @@ -5054,7 +6110,9 @@ pub const TEST_CASE_NAME: &str = "test.case.name"; #[cfg(feature = "semconv_experimental")] pub const TEST_CASE_RESULT_STATUS: &str = "test.case.result.status"; -/// The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). +/// The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite). +/// +/// ## Notes /// /// # Examples /// @@ -5064,6 +6122,8 @@ pub const TEST_SUITE_NAME: &str = "test.suite.name"; /// The status of the test suite run. /// +/// ## Notes +/// /// # Examples /// /// - `"success"` @@ -5077,6 +6137,8 @@ pub const TEST_SUITE_RUN_STATUS: &str = "test.suite.run.status"; /// Current "managed" thread ID (as opposed to OS thread ID). /// +/// ## Notes +/// /// # Examples /// /// - `42` @@ -5085,6 +6147,8 @@ pub const THREAD_ID: &str = "thread.id"; /// Current thread name. /// +/// ## Notes +/// /// # Examples /// /// - `"main"` @@ -5106,6 +6170,8 @@ pub const TLS_CIPHER: &str = "tls.cipher"; /// PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list. /// +/// ## Notes +/// /// # Examples /// /// - `"MII..."` @@ -5114,6 +6180,8 @@ pub const TLS_CLIENT_CERTIFICATE: &str = "tls.client.certificate"; /// Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -5125,6 +6193,8 @@ pub const TLS_CLIENT_CERTIFICATE_CHAIN: &str = "tls.client.certificate_chain"; /// Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. /// +/// ## Notes +/// /// # Examples /// /// - `"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"` @@ -5133,6 +6203,8 @@ pub const TLS_CLIENT_HASH_MD5: &str = "tls.client.hash.md5"; /// Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. /// +/// ## Notes +/// /// # Examples /// /// - `"9E393D93138888D288266C2D915214D1D1CCEB2A"` @@ -5141,6 +6213,8 @@ pub const TLS_CLIENT_HASH_SHA1: &str = "tls.client.hash.sha1"; /// Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. /// +/// ## Notes +/// /// # Examples /// /// - `"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"` @@ -5149,6 +6223,8 @@ pub const TLS_CLIENT_HASH_SHA256: &str = "tls.client.hash.sha256"; /// Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. /// +/// ## Notes +/// /// # Examples /// /// - `"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"` @@ -5157,6 +6233,8 @@ pub const TLS_CLIENT_ISSUER: &str = "tls.client.issuer"; /// A hash that identifies clients based on how they perform an SSL/TLS handshake. /// +/// ## Notes +/// /// # Examples /// /// - `"d4e5b18d6b55c71272893221c96ba240"` @@ -5165,6 +6243,8 @@ pub const TLS_CLIENT_JA3: &str = "tls.client.ja3"; /// Date/Time indicating when client certificate is no longer considered valid. /// +/// ## Notes +/// /// # Examples /// /// - `"2021-01-01T00:00:00.000Z"` @@ -5173,6 +6253,8 @@ pub const TLS_CLIENT_NOT_AFTER: &str = "tls.client.not_after"; /// Date/Time indicating when client certificate is first considered valid. /// +/// ## Notes +/// /// # Examples /// /// - `"1970-01-01T00:00:00.000Z"` @@ -5181,6 +6263,8 @@ pub const TLS_CLIENT_NOT_BEFORE: &str = "tls.client.not_before"; /// Deprecated, use `server.address` instead. /// +/// ## Notes +/// /// # Examples /// /// - `"opentelemetry.io"` @@ -5190,6 +6274,8 @@ pub const TLS_CLIENT_SERVER_NAME: &str = "tls.client.server_name"; /// Distinguished name of subject of the x.509 certificate presented by the client. /// +/// ## Notes +/// /// # Examples /// /// - `"CN=myclient, OU=Documentation Team, DC=example, DC=com"` @@ -5198,6 +6284,8 @@ pub const TLS_CLIENT_SUBJECT: &str = "tls.client.subject"; /// Array of ciphers offered by the client during the client hello. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -5209,6 +6297,8 @@ pub const TLS_CLIENT_SUPPORTED_CIPHERS: &str = "tls.client.supported_ciphers"; /// String indicating the curve used for the given cipher, when applicable /// +/// ## Notes +/// /// # Examples /// /// - `"secp256r1"` @@ -5217,6 +6307,8 @@ pub const TLS_CURVE: &str = "tls.curve"; /// Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel. /// +/// ## Notes +/// /// # Examples /// /// - `true` @@ -5225,6 +6317,8 @@ pub const TLS_ESTABLISHED: &str = "tls.established"; /// String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case. /// +/// ## Notes +/// /// # Examples /// /// - `"http/1.1"` @@ -5232,11 +6326,15 @@ pub const TLS_ESTABLISHED: &str = "tls.established"; 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) +/// +/// ## 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) /// +/// ## Notes +/// /// # Examples /// /// - `"1.2"` @@ -5246,6 +6344,8 @@ pub const TLS_PROTOCOL_VERSION: &str = "tls.protocol.version"; /// Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation. /// +/// ## Notes +/// /// # Examples /// /// - `true` @@ -5254,6 +6354,8 @@ pub const TLS_RESUMED: &str = "tls.resumed"; /// PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list. /// +/// ## Notes +/// /// # Examples /// /// - `"MII..."` @@ -5262,6 +6364,8 @@ pub const TLS_SERVER_CERTIFICATE: &str = "tls.server.certificate"; /// Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -5273,6 +6377,8 @@ pub const TLS_SERVER_CERTIFICATE_CHAIN: &str = "tls.server.certificate_chain"; /// Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. /// +/// ## Notes +/// /// # Examples /// /// - `"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"` @@ -5281,6 +6387,8 @@ pub const TLS_SERVER_HASH_MD5: &str = "tls.server.hash.md5"; /// Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. /// +/// ## Notes +/// /// # Examples /// /// - `"9E393D93138888D288266C2D915214D1D1CCEB2A"` @@ -5289,6 +6397,8 @@ pub const TLS_SERVER_HASH_SHA1: &str = "tls.server.hash.sha1"; /// Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. /// +/// ## Notes +/// /// # Examples /// /// - `"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"` @@ -5297,6 +6407,8 @@ pub const TLS_SERVER_HASH_SHA256: &str = "tls.server.hash.sha256"; /// Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. /// +/// ## Notes +/// /// # Examples /// /// - `"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"` @@ -5305,6 +6417,8 @@ pub const TLS_SERVER_ISSUER: &str = "tls.server.issuer"; /// A hash that identifies servers based on how they perform an SSL/TLS handshake. /// +/// ## Notes +/// /// # Examples /// /// - `"d4e5b18d6b55c71272893221c96ba240"` @@ -5313,6 +6427,8 @@ pub const TLS_SERVER_JA3S: &str = "tls.server.ja3s"; /// Date/Time indicating when server certificate is no longer considered valid. /// +/// ## Notes +/// /// # Examples /// /// - `"2021-01-01T00:00:00.000Z"` @@ -5321,6 +6437,8 @@ pub const TLS_SERVER_NOT_AFTER: &str = "tls.server.not_after"; /// Date/Time indicating when server certificate is first considered valid. /// +/// ## Notes +/// /// # Examples /// /// - `"1970-01-01T00:00:00.000Z"` @@ -5329,6 +6447,8 @@ pub const TLS_SERVER_NOT_BEFORE: &str = "tls.server.not_before"; /// Distinguished name of subject of the x.509 certificate presented by the server. /// +/// ## Notes +/// /// # Examples /// /// - `"CN=myserver, OU=Documentation Team, DC=example, DC=com"` @@ -5365,6 +6485,8 @@ pub const URL_EXTENSION: &str = "url.extension"; /// The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component /// +/// ## Notes +/// /// # Examples /// /// - `"SemConv"` @@ -5374,9 +6496,29 @@ pub const URL_FRAGMENT: &str = "url.fragment"; /// /// ## Notes /// -/// For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. -/// `url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`. -/// `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` SHOULD be scrubbed when instrumentations can identify it. +/// For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment +/// is not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. +/// +/// `url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. +/// In such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`. +/// +/// `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed). +/// +/// Sensitive content provided in `url.full` SHOULD be scrubbed when instrumentations can identify it. +/// +/// +/// Query string values for the following keys SHOULD be redacted by default and replaced by the +/// value `REDACTED`: +/// +/// - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) +/// - [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) +/// - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token) +/// - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls) +/// +/// This list is subject to change over time. +/// +/// When a query string value is redacted, the query string key SHOULD still be preserved, e.g. +/// `https://www.example.com/path?color=blue&sig=REDACTED`. /// /// # Examples /// @@ -5411,6 +6553,8 @@ pub const URL_PATH: &str = "url.path"; /// Port extracted from the `url.full` /// +/// ## Notes +/// /// # Examples /// /// - `443` @@ -5423,6 +6567,19 @@ pub const URL_PORT: &str = "url.port"; /// /// Sensitive content provided in `url.query` SHOULD be scrubbed when instrumentations can identify it. /// +/// +/// Query string values for the following keys SHOULD be redacted by default and replaced by the value `REDACTED`: +/// +/// - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) +/// - [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) +/// - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token) +/// - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls) +/// +/// This list is subject to change over time. +/// +/// When a query string value is redacted, the query string key SHOULD still be preserved, e.g. +/// `q=OpenTelemetry&sig=REDACTED`. +/// /// # Examples /// /// - `"q=OpenTelemetry"` @@ -5443,6 +6600,8 @@ pub const URL_REGISTERED_DOMAIN: &str = "url.registered_domain"; /// The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. /// +/// ## Notes +/// /// # Examples /// /// - `"https"` @@ -5465,6 +6624,8 @@ pub const URL_SUBDOMAIN: &str = "url.subdomain"; /// The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). /// +/// ## Notes +/// /// # Examples /// /// - `"/users/{id}"` @@ -5488,6 +6649,8 @@ pub const URL_TOP_LEVEL_DOMAIN: &str = "url.top_level_domain"; /// User email address. /// +/// ## Notes +/// /// # Examples /// /// - `"a.einstein@example.com"` @@ -5496,6 +6659,8 @@ pub const USER_EMAIL: &str = "user.email"; /// User's full name /// +/// ## Notes +/// /// # Examples /// /// - `"Albert Einstein"` @@ -5516,6 +6681,8 @@ pub const USER_HASH: &str = "user.hash"; /// Unique identifier of the user. /// +/// ## Notes +/// /// # Examples /// /// - `"S-1-5-21-202424912787-2692429404-2351956786-1000"` @@ -5524,6 +6691,8 @@ pub const USER_ID: &str = "user.id"; /// Short name or login/username of the user. /// +/// ## Notes +/// /// # Examples /// /// - `"a.einstein"` @@ -5532,6 +6701,8 @@ pub const USER_NAME: &str = "user.name"; /// Array of user roles at the time of the event. /// +/// ## Notes +/// /// # Examples /// /// - `[ @@ -5556,6 +6727,8 @@ pub const USER_AGENT_NAME: &str = "user_agent.name"; /// Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. /// +/// ## Notes +/// /// # Examples /// /// - `"CERN-LineMode/2.15 libwww/2.17b3"` @@ -5563,6 +6736,14 @@ 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"; +/// Specifies the category of synthetic traffic, such as tests or bots. +/// +/// ## Notes +/// +/// This attribute MAY be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests +#[cfg(feature = "semconv_experimental")] +pub const USER_AGENT_SYNTHETIC_TYPE: &str = "user_agent.synthetic.type"; + /// Version of the user-agent extracted from original. Usually refers to the browser's version /// /// ## Notes @@ -5576,7 +6757,9 @@ pub const USER_AGENT_ORIGINAL: &str = "user_agent.original"; #[cfg(feature = "semconv_experimental")] pub const USER_AGENT_VERSION: &str = "user_agent.version"; -/// The type of garbage collection +/// The type of garbage collection. +/// +/// ## Notes #[cfg(feature = "semconv_experimental")] pub const V8JS_GC_TYPE: &str = "v8js.gc.type"; @@ -5588,15 +6771,31 @@ pub const V8JS_GC_TYPE: &str = "v8js.gc.type"; #[cfg(feature = "semconv_experimental")] pub const V8JS_HEAP_SPACE_NAME: &str = "v8js.heap.space.name"; -/// The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. +/// The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. +/// +/// ## Notes /// /// # Examples /// /// - `"123"` #[cfg(feature = "semconv_experimental")] -pub const VCS_REPOSITORY_CHANGE_ID: &str = "vcs.repository.change.id"; +pub const VCS_CHANGE_ID: &str = "vcs.change.id"; -/// The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +/// The state of the change (pull request/merge request/changelist). +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"open"` +/// - `"closed"` +/// - `"merged"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_CHANGE_STATE: &str = "vcs.change.state"; + +/// The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +/// +/// ## Notes /// /// # Examples /// @@ -5604,16 +6803,29 @@ pub const VCS_REPOSITORY_CHANGE_ID: &str = "vcs.repository.change.id"; /// - `"feat: add my new feature"` /// - `"[chore] update dependency"` #[cfg(feature = "semconv_experimental")] -pub const VCS_REPOSITORY_CHANGE_TITLE: &str = "vcs.repository.change.title"; +pub const VCS_CHANGE_TITLE: &str = "vcs.change.title"; + +/// The type of line change being measured on a branch or change. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"added"` +/// - `"removed"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_LINE_CHANGE_TYPE: &str = "vcs.line_change.type"; /// The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. /// +/// ## Notes +/// /// # Examples /// /// - `"my-feature-branch"` /// - `"tag-1-test"` #[cfg(feature = "semconv_experimental")] -pub const VCS_REPOSITORY_REF_NAME: &str = "vcs.repository.ref.name"; +pub const VCS_REF_BASE_NAME: &str = "vcs.ref.base.name"; /// The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. /// @@ -5625,7 +6837,7 @@ pub const VCS_REPOSITORY_REF_NAME: &str = "vcs.repository.ref.name"; /// not necessarily have to be a hash; it can simply define a /// [revision number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) /// which is an integer that is monotonically increasing. In cases where -/// it is identical to the `ref.name`, it SHOULD still be included. It is +/// it is identical to the `ref.base.name`, it SHOULD still be included. It is /// up to the implementer to decide which value to set as the revision /// based on the VCS system and situational context. /// @@ -5636,18 +6848,140 @@ pub const VCS_REPOSITORY_REF_NAME: &str = "vcs.repository.ref.name"; /// - `"123"` /// - `"HEAD"` #[cfg(feature = "semconv_experimental")] -pub const VCS_REPOSITORY_REF_REVISION: &str = "vcs.repository.ref.revision"; +pub const VCS_REF_BASE_REVISION: &str = "vcs.ref.base.revision"; + +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"branch"` +/// - `"tag"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_BASE_TYPE: &str = "vcs.ref.base.type"; + +/// The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"my-feature-branch"` +/// - `"tag-1-test"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_HEAD_NAME: &str = "vcs.ref.head.name"; + +/// The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. +/// +/// ## Notes +/// +/// The revision can be a full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), +/// of the recorded change to a ref within a repository pointing to a +/// commit [commit](https://git-scm.com/docs/git-commit) object. It does +/// not necessarily have to be a hash; it can simply define a +/// [revision number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) +/// which is an integer that is monotonically increasing. In cases where +/// it is identical to the `ref.head.name`, it SHOULD still be included. It is +/// up to the implementer to decide which value to set as the revision +/// based on the VCS system and situational context. +/// +/// # Examples +/// +/// - `"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc"` +/// - `"main"` +/// - `"123"` +/// - `"HEAD"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_HEAD_REVISION: &str = "vcs.ref.head.revision"; + +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"branch"` +/// - `"tag"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_HEAD_TYPE: &str = "vcs.ref.head.type"; /// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. /// +/// ## Notes +/// /// # Examples /// /// - `"branch"` /// - `"tag"` #[cfg(feature = "semconv_experimental")] +pub const VCS_REF_TYPE: &str = "vcs.ref.type"; + +/// Deprecated, use `vcs.change.id` instead. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"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. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"Fixes broken thing"` +/// - `"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"; + +/// Deprecated, use `vcs.ref.head.name` instead. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"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. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc"` +/// - `"main"` +/// - `"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. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"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 [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. +/// The [URL](https://wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. +/// +/// ## Notes /// /// # Examples /// @@ -5656,8 +6990,21 @@ pub const VCS_REPOSITORY_REF_TYPE: &str = "vcs.repository.ref.type"; #[cfg(feature = "semconv_experimental")] pub const VCS_REPOSITORY_URL_FULL: &str = "vcs.repository.url.full"; +/// The type of revision comparison. +/// +/// ## Notes +/// +/// # Examples +/// +/// - `"ahead"` +/// - `"behind"` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REVISION_DELTA_DIRECTION: &str = "vcs.revision_delta.direction"; + /// Additional description of the web engine (e.g. detailed version and edition information). /// +/// ## Notes +/// /// # Examples /// /// - `"WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final"` @@ -5666,6 +7013,8 @@ pub const WEBENGINE_DESCRIPTION: &str = "webengine.description"; /// The name of the web engine. /// +/// ## Notes +/// /// # Examples /// /// - `"WildFly"` @@ -5674,6 +7023,8 @@ pub const WEBENGINE_NAME: &str = "webengine.name"; /// The version of the web engine. /// +/// ## Notes +/// /// # Examples /// /// - `"21.0.0"` diff --git a/opentelemetry-semantic-conventions/src/lib.rs b/opentelemetry-semantic-conventions/src/lib.rs index 5f97a6fbda..bdb0a9277e 100644 --- a/opentelemetry-semantic-conventions/src/lib.rs +++ b/opentelemetry-semantic-conventions/src/lib.rs @@ -14,8 +14,6 @@ #![doc( html_logo_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo.svg" )] -//TODO - remove once there are no empty lines after doc comments in the templates. -#![allow(clippy::empty_line_after_doc_comments)] pub mod attribute; pub mod metric; @@ -24,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.28.0"; +pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.29.0"; diff --git a/opentelemetry-semantic-conventions/src/metric.rs b/opentelemetry-semantic-conventions/src/metric.rs index fe23bf3693..837101e0df 100644 --- a/opentelemetry-semantic-conventions/src/metric.rs +++ b/opentelemetry-semantic-conventions/src/metric.rs @@ -280,11 +280,28 @@ pub const CONTAINER_MEMORY_USAGE: &str = "container.memory.usage"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` /// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` -/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const CONTAINER_NETWORK_IO: &str = "container.network.io"; +/// ## Description +/// +/// The time the container has been running +/// +/// ## Notes +/// +/// Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. +/// The actual accuracy would depend on the instrumentation and operating system +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +#[cfg(feature = "semconv_experimental")] +pub const CONTAINER_UPTIME: &str = "container.uptime"; + /// ## Description /// /// The number of connections that are currently in state described by the `state` attribute @@ -608,6 +625,52 @@ pub const DB_CLIENT_CONNECTIONS_USE_TIME: &str = "db.client.connections.use_time )] pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_time"; +/// ## Description +/// +/// Number of active client instances +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{instance}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`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")] +pub const DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT: &str = + "db.client.cosmosdb.active_instance.count"; + +/// ## Description +/// +/// [Request charge](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `{request_unit}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If available. +/// | [`crate::attribute::DB_COSMOSDB_CONSISTENCY_LEVEL`] | `Conditionally_required`: If available. +/// | [`crate::attribute::DB_COSMOSDB_REGIONS_CONTACTED`] | `{"recommended": "if available"}` +/// | [`crate::attribute::DB_COSMOSDB_SUB_STATUS_CODE`] | `Conditionally_required`: when response was received and contained sub-code. +/// | [`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_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` +/// | [`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")] +pub const DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE: &str = + "db.client.cosmosdb.operation.request_charge"; + /// ## Description /// /// Duration of database client operations. @@ -625,9 +688,11 @@ pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_ti /// ## Attributes /// | Name | Requirement | /// |:-|:- | -/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name in the query. +/// | [`crate::attribute::DB_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_NAMESPACE`] | `Conditionally_required`: If available. -/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. +/// | [`crate::attribute::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_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. /// | [`crate::attribute::DB_SYSTEM`] | `Required` /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally_required`: If and only if the operation failed. @@ -638,6 +703,34 @@ pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_ti #[cfg(feature = "semconv_experimental")] pub const DB_CLIENT_OPERATION_DURATION: &str = "db.client.operation.duration"; +/// ## Description +/// +/// The actual number of records returned by the database operation +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `histogram` | +/// | Unit: | `{row}` | +/// | Status: | `Experimental` | +/// +/// ## 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_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_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. +/// | [`crate::attribute::DB_SYSTEM`] | `Required` +/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally_required`: If and only if the operation failed. +/// | [`crate::attribute::NETWORK_PEER_ADDRESS`] | `{"recommended": "if applicable for this database system."}` +/// | [`crate::attribute::NETWORK_PEER_PORT`] | `{"recommended": "if and only if `network.peer.address` is set."}` +/// | [`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")] +pub const DB_CLIENT_RESPONSE_RETURNED_ROWS: &str = "db.client.response.returned_rows"; + /// ## Description /// /// Measures the time taken to perform a DNS lookup @@ -1174,7 +1267,7 @@ pub const FAAS_TIMEOUTS: &str = "faas.timeouts"; /// |:-|:- | /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally_required`: if the operation ended in an error /// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` -/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Conditionally_required`: If available. /// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` /// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` /// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` @@ -1196,7 +1289,7 @@ pub const GEN_AI_CLIENT_OPERATION_DURATION: &str = "gen_ai.client.operation.dura /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` -/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Conditionally_required`: If available. /// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` /// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` /// | [`crate::attribute::GEN_AI_TOKEN_TYPE`] | `Required` @@ -1220,7 +1313,7 @@ pub const GEN_AI_CLIENT_TOKEN_USAGE: &str = "gen_ai.client.token.usage"; /// |:-|:- | /// | [`crate::attribute::ERROR_TYPE`] | `Conditionally_required`: if the operation ended in an error /// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` -/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Conditionally_required`: If available. /// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` /// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` /// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` @@ -1242,7 +1335,7 @@ pub const GEN_AI_SERVER_REQUEST_DURATION: &str = "gen_ai.server.request.duration /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` -/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Conditionally_required`: If available. /// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` /// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` /// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` @@ -1264,7 +1357,7 @@ pub const GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: &str = "gen_ai.server.time_per_ou /// | Name | Requirement | /// |:-|:- | /// | [`crate::attribute::GEN_AI_OPERATION_NAME`] | `Required` -/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Required` +/// | [`crate::attribute::GEN_AI_REQUEST_MODEL`] | `Conditionally_required`: If available. /// | [`crate::attribute::GEN_AI_RESPONSE_MODEL`] | `Recommended` /// | [`crate::attribute::GEN_AI_SYSTEM`] | `Required` /// | [`crate::attribute::SERVER_ADDRESS`] | `Recommended` @@ -1535,6 +1628,7 @@ pub const HTTP_CLIENT_REQUEST_BODY_SIZE: &str = "http.client.request.body.size"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Required` /// | [`crate::attribute::SERVER_PORT`] | `Required` /// | [`crate::attribute::URL_SCHEME`] | `Opt_in` +/// | [`crate::attribute::URL_TEMPLATE`] | `Opt_in` pub const HTTP_CLIENT_REQUEST_DURATION: &str = "http.client.request.duration"; /// ## Description @@ -1612,6 +1706,7 @@ pub const HTTP_SERVER_ACTIVE_REQUESTS: &str = "http.server.active_requests"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Opt_in` /// | [`crate::attribute::SERVER_PORT`] | `Opt_in` /// | [`crate::attribute::URL_SCHEME`] | `Required` +/// | [`crate::attribute::USER_AGENT_SYNTHETIC_TYPE`] | `Opt_in` #[cfg(feature = "semconv_experimental")] pub const HTTP_SERVER_REQUEST_BODY_SIZE: &str = "http.server.request.body.size"; @@ -1637,6 +1732,7 @@ pub const HTTP_SERVER_REQUEST_BODY_SIZE: &str = "http.server.request.body.size"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Opt_in` /// | [`crate::attribute::SERVER_PORT`] | `Opt_in` /// | [`crate::attribute::URL_SCHEME`] | `Required` +/// | [`crate::attribute::USER_AGENT_SYNTHETIC_TYPE`] | `Opt_in` pub const HTTP_SERVER_REQUEST_DURATION: &str = "http.server.request.duration"; /// ## Description @@ -1665,6 +1761,7 @@ pub const HTTP_SERVER_REQUEST_DURATION: &str = "http.server.request.duration"; /// | [`crate::attribute::SERVER_ADDRESS`] | `Opt_in` /// | [`crate::attribute::SERVER_PORT`] | `Opt_in` /// | [`crate::attribute::URL_SCHEME`] | `Required` +/// | [`crate::attribute::USER_AGENT_SYNTHETIC_TYPE`] | `Opt_in` #[cfg(feature = "semconv_experimental")] pub const HTTP_SERVER_RESPONSE_BODY_SIZE: &str = "http.server.response.body.size"; @@ -2097,6 +2194,59 @@ pub const K8S_NODE_CPU_USAGE: &str = "k8s.node.cpu.usage"; #[cfg(feature = "semconv_experimental")] pub const K8S_NODE_MEMORY_USAGE: &str = "k8s.node.memory.usage"; +/// ## Description +/// +/// Node network errors +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{error}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` +/// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const K8S_NODE_NETWORK_ERRORS: &str = "k8s.node.network.errors"; + +/// ## Description +/// +/// Network bytes for the Node +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` +/// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const K8S_NODE_NETWORK_IO: &str = "k8s.node.network.io"; + +/// ## Description +/// +/// The time the Node has been running +/// +/// ## Notes +/// +/// Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. +/// The actual accuracy would depend on the instrumentation and operating system +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +#[cfg(feature = "semconv_experimental")] +pub const K8S_NODE_UPTIME: &str = "k8s.node.uptime"; + /// ## Description /// /// Total CPU time consumed @@ -2145,6 +2295,59 @@ pub const K8S_POD_CPU_USAGE: &str = "k8s.pod.cpu.usage"; #[cfg(feature = "semconv_experimental")] pub const K8S_POD_MEMORY_USAGE: &str = "k8s.pod.memory.usage"; +/// ## Description +/// +/// Pod network errors +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `{error}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` +/// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const K8S_POD_NETWORK_ERRORS: &str = "k8s.pod.network.errors"; + +/// ## Description +/// +/// Network bytes for the Pod +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `counter` | +/// | Unit: | `By` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` +/// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` +#[cfg(feature = "semconv_experimental")] +pub const K8S_POD_NETWORK_IO: &str = "k8s.pod.network.io"; + +/// ## Description +/// +/// The time the Pod has been running +/// +/// ## Notes +/// +/// Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. +/// The actual accuracy would depend on the instrumentation and operating system +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +#[cfg(feature = "semconv_experimental")] +pub const K8S_POD_UPTIME: &str = "k8s.pod.uptime"; + /// ## Description /// /// Number of connections that are currently active on the server. @@ -2895,11 +3098,12 @@ pub const PROCESS_THREAD_COUNT: &str = "process.thread.count"; /// /// ## Notes /// -/// Instrumentations SHOULD use counter with type `double` and measure uptime with at least millisecond precision +/// Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. +/// The actual accuracy would depend on the instrumentation and operating system /// ## Metadata /// | | | /// |:-|:- -/// | Instrument: | `counter` | +/// | Instrument: | `gauge` | /// | Unit: | `s` | /// | Status: | `Experimental` | #[cfg(feature = "semconv_experimental")] @@ -3503,8 +3707,8 @@ pub const SYSTEM_MEMORY_UTILIZATION: &str = "system.memory.utilization"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` /// | [`crate::attribute::NETWORK_TRANSPORT`] | `Recommended` -/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` /// | [`crate::attribute::SYSTEM_NETWORK_STATE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_NETWORK_CONNECTIONS: &str = "system.network.connections"; @@ -3530,8 +3734,8 @@ pub const SYSTEM_NETWORK_CONNECTIONS: &str = "system.network.connections"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` /// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` -/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_NETWORK_DROPPED: &str = "system.network.dropped"; @@ -3556,8 +3760,8 @@ pub const SYSTEM_NETWORK_DROPPED: &str = "system.network.dropped"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` /// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` -/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_NETWORK_ERRORS: &str = "system.network.errors"; @@ -3572,8 +3776,8 @@ pub const SYSTEM_NETWORK_ERRORS: &str = "system.network.errors"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::NETWORK_INTERFACE_NAME`] | `Recommended` /// | [`crate::attribute::NETWORK_IO_DIRECTION`] | `Recommended` -/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_NETWORK_IO: &str = "system.network.io"; @@ -3637,6 +3841,7 @@ pub const SYSTEM_PAGING_OPERATIONS: &str = "system.paging.operations"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` /// | [`crate::attribute::SYSTEM_PAGING_STATE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_PAGING_USAGE: &str = "system.paging.usage"; @@ -3652,6 +3857,7 @@ pub const SYSTEM_PAGING_USAGE: &str = "system.paging.usage"; /// ## Attributes /// | Name | Requirement | /// |:-|:- | +/// | [`crate::attribute::SYSTEM_DEVICE`] | `Recommended` /// | [`crate::attribute::SYSTEM_PAGING_STATE`] | `Recommended` #[cfg(feature = "semconv_experimental")] pub const SYSTEM_PAGING_UTILIZATION: &str = "system.paging.utilization"; @@ -3685,6 +3891,23 @@ pub const SYSTEM_PROCESS_COUNT: &str = "system.process.count"; #[cfg(feature = "semconv_experimental")] pub const SYSTEM_PROCESS_CREATED: &str = "system.process.created"; +/// ## Description +/// +/// The time the system has been running +/// +/// ## Notes +/// +/// Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. +/// The actual accuracy would depend on the instrumentation and operating system +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +#[cfg(feature = "semconv_experimental")] +pub const SYSTEM_UPTIME: &str = "system.uptime"; + /// ## Description /// /// Garbage collection duration. @@ -3789,3 +4012,181 @@ pub const V8JS_MEMORY_HEAP_LIMIT: &str = "v8js.memory.heap.limit"; /// | [`crate::attribute::V8JS_HEAP_SPACE_NAME`] | `Required` #[cfg(feature = "semconv_experimental")] pub const V8JS_MEMORY_HEAP_USED: &str = "v8js.memory.heap.used"; + +/// ## Description +/// +/// The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged) +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{change}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_CHANGE_STATE`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_CHANGE_COUNT: &str = "vcs.change.count"; + +/// ## Description +/// +/// The time duration a change (pull request/merge request/changelist) has been in a given state +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_CHANGE_STATE`] | `Required` +/// | [`crate::attribute::VCS_REF_HEAD_NAME`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_CHANGE_DURATION: &str = "vcs.change.duration"; + +/// ## Description +/// +/// The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_REF_HEAD_NAME`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_CHANGE_TIME_TO_APPROVAL: &str = "vcs.change.time_to_approval"; + +/// ## Description +/// +/// The number of unique contributors to a repository +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `{contributor}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_CONTRIBUTOR_COUNT: &str = "vcs.contributor.count"; + +/// ## Description +/// +/// The number of refs of type branch or tag in a repository +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{ref}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_REF_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_COUNT: &str = "vcs.ref.count"; + +/// ## Description +/// +/// The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute +/// +/// ## Notes +/// +/// This metric should be reported for each `vcs.line_change.type` value. For example if a ref added 3 lines and removed 2 lines, +/// instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers). +/// If number of lines added/removed should be calculated from the start of time, then `vcs.ref.base.name` SHOULD be set to an empty string +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `{line}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_CHANGE_ID`] | `Conditionally_required`: if a change is associate with the ref. +/// | [`crate::attribute::VCS_LINE_CHANGE_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REF_BASE_NAME`] | `Required` +/// | [`crate::attribute::VCS_REF_BASE_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REF_HEAD_NAME`] | `Required` +/// | [`crate::attribute::VCS_REF_HEAD_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_LINES_DELTA: &str = "vcs.ref.lines_delta"; + +/// ## Description +/// +/// The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute +/// +/// ## Notes +/// +/// This metric should be reported for each `vcs.revision_delta.direction` value. For example if branch `a` is 3 commits behind and 2 commits ahead of `trunk`, +/// instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers) and `vcs.ref.base.name` is set to `trunk` +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `{revision}` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_CHANGE_ID`] | `Conditionally_required`: if a change is associate with the ref. +/// | [`crate::attribute::VCS_REF_BASE_NAME`] | `Required` +/// | [`crate::attribute::VCS_REF_BASE_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REF_HEAD_NAME`] | `Required` +/// | [`crate::attribute::VCS_REF_HEAD_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +/// | [`crate::attribute::VCS_REVISION_DELTA_DIRECTION`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_REVISIONS_DELTA: &str = "vcs.ref.revisions_delta"; + +/// ## Description +/// +/// Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch` +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `gauge` | +/// | Unit: | `s` | +/// | Status: | `Experimental` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | [`crate::attribute::VCS_REF_HEAD_NAME`] | `Required` +/// | [`crate::attribute::VCS_REF_HEAD_TYPE`] | `Required` +/// | [`crate::attribute::VCS_REPOSITORY_URL_FULL`] | `Required` +#[cfg(feature = "semconv_experimental")] +pub const VCS_REF_TIME: &str = "vcs.ref.time"; + +/// ## Description +/// +/// The number of repositories in an organization +/// ## Metadata +/// | | | +/// |:-|:- +/// | Instrument: | `updowncounter` | +/// | Unit: | `{repository}` | +/// | Status: | `Experimental` | +#[cfg(feature = "semconv_experimental")] +pub const VCS_REPOSITORY_COUNT: &str = "vcs.repository.count"; diff --git a/opentelemetry-semantic-conventions/src/resource.rs b/opentelemetry-semantic-conventions/src/resource.rs index 6818d0d0e5..120fc36d50 100644 --- a/opentelemetry-semantic-conventions/src/resource.rs +++ b/opentelemetry-semantic-conventions/src/resource.rs @@ -359,6 +359,9 @@ pub use crate::attribute::PROCESS_EXECUTABLE_NAME; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::PROCESS_EXECUTABLE_PATH; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::PROCESS_LINUX_CGROUP; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::PROCESS_OWNER; diff --git a/opentelemetry-semantic-conventions/src/trace.rs b/opentelemetry-semantic-conventions/src/trace.rs index 1f29c433fa..a37ce1dead 100644 --- a/opentelemetry-semantic-conventions/src/trace.rs +++ b/opentelemetry-semantic-conventions/src/trace.rs @@ -131,21 +131,6 @@ pub use crate::attribute::CLIENT_PORT; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::CLOUD_RESOURCE_ID; -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::CLOUDEVENTS_EVENT_ID; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::CLOUDEVENTS_EVENT_SOURCE; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::CLOUDEVENTS_EVENT_SPEC_VERSION; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::CLOUDEVENTS_EVENT_SUBJECT; - -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::CLOUDEVENTS_EVENT_TYPE; - #[cfg(feature = "semconv_experimental")] pub use crate::attribute::DB_CASSANDRA_CONSISTENCY_LEVEL; @@ -174,7 +159,10 @@ pub use crate::attribute::DB_COSMOSDB_CLIENT_ID; pub use crate::attribute::DB_COSMOSDB_CONNECTION_MODE; #[cfg(feature = "semconv_experimental")] -pub use crate::attribute::DB_COSMOSDB_OPERATION_TYPE; +pub use crate::attribute::DB_COSMOSDB_CONSISTENCY_LEVEL; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::DB_COSMOSDB_REGIONS_CONTACTED; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::DB_COSMOSDB_REQUEST_CHARGE; @@ -201,11 +189,17 @@ pub use crate::attribute::DB_OPERATION_BATCH_SIZE; pub use crate::attribute::DB_OPERATION_NAME; #[cfg(feature = "semconv_experimental")] -pub use crate::attribute::DB_QUERY_PARAMETER; +pub use crate::attribute::DB_OPERATION_PARAMETER; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::DB_QUERY_SUMMARY; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::DB_QUERY_TEXT; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::DB_RESPONSE_RETURNED_ROWS; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::DB_RESPONSE_STATUS_CODE; @@ -214,9 +208,6 @@ pub use crate::attribute::DB_SYSTEM; pub use crate::attribute::ERROR_TYPE; -#[cfg(feature = "semconv_experimental")] -pub use crate::attribute::EVENT_NAME; - pub use crate::attribute::EXCEPTION_ESCAPED; pub use crate::attribute::EXCEPTION_MESSAGE; @@ -261,15 +252,30 @@ pub use crate::attribute::FAAS_TIME; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::FAAS_TRIGGER; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::FEATURE_FLAG_CONTEXT_ID; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::FEATURE_FLAG_EVALUATION_ERROR_MESSAGE; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::FEATURE_FLAG_EVALUATION_REASON; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::FEATURE_FLAG_KEY; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::FEATURE_FLAG_PROVIDER_NAME; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::FEATURE_FLAG_SET_ID; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::FEATURE_FLAG_VARIANT; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::FEATURE_FLAG_VERSION; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT; @@ -282,9 +288,15 @@ pub use crate::attribute::GEN_AI_OPENAI_REQUEST_SERVICE_TIER; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_OPENAI_RESPONSE_SERVICE_TIER; +#[cfg(feature = "semconv_experimental")] +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_REQUEST_ENCODING_FORMATS; + #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GEN_AI_REQUEST_FREQUENCY_PENALTY; @@ -336,6 +348,9 @@ pub use crate::attribute::GRAPHQL_OPERATION_NAME; #[cfg(feature = "semconv_experimental")] pub use crate::attribute::GRAPHQL_OPERATION_TYPE; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::HTTP_REQUEST_BODY_SIZE; + pub use crate::attribute::HTTP_REQUEST_HEADER; pub use crate::attribute::HTTP_REQUEST_METHOD; @@ -344,8 +359,17 @@ pub use crate::attribute::HTTP_REQUEST_METHOD_ORIGINAL; pub use crate::attribute::HTTP_REQUEST_RESEND_COUNT; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::HTTP_REQUEST_SIZE; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::HTTP_RESPONSE_BODY_SIZE; + pub use crate::attribute::HTTP_RESPONSE_HEADER; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::HTTP_RESPONSE_SIZE; + pub use crate::attribute::HTTP_RESPONSE_STATUS_CODE; pub use crate::attribute::HTTP_ROUTE; @@ -414,6 +438,21 @@ pub use crate::attribute::NETWORK_TRANSPORT; pub use crate::attribute::NETWORK_TYPE; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::PROCESS_COMMAND_ARGS; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::PROCESS_EXECUTABLE_NAME; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::PROCESS_EXECUTABLE_PATH; + +#[cfg(feature = "semconv_experimental")] +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; @@ -477,4 +516,10 @@ pub use crate::attribute::URL_QUERY; pub use crate::attribute::URL_SCHEME; +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::URL_TEMPLATE; + pub use crate::attribute::USER_AGENT_ORIGINAL; + +#[cfg(feature = "semconv_experimental")] +pub use crate::attribute::USER_AGENT_SYNTHETIC_TYPE;