This commit is contained in:
Christian Mantha
2026-03-02 19:10:52 -05:00
commit 2ca0b9ef7c
28907 changed files with 5233713 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
APP_BUILD_ID: Final = "app.build_id"
"""
Unique identifier for a particular build or compilation of the application.
"""
APP_INSTALLATION_ID: Final = "app.installation.id"
"""
A unique identifier representing the installation of an application on a specific device.
Note: Its value SHOULD persist across launches of the same application installation, including through application upgrades.
It SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled.
Additionally, users might be able to reset this value (e.g. by clearing application data).
If an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value.
If multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`.
Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`.
For iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor).
For Android, examples of `app.installation.id` implementations include:
- [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations).
- A globally unique UUID which is persisted across sessions in your application.
- [App set ID](https://developer.android.com/identity/app-set-id).
- [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID).
More information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids).
"""
APP_JANK_FRAME_COUNT: Final = "app.jank.frame_count"
"""
A number of frame renders that experienced jank.
Note: Depending on platform limitations, the value provided MAY be approximation.
"""
APP_JANK_PERIOD: Final = "app.jank.period"
"""
The time period, in seconds, for which this jank is being reported.
"""
APP_JANK_THRESHOLD: Final = "app.jank.threshold"
"""
The minimum rendering threshold for this jank, in seconds.
"""
APP_SCREEN_COORDINATE_X: Final = "app.screen.coordinate.x"
"""
The x (horizontal) coordinate of a screen coordinate, in screen pixels.
"""
APP_SCREEN_COORDINATE_Y: Final = "app.screen.coordinate.y"
"""
The y (vertical) component of a screen coordinate, in screen pixels.
"""
APP_SCREEN_ID: Final = "app.screen.id"
"""
An identifier that uniquely differentiates this screen from other screens in the same application.
Note: A screen represents only the part of the device display drawn by the app. It typically contains multiple widgets or UI components and is larger in scope than individual widgets. Multiple screens can coexist on the same display simultaneously (e.g., split view on tablets).
"""
APP_SCREEN_NAME: Final = "app.screen.name"
"""
The name of an application screen.
Note: A screen represents only the part of the device display drawn by the app. It typically contains multiple widgets or UI components and is larger in scope than individual widgets. Multiple screens can coexist on the same display simultaneously (e.g., split view on tablets).
"""
APP_WIDGET_ID: Final = "app.widget.id"
"""
An identifier that uniquely differentiates this widget from other widgets in the same application.
Note: A widget is an application component, typically an on-screen visual GUI element.
"""
APP_WIDGET_NAME: Final = "app.widget.name"
"""
The name of an application widget.
Note: A widget is an application component, typically an on-screen visual GUI element.
"""

View File

@@ -0,0 +1,62 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
ARTIFACT_ATTESTATION_FILENAME: Final = "artifact.attestation.filename"
"""
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.
"""
ARTIFACT_ATTESTATION_HASH: Final = "artifact.attestation.hash"
"""
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](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**.
"""
ARTIFACT_ATTESTATION_ID: Final = "artifact.attestation.id"
"""
The id of the build [software attestation](https://slsa.dev/attestation-model).
"""
ARTIFACT_FILENAME: Final = "artifact.filename"
"""
The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name.
Note: This file name can also act as the [Package Name](https://slsa.dev/spec/v1.0/terminology#package-model)
in cases where the package ecosystem maps accordingly.
Additionally, the artifact [can be published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain)
for others, but that is not a guarantee.
"""
ARTIFACT_HASH: Final = "artifact.hash"
"""
The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity.
Note: The specific algorithm used to create the cryptographic hash value is
not defined. In situations where an artifact has multiple
cryptographic hashes, it is up to the implementer to choose which
hash value to set here; this should be the most secure hash algorithm
that is suitable for the situation and consistent with the
corresponding attestation. The implementer can then provide the other
hash values through an additional set of attribute extensions as they
deem necessary.
"""
ARTIFACT_PURL: Final = "artifact.purl"
"""
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.
"""
ARTIFACT_VERSION: Final = "artifact.version"
"""
The version of the artifact.
"""

View File

@@ -0,0 +1,345 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
AWS_BEDROCK_GUARDRAIL_ID: Final = "aws.bedrock.guardrail.id"
"""
The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages.
"""
AWS_BEDROCK_KNOWLEDGE_BASE_ID: Final = "aws.bedrock.knowledge_base.id"
"""
The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts.
"""
AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: Final = (
"aws.dynamodb.attribute_definitions"
)
"""
The JSON-serialized value of each item in the `AttributeDefinitions` request field.
"""
AWS_DYNAMODB_ATTRIBUTES_TO_GET: Final = "aws.dynamodb.attributes_to_get"
"""
The value of the `AttributesToGet` request parameter.
"""
AWS_DYNAMODB_CONSISTENT_READ: Final = "aws.dynamodb.consistent_read"
"""
The value of the `ConsistentRead` request parameter.
"""
AWS_DYNAMODB_CONSUMED_CAPACITY: Final = "aws.dynamodb.consumed_capacity"
"""
The JSON-serialized value of each item in the `ConsumedCapacity` response field.
"""
AWS_DYNAMODB_COUNT: Final = "aws.dynamodb.count"
"""
The value of the `Count` response parameter.
"""
AWS_DYNAMODB_EXCLUSIVE_START_TABLE: Final = (
"aws.dynamodb.exclusive_start_table"
)
"""
The value of the `ExclusiveStartTableName` request parameter.
"""
AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: Final = (
"aws.dynamodb.global_secondary_index_updates"
)
"""
The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.
"""
AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: Final = (
"aws.dynamodb.global_secondary_indexes"
)
"""
The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.
"""
AWS_DYNAMODB_INDEX_NAME: Final = "aws.dynamodb.index_name"
"""
The value of the `IndexName` request parameter.
"""
AWS_DYNAMODB_ITEM_COLLECTION_METRICS: Final = (
"aws.dynamodb.item_collection_metrics"
)
"""
The JSON-serialized value of the `ItemCollectionMetrics` response field.
"""
AWS_DYNAMODB_LIMIT: Final = "aws.dynamodb.limit"
"""
The value of the `Limit` request parameter.
"""
AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: Final = (
"aws.dynamodb.local_secondary_indexes"
)
"""
The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.
"""
AWS_DYNAMODB_PROJECTION: Final = "aws.dynamodb.projection"
"""
The value of the `ProjectionExpression` request parameter.
"""
AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: Final = (
"aws.dynamodb.provisioned_read_capacity"
)
"""
The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
"""
AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: Final = (
"aws.dynamodb.provisioned_write_capacity"
)
"""
The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.
"""
AWS_DYNAMODB_SCAN_FORWARD: Final = "aws.dynamodb.scan_forward"
"""
The value of the `ScanIndexForward` request parameter.
"""
AWS_DYNAMODB_SCANNED_COUNT: Final = "aws.dynamodb.scanned_count"
"""
The value of the `ScannedCount` response parameter.
"""
AWS_DYNAMODB_SEGMENT: Final = "aws.dynamodb.segment"
"""
The value of the `Segment` request parameter.
"""
AWS_DYNAMODB_SELECT: Final = "aws.dynamodb.select"
"""
The value of the `Select` request parameter.
"""
AWS_DYNAMODB_TABLE_COUNT: Final = "aws.dynamodb.table_count"
"""
The number of items in the `TableNames` response parameter.
"""
AWS_DYNAMODB_TABLE_NAMES: Final = "aws.dynamodb.table_names"
"""
The keys in the `RequestItems` object field.
"""
AWS_DYNAMODB_TOTAL_SEGMENTS: Final = "aws.dynamodb.total_segments"
"""
The value of the `TotalSegments` request parameter.
"""
AWS_ECS_CLUSTER_ARN: Final = "aws.ecs.cluster.arn"
"""
The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
"""
AWS_ECS_CONTAINER_ARN: Final = "aws.ecs.container.arn"
"""
The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
"""
AWS_ECS_LAUNCHTYPE: Final = "aws.ecs.launchtype"
"""
The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.
"""
AWS_ECS_TASK_ARN: Final = "aws.ecs.task.arn"
"""
The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
"""
AWS_ECS_TASK_FAMILY: Final = "aws.ecs.task.family"
"""
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.
"""
AWS_ECS_TASK_ID: Final = "aws.ecs.task.id"
"""
The ID of a running ECS task. The ID MUST be extracted from `task.arn`.
"""
AWS_ECS_TASK_REVISION: Final = "aws.ecs.task.revision"
"""
The revision for the task definition used to create the ECS task.
"""
AWS_EKS_CLUSTER_ARN: Final = "aws.eks.cluster.arn"
"""
The ARN of an EKS cluster.
"""
AWS_EXTENDED_REQUEST_ID: Final = "aws.extended_request_id"
"""
The AWS extended request ID as returned in the response header `x-amz-id-2`.
"""
AWS_KINESIS_STREAM_NAME: Final = "aws.kinesis.stream_name"
"""
The name of the AWS Kinesis [stream](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) the request refers to. Corresponds to the `--stream-name` parameter of the Kinesis [describe-stream](https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html) operation.
"""
AWS_LAMBDA_INVOKED_ARN: Final = "aws.lambda.invoked_arn"
"""
The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).
Note: This may be different from `cloud.resource_id` if an alias is involved.
"""
AWS_LAMBDA_RESOURCE_MAPPING_ID: Final = "aws.lambda.resource_mapping.id"
"""
The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping.
"""
AWS_LOG_GROUP_ARNS: Final = "aws.log.group.arns"
"""
The Amazon Resource Name(s) (ARN) of the AWS log group(s).
Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
"""
AWS_LOG_GROUP_NAMES: Final = "aws.log.group.names"
"""
The name(s) of the AWS log group(s) an application is writing to.
Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.
"""
AWS_LOG_STREAM_ARNS: Final = "aws.log.stream.arns"
"""
The ARN(s) of the AWS log stream(s).
Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.
"""
AWS_LOG_STREAM_NAMES: Final = "aws.log.stream.names"
"""
The name(s) of the AWS log stream(s) an application is writing to.
"""
AWS_REQUEST_ID: Final = "aws.request_id"
"""
The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.
"""
AWS_S3_BUCKET: Final = "aws.s3.bucket"
"""
The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations.
Note: The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter.
This applies to almost all S3 operations except `list-buckets`.
"""
AWS_S3_COPY_SOURCE: Final = "aws.s3.copy_source"
"""
The source object (in the form `bucket`/`key`) for the copy operation.
Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter
of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
This applies in particular to the following operations:
- [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
"""
AWS_S3_DELETE: Final = "aws.s3.delete"
"""
The delete request container that specifies the objects to be deleted.
Note: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation.
The `delete` attribute corresponds to the `--delete` parameter of the
[delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
"""
AWS_S3_KEY: Final = "aws.s3.key"
"""
The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations.
Note: The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter.
This applies in particular to the following operations:
- [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
- [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
- [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
- [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
- [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
- [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
- [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
- [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
- [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
- [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
- [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
- [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
"""
AWS_S3_PART_NUMBER: Final = "aws.s3.part_number"
"""
The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.
Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations.
The `part_number` attribute corresponds to the `--part-number` parameter of the
[upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
"""
AWS_S3_UPLOAD_ID: Final = "aws.s3.upload_id"
"""
Upload ID that identifies the multipart upload.
Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter
of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations.
This applies in particular to the following operations:
- [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
- [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
- [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
- [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
"""
AWS_SECRETSMANAGER_SECRET_ARN: Final = "aws.secretsmanager.secret.arn"
"""
The ARN of the Secret stored in the Secrets Mangger.
"""
AWS_SNS_TOPIC_ARN: Final = "aws.sns.topic.arn"
"""
The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) is a logical access point that acts as a communication channel.
"""
AWS_SQS_QUEUE_URL: Final = "aws.sqs.queue.url"
"""
The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue Service (SQS) and is used to access the queue and perform actions on it.
"""
AWS_STEP_FUNCTIONS_ACTIVITY_ARN: Final = "aws.step_functions.activity.arn"
"""
The ARN of the AWS Step Functions Activity.
"""
AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN: Final = (
"aws.step_functions.state_machine.arn"
)
"""
The ARN of the AWS Step Functions State Machine.
"""
class AwsEcsLaunchtypeValues(Enum):
EC2 = "ec2"
"""Amazon EC2."""
FARGATE = "fargate"
"""Amazon Fargate."""

View File

@@ -0,0 +1,25 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
AZ_NAMESPACE: Final = "az.namespace"
"""
Deprecated: Replaced by `azure.resource_provider.namespace`.
"""
AZ_SERVICE_REQUEST_ID: Final = "az.service_request_id"
"""
Deprecated: Replaced by `azure.service.request.id`.
"""

View File

@@ -0,0 +1,88 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
AZURE_CLIENT_ID: Final = "azure.client.id"
"""
The unique identifier of the client instance.
"""
AZURE_COSMOSDB_CONNECTION_MODE: Final = "azure.cosmosdb.connection.mode"
"""
Cosmos client connection mode.
"""
AZURE_COSMOSDB_CONSISTENCY_LEVEL: Final = "azure.cosmosdb.consistency.level"
"""
Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels).
"""
AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS: Final = (
"azure.cosmosdb.operation.contacted_regions"
)
"""
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.
Note: Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations).
"""
AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = (
"azure.cosmosdb.operation.request_charge"
)
"""
The number of request units consumed by the operation.
"""
AZURE_COSMOSDB_REQUEST_BODY_SIZE: Final = "azure.cosmosdb.request.body.size"
"""
Request payload size in bytes.
"""
AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE: Final = (
"azure.cosmosdb.response.sub_status_code"
)
"""
Cosmos DB sub status code.
"""
AZURE_RESOURCE_PROVIDER_NAMESPACE: Final = "azure.resource_provider.namespace"
"""
[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.
"""
AZURE_SERVICE_REQUEST_ID: Final = "azure.service.request.id"
"""
The unique identifier of the service request. It's generated by the Azure service and returned with the response.
"""
class AzureCosmosdbConnectionModeValues(Enum):
GATEWAY = "gateway"
"""Gateway (HTTP) connection."""
DIRECT = "direct"
"""Direct connection."""
class AzureCosmosdbConsistencyLevelValues(Enum):
STRONG = "Strong"
"""Strong."""
BOUNDED_STALENESS = "BoundedStaleness"
"""Bounded Staleness."""
SESSION = "Session"
"""Session."""
EVENTUAL = "Eventual"
"""Eventual."""
CONSISTENT_PREFIX = "ConsistentPrefix"
"""Consistent Prefix."""

View File

@@ -0,0 +1,40 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
BROWSER_BRANDS: Final = "browser.brands"
"""
Array of brand name and version separated by a space.
Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`).
"""
BROWSER_LANGUAGE: Final = "browser.language"
"""
Preferred language of the user using the browser.
Note: This value is intended to be taken from the Navigator API `navigator.language`.
"""
BROWSER_MOBILE: Final = "browser.mobile"
"""
A boolean that is true if the browser is running on a mobile device.
Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset.
"""
BROWSER_PLATFORM: Final = "browser.platform"
"""
The platform on which the browser is running.
Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.
The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.
"""

View File

@@ -0,0 +1,73 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
CASSANDRA_CONSISTENCY_LEVEL: Final = "cassandra.consistency.level"
"""
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).
"""
CASSANDRA_COORDINATOR_DC: Final = "cassandra.coordinator.dc"
"""
The data center of the coordinating node for a query.
"""
CASSANDRA_COORDINATOR_ID: Final = "cassandra.coordinator.id"
"""
The ID of the coordinating node for a query.
"""
CASSANDRA_PAGE_SIZE: Final = "cassandra.page.size"
"""
The fetch size used for paging, i.e. how many rows will be returned at once.
"""
CASSANDRA_QUERY_IDEMPOTENT: Final = "cassandra.query.idempotent"
"""
Whether or not the query is idempotent.
"""
CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = (
"cassandra.speculative_execution.count"
)
"""
The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
"""
class CassandraConsistencyLevelValues(Enum):
ALL = "all"
"""All."""
EACH_QUORUM = "each_quorum"
"""Each Quorum."""
QUORUM = "quorum"
"""Quorum."""
LOCAL_QUORUM = "local_quorum"
"""Local Quorum."""
ONE = "one"
"""One."""
TWO = "two"
"""Two."""
THREE = "three"
"""Three."""
LOCAL_ONE = "local_one"
"""Local One."""
ANY = "any"
"""Any."""
SERIAL = "serial"
"""Serial."""
LOCAL_SERIAL = "local_serial"
"""Local Serial."""

View File

@@ -0,0 +1,162 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
CICD_PIPELINE_ACTION_NAME: Final = "cicd.pipeline.action.name"
"""
The kind of action a pipeline run is performing.
"""
CICD_PIPELINE_NAME: Final = "cicd.pipeline.name"
"""
The human readable name of the pipeline within a CI/CD system.
"""
CICD_PIPELINE_RESULT: Final = "cicd.pipeline.result"
"""
The result of a pipeline run.
"""
CICD_PIPELINE_RUN_ID: Final = "cicd.pipeline.run.id"
"""
The unique identifier of a pipeline run within a CI/CD system.
"""
CICD_PIPELINE_RUN_STATE: Final = "cicd.pipeline.run.state"
"""
The pipeline run goes through these states during its lifecycle.
"""
CICD_PIPELINE_RUN_URL_FULL: Final = "cicd.pipeline.run.url.full"
"""
The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run.
"""
CICD_PIPELINE_TASK_NAME: Final = "cicd.pipeline.task.name"
"""
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.
"""
CICD_PIPELINE_TASK_RUN_ID: Final = "cicd.pipeline.task.run.id"
"""
The unique identifier of a task run within a pipeline.
"""
CICD_PIPELINE_TASK_RUN_RESULT: Final = "cicd.pipeline.task.run.result"
"""
The result of a task run.
"""
CICD_PIPELINE_TASK_RUN_URL_FULL: Final = "cicd.pipeline.task.run.url.full"
"""
The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run.
"""
CICD_PIPELINE_TASK_TYPE: Final = "cicd.pipeline.task.type"
"""
The type of the task within a pipeline.
"""
CICD_SYSTEM_COMPONENT: Final = "cicd.system.component"
"""
The name of a component of the CICD system.
"""
CICD_WORKER_ID: Final = "cicd.worker.id"
"""
The unique identifier of a worker within a CICD system.
"""
CICD_WORKER_NAME: Final = "cicd.worker.name"
"""
The name of a worker within a CICD system.
"""
CICD_WORKER_STATE: Final = "cicd.worker.state"
"""
The state of a CICD worker / agent.
"""
CICD_WORKER_URL_FULL: Final = "cicd.worker.url.full"
"""
The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker.
"""
class CicdPipelineActionNameValues(Enum):
BUILD = "BUILD"
"""The pipeline run is executing a build."""
RUN = "RUN"
"""The pipeline run is executing."""
SYNC = "SYNC"
"""The pipeline run is executing a sync."""
class CicdPipelineResultValues(Enum):
SUCCESS = "success"
"""The pipeline run finished successfully."""
FAILURE = "failure"
"""The pipeline run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run."""
ERROR = "error"
"""The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed."""
TIMEOUT = "timeout"
"""A timeout caused the pipeline run to be interrupted."""
CANCELLATION = "cancellation"
"""The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run."""
SKIP = "skip"
"""The pipeline run was skipped, eg. due to a precondition not being met."""
class CicdPipelineRunStateValues(Enum):
PENDING = "pending"
"""The run pending state spans from the event triggering the pipeline run until the execution of the run starts (eg. time spent in a queue, provisioning agents, creating run resources)."""
EXECUTING = "executing"
"""The executing state spans the execution of any run tasks (eg. build, test)."""
FINALIZING = "finalizing"
"""The finalizing state spans from when the run has finished executing (eg. cleanup of run resources)."""
class CicdPipelineTaskRunResultValues(Enum):
SUCCESS = "success"
"""The task run finished successfully."""
FAILURE = "failure"
"""The task run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the task run."""
ERROR = "error"
"""The task run failed due to an error in the CICD system, eg. due to the worker being killed."""
TIMEOUT = "timeout"
"""A timeout caused the task run to be interrupted."""
CANCELLATION = "cancellation"
"""The task run was cancelled, eg. by a user manually cancelling the task run."""
SKIP = "skip"
"""The task run was skipped, eg. due to a precondition not being met."""
class CicdPipelineTaskTypeValues(Enum):
BUILD = "build"
"""build."""
TEST = "test"
"""test."""
DEPLOY = "deploy"
"""deploy."""
class CicdWorkerStateValues(Enum):
AVAILABLE = "available"
"""The worker is not performing work for the CICD system. It is available to the CICD system to perform work on (online / idle)."""
BUSY = "busy"
"""The worker is performing work for the CICD system."""
OFFLINE = "offline"
"""The worker is not available to the CICD system (disconnected / down)."""

View File

@@ -0,0 +1,25 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
CLIENT_ADDRESS: Final = "client.address"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.client_attributes.CLIENT_ADDRESS`.
"""
CLIENT_PORT: Final = "client.port"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.client_attributes.CLIENT_PORT`.
"""

View File

@@ -0,0 +1,148 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
CLOUD_ACCOUNT_ID: Final = "cloud.account.id"
"""
The cloud account ID the resource is assigned to.
"""
CLOUD_AVAILABILITY_ZONE: Final = "cloud.availability_zone"
"""
Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
"""
CLOUD_PLATFORM: Final = "cloud.platform"
"""
The cloud platform in use.
Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.
"""
CLOUD_PROVIDER: Final = "cloud.provider"
"""
Name of the cloud provider.
"""
CLOUD_REGION: Final = "cloud.region"
"""
The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.
Note: Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091).
"""
CLOUD_RESOURCE_ID: Final = "cloud.resource_id"
"""
Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP).
Note: On some cloud providers, it may not be possible to determine the full ID at startup,
so it may be necessary to set `cloud.resource_id` as a span attribute instead.
The exact value to use for `cloud.resource_id` depends on the cloud provider.
The following well-known definitions MUST be used if you set this attribute and they apply:
- **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
Take care not to use the "invoked ARN" directly but replace any
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
with the resolved function version, as the same runtime instance may be invocable with
multiple different aliases.
- **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
- **Azure:** The [Fully Qualified Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,
*not* the function app, having the form
`/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.
"""
class CloudPlatformValues(Enum):
ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"
"""Alibaba Cloud Elastic Compute Service."""
ALIBABA_CLOUD_FC = "alibaba_cloud_fc"
"""Alibaba Cloud Function Compute."""
ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"
"""Red Hat OpenShift on Alibaba Cloud."""
AWS_EC2 = "aws_ec2"
"""AWS Elastic Compute Cloud."""
AWS_ECS = "aws_ecs"
"""AWS Elastic Container Service."""
AWS_EKS = "aws_eks"
"""AWS Elastic Kubernetes Service."""
AWS_LAMBDA = "aws_lambda"
"""AWS Lambda."""
AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"
"""AWS Elastic Beanstalk."""
AWS_APP_RUNNER = "aws_app_runner"
"""AWS App Runner."""
AWS_OPENSHIFT = "aws_openshift"
"""Red Hat OpenShift on AWS (ROSA)."""
AZURE_VM = "azure.vm"
"""Azure Virtual Machines."""
AZURE_CONTAINER_APPS = "azure.container_apps"
"""Azure Container Apps."""
AZURE_CONTAINER_INSTANCES = "azure.container_instances"
"""Azure Container Instances."""
AZURE_AKS = "azure.aks"
"""Azure Kubernetes Service."""
AZURE_FUNCTIONS = "azure.functions"
"""Azure Functions."""
AZURE_APP_SERVICE = "azure.app_service"
"""Azure App Service."""
AZURE_OPENSHIFT = "azure.openshift"
"""Azure Red Hat OpenShift."""
GCP_BARE_METAL_SOLUTION = "gcp_bare_metal_solution"
"""Google Bare Metal Solution (BMS)."""
GCP_COMPUTE_ENGINE = "gcp_compute_engine"
"""Google Cloud Compute Engine (GCE)."""
GCP_CLOUD_RUN = "gcp_cloud_run"
"""Google Cloud Run."""
GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine"
"""Google Cloud Kubernetes Engine (GKE)."""
GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"
"""Google Cloud Functions (GCF)."""
GCP_APP_ENGINE = "gcp_app_engine"
"""Google Cloud App Engine (GAE)."""
GCP_OPENSHIFT = "gcp_openshift"
"""Red Hat OpenShift on Google Cloud."""
IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"
"""Red Hat OpenShift on IBM Cloud."""
ORACLE_CLOUD_COMPUTE = "oracle_cloud_compute"
"""Compute on Oracle Cloud Infrastructure (OCI)."""
ORACLE_CLOUD_OKE = "oracle_cloud_oke"
"""Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)."""
TENCENT_CLOUD_CVM = "tencent_cloud_cvm"
"""Tencent Cloud Cloud Virtual Machine (CVM)."""
TENCENT_CLOUD_EKS = "tencent_cloud_eks"
"""Tencent Cloud Elastic Kubernetes Service (EKS)."""
TENCENT_CLOUD_SCF = "tencent_cloud_scf"
"""Tencent Cloud Serverless Cloud Function (SCF)."""
class CloudProviderValues(Enum):
ALIBABA_CLOUD = "alibaba_cloud"
"""Alibaba Cloud."""
AWS = "aws"
"""Amazon Web Services."""
AZURE = "azure"
"""Microsoft Azure."""
GCP = "gcp"
"""Google Cloud Platform."""
HEROKU = "heroku"
"""Heroku Platform as a Service."""
IBM_CLOUD = "ibm_cloud"
"""IBM Cloud."""
ORACLE_CLOUD = "oracle_cloud"
"""Oracle Cloud Infrastructure (OCI)."""
TENCENT_CLOUD = "tencent_cloud"
"""Tencent Cloud."""

View File

@@ -0,0 +1,40 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
CLOUDEVENTS_EVENT_ID: Final = "cloudevents.event_id"
"""
The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.
"""
CLOUDEVENTS_EVENT_SOURCE: Final = "cloudevents.event_source"
"""
The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.
"""
CLOUDEVENTS_EVENT_SPEC_VERSION: Final = "cloudevents.event_spec_version"
"""
The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.
"""
CLOUDEVENTS_EVENT_SUBJECT: Final = "cloudevents.event_subject"
"""
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).
"""
CLOUDEVENTS_EVENT_TYPE: Final = "cloudevents.event_type"
"""
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.
"""

View File

@@ -0,0 +1,118 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
CLOUDFOUNDRY_APP_ID: Final = "cloudfoundry.app.id"
"""
The guid of the application.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.application_id`. This is the same value as
reported by `cf app <app-name> --guid`.
"""
CLOUDFOUNDRY_APP_INSTANCE_ID: Final = "cloudfoundry.app.instance.id"
"""
The index of the application instance. 0 when just one instance is active.
Note: 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.
Application instrumentation should use the value from environment
variable `CF_INSTANCE_INDEX`.
"""
CLOUDFOUNDRY_APP_NAME: Final = "cloudfoundry.app.name"
"""
The name of the application.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.application_name`. This is the same value
as reported by `cf apps`.
"""
CLOUDFOUNDRY_ORG_ID: Final = "cloudfoundry.org.id"
"""
The guid of the CloudFoundry org the application is running in.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.org_id`. This is the same value as
reported by `cf org <org-name> --guid`.
"""
CLOUDFOUNDRY_ORG_NAME: Final = "cloudfoundry.org.name"
"""
The name of the CloudFoundry organization the app is running in.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.org_name`. This is the same value as
reported by `cf orgs`.
"""
CLOUDFOUNDRY_PROCESS_ID: Final = "cloudfoundry.process.id"
"""
The UID identifying the process.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to
`VCAP_APPLICATION.app_id` for applications deployed to the runtime.
For system components, this could be the actual PID.
"""
CLOUDFOUNDRY_PROCESS_TYPE: Final = "cloudfoundry.process.type"
"""
The type of process.
Note: CloudFoundry applications can consist of multiple jobs. Usually the
main process will be of type `web`. There can be additional background
tasks or side-cars with different process types.
"""
CLOUDFOUNDRY_SPACE_ID: Final = "cloudfoundry.space.id"
"""
The guid of the CloudFoundry space the application is running in.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.space_id`. This is the same value as
reported by `cf space <space-name> --guid`.
"""
CLOUDFOUNDRY_SPACE_NAME: Final = "cloudfoundry.space.name"
"""
The name of the CloudFoundry space the application is running in.
Note: Application instrumentation should use the value from environment
variable `VCAP_APPLICATION.space_name`. This is the same value as
reported by `cf spaces`.
"""
CLOUDFOUNDRY_SYSTEM_ID: Final = "cloudfoundry.system.id"
"""
A guid or another name describing the event source.
Note: CloudFoundry defines the `source_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 component name, e.g. "gorouter", for
CloudFoundry components.
When system components are instrumented, values from the
[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)
should be used. The `system.id` should be set to
`spec.deployment/spec.name`.
"""
CLOUDFOUNDRY_SYSTEM_INSTANCE_ID: Final = "cloudfoundry.system.instance.id"
"""
A guid describing the concrete instance of the event source.
Note: 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 vm id for CloudFoundry components.
When system components are instrumented, values from the
[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)
should be used. The `system.instance.id` should be set to `spec.id`.
"""

View File

@@ -0,0 +1,65 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
CODE_COLUMN: Final = "code.column"
"""
Deprecated: Replaced by `code.column.number`.
"""
CODE_COLUMN_NUMBER: Final = "code.column.number"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_COLUMN_NUMBER`.
"""
CODE_FILE_PATH: Final = "code.file.path"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_FILE_PATH`.
"""
CODE_FILEPATH: Final = "code.filepath"
"""
Deprecated: Replaced by `code.file.path`.
"""
CODE_FUNCTION: Final = "code.function"
"""
Deprecated: Value should be included in `code.function.name` which is expected to be a fully-qualified name.
"""
CODE_FUNCTION_NAME: Final = "code.function.name"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_FUNCTION_NAME`.
"""
CODE_LINE_NUMBER: Final = "code.line.number"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_LINE_NUMBER`.
"""
CODE_LINENO: Final = "code.lineno"
"""
Deprecated: Replaced by `code.line.number`.
"""
CODE_NAMESPACE: Final = "code.namespace"
"""
Deprecated: Value should be included in `code.function.name` which is expected to be a fully-qualified name.
"""
CODE_STACKTRACE: Final = "code.stacktrace"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.code_attributes.CODE_STACKTRACE`.
"""

View File

@@ -0,0 +1,128 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
from typing_extensions import deprecated
CONTAINER_COMMAND: Final = "container.command"
"""
The command used to run the container (i.e. the command name).
Note: If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
"""
CONTAINER_COMMAND_ARGS: Final = "container.command_args"
"""
All the command arguments (including the command/executable itself) run by the container.
"""
CONTAINER_COMMAND_LINE: Final = "container.command_line"
"""
The full command run by the container as a single string representing the full command.
"""
CONTAINER_CPU_STATE: Final = "container.cpu.state"
"""
Deprecated: Replaced by `cpu.mode`.
"""
CONTAINER_CSI_PLUGIN_NAME: Final = "container.csi.plugin.name"
"""
The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume.
Note: This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC.
"""
CONTAINER_CSI_VOLUME_ID: Final = "container.csi.volume.id"
"""
The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin.
Note: This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec.
"""
CONTAINER_ID: Final = "container.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.
"""
CONTAINER_IMAGE_ID: Final = "container.image.id"
"""
Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
Note: Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerInspect) endpoint.
K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.
"""
CONTAINER_IMAGE_NAME: Final = "container.image.name"
"""
Name of the image the container was built on.
"""
CONTAINER_IMAGE_REPO_DIGESTS: Final = "container.image.repo_digests"
"""
Repo digests of the container image as provided by the container runtime.
Note: [Docker](https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field.
"""
CONTAINER_IMAGE_TAGS: Final = "container.image.tags"
"""
Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect). Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`.
"""
CONTAINER_LABEL_TEMPLATE: Final = "container.label"
"""
Container labels, `<key>` being the label name, the value being the label value.
Note: For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `"nginx"`.
"""
CONTAINER_LABELS_TEMPLATE: Final = "container.labels"
"""
Deprecated: Replaced by `container.label`.
"""
CONTAINER_NAME: Final = "container.name"
"""
Container name used by container runtime.
"""
CONTAINER_RUNTIME: Final = "container.runtime"
"""
Deprecated: Replaced by `container.runtime.name`.
"""
CONTAINER_RUNTIME_DESCRIPTION: Final = "container.runtime.description"
"""
A description about the runtime which could include, for example details about the CRI/API version being used or other customisations.
"""
CONTAINER_RUNTIME_NAME: Final = "container.runtime.name"
"""
The container runtime managing this container.
"""
CONTAINER_RUNTIME_VERSION: Final = "container.runtime.version"
"""
The version of the runtime of this process, as returned by the runtime without modification.
"""
@deprecated(
"The attribute container.cpu.state is deprecated - Replaced by `cpu.mode`"
)
class ContainerCpuStateValues(Enum):
USER = "user"
"""When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)."""
SYSTEM = "system"
"""When CPU is used by the system (host OS)."""
KERNEL = "kernel"
"""When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)."""

View File

@@ -0,0 +1,45 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
CPU_LOGICAL_NUMBER: Final = "cpu.logical_number"
"""
The logical CPU number [0..n-1].
"""
CPU_MODE: Final = "cpu.mode"
"""
The mode of the CPU.
"""
class CpuModeValues(Enum):
USER = "user"
"""User."""
SYSTEM = "system"
"""System."""
NICE = "nice"
"""Nice."""
IDLE = "idle"
"""Idle."""
IOWAIT = "iowait"
"""IO Wait."""
INTERRUPT = "interrupt"
"""Interrupt."""
STEAL = "steal"
"""Steal."""
KERNEL = "kernel"
"""Kernel."""

View File

@@ -0,0 +1,30 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
CPYTHON_GC_GENERATION: Final = "cpython.gc.generation"
"""
Value of the garbage collector collection generation.
"""
class CPythonGCGenerationValues(Enum):
GENERATION_0 = 0
"""Generation 0."""
GENERATION_1 = 1
"""Generation 1."""
GENERATION_2 = 2
"""Generation 2."""

View File

@@ -0,0 +1,594 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
from typing_extensions import deprecated
DB_CASSANDRA_CONSISTENCY_LEVEL: Final = "db.cassandra.consistency_level"
"""
Deprecated: Replaced by `cassandra.consistency.level`.
"""
DB_CASSANDRA_COORDINATOR_DC: Final = "db.cassandra.coordinator.dc"
"""
Deprecated: Replaced by `cassandra.coordinator.dc`.
"""
DB_CASSANDRA_COORDINATOR_ID: Final = "db.cassandra.coordinator.id"
"""
Deprecated: Replaced by `cassandra.coordinator.id`.
"""
DB_CASSANDRA_IDEMPOTENCE: Final = "db.cassandra.idempotence"
"""
Deprecated: Replaced by `cassandra.query.idempotent`.
"""
DB_CASSANDRA_PAGE_SIZE: Final = "db.cassandra.page_size"
"""
Deprecated: Replaced by `cassandra.page.size`.
"""
DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = (
"db.cassandra.speculative_execution_count"
)
"""
Deprecated: Replaced by `cassandra.speculative_execution.count`.
"""
DB_CASSANDRA_TABLE: Final = "db.cassandra.table"
"""
Deprecated: Replaced by `db.collection.name`.
"""
DB_CLIENT_CONNECTION_POOL_NAME: Final = "db.client.connection.pool.name"
"""
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.
"""
DB_CLIENT_CONNECTION_STATE: Final = "db.client.connection.state"
"""
The state of a connection in the pool.
"""
DB_CLIENT_CONNECTIONS_POOL_NAME: Final = "db.client.connections.pool.name"
"""
Deprecated: Replaced by `db.client.connection.pool.name`.
"""
DB_CLIENT_CONNECTIONS_STATE: Final = "db.client.connections.state"
"""
Deprecated: Replaced by `db.client.connection.state`.
"""
DB_COLLECTION_NAME: Final = "db.collection.name"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_COLLECTION_NAME`.
"""
DB_CONNECTION_STRING: Final = "db.connection_string"
"""
Deprecated: Replaced by `server.address` and `server.port`.
"""
DB_COSMOSDB_CLIENT_ID: Final = "db.cosmosdb.client_id"
"""
Deprecated: Replaced by `azure.client.id`.
"""
DB_COSMOSDB_CONNECTION_MODE: Final = "db.cosmosdb.connection_mode"
"""
Deprecated: Replaced by `azure.cosmosdb.connection.mode`.
"""
DB_COSMOSDB_CONSISTENCY_LEVEL: Final = "db.cosmosdb.consistency_level"
"""
Deprecated: Replaced by `azure.cosmosdb.consistency.level`.
"""
DB_COSMOSDB_CONTAINER: Final = "db.cosmosdb.container"
"""
Deprecated: Replaced by `db.collection.name`.
"""
DB_COSMOSDB_OPERATION_TYPE: Final = "db.cosmosdb.operation_type"
"""
Deprecated: Removed, no replacement at this time.
"""
DB_COSMOSDB_REGIONS_CONTACTED: Final = "db.cosmosdb.regions_contacted"
"""
Deprecated: Replaced by `azure.cosmosdb.operation.contacted_regions`.
"""
DB_COSMOSDB_REQUEST_CHARGE: Final = "db.cosmosdb.request_charge"
"""
Deprecated: Replaced by `azure.cosmosdb.operation.request_charge`.
"""
DB_COSMOSDB_REQUEST_CONTENT_LENGTH: Final = (
"db.cosmosdb.request_content_length"
)
"""
Deprecated: Replaced by `azure.cosmosdb.request.body.size`.
"""
DB_COSMOSDB_STATUS_CODE: Final = "db.cosmosdb.status_code"
"""
Deprecated: Use `db.response.status_code` instead.
"""
DB_COSMOSDB_SUB_STATUS_CODE: Final = "db.cosmosdb.sub_status_code"
"""
Deprecated: Replaced by `azure.cosmosdb.response.sub_status_code`.
"""
DB_ELASTICSEARCH_CLUSTER_NAME: Final = "db.elasticsearch.cluster.name"
"""
Deprecated: Replaced by `db.namespace`.
"""
DB_ELASTICSEARCH_NODE_NAME: Final = "db.elasticsearch.node.name"
"""
Deprecated: Replaced by `elasticsearch.node.name`.
"""
DB_ELASTICSEARCH_PATH_PARTS_TEMPLATE: Final = "db.elasticsearch.path_parts"
"""
Deprecated: Replaced by `db.operation.parameter`.
"""
DB_INSTANCE_ID: Final = "db.instance.id"
"""
Deprecated: Removed, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead.
"""
DB_JDBC_DRIVER_CLASSNAME: Final = "db.jdbc.driver_classname"
"""
Deprecated: Removed, no replacement at this time.
"""
DB_MONGODB_COLLECTION: Final = "db.mongodb.collection"
"""
Deprecated: Replaced by `db.collection.name`.
"""
DB_MSSQL_INSTANCE_NAME: Final = "db.mssql.instance_name"
"""
Deprecated: Removed, no replacement at this time.
"""
DB_NAME: Final = "db.name"
"""
Deprecated: Replaced by `db.namespace`.
"""
DB_NAMESPACE: Final = "db.namespace"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_NAMESPACE`.
"""
DB_OPERATION: Final = "db.operation"
"""
Deprecated: Replaced by `db.operation.name`.
"""
DB_OPERATION_BATCH_SIZE: Final = "db.operation.batch.size"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_OPERATION_BATCH_SIZE`.
"""
DB_OPERATION_NAME: Final = "db.operation.name"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_OPERATION_NAME`.
"""
DB_OPERATION_PARAMETER_TEMPLATE: Final = "db.operation.parameter"
"""
A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.
Note: For example, a client-side maximum number of rows to read from the database
MAY be recorded as the `db.operation.parameter.max_rows` attribute.
`db.query.text` parameters SHOULD be captured using `db.query.parameter.<key>`
instead of `db.operation.parameter.<key>`.
"""
DB_QUERY_PARAMETER_TEMPLATE: Final = "db.query.parameter"
"""
A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.
Note: If a query parameter has no name and instead is referenced only by index,
then `<key>` SHOULD be the 0-based index.
`db.query.parameter.<key>` SHOULD match
up with the parameterized placeholders present in `db.query.text`.
It is RECOMMENDED to capture the value as provided by the application
without attempting to do any case normalization.
`db.query.parameter.<key>` SHOULD NOT be captured on batch operations.
Examples:
- For a query `SELECT * FROM users where username = %s` with the parameter `"jdoe"`,
the attribute `db.query.parameter.0` SHOULD be set to `"jdoe"`.
- For a query `"SELECT * FROM users WHERE username = %(userName)s;` with parameter
`userName = "jdoe"`, the attribute `db.query.parameter.userName` SHOULD be set to `"jdoe"`.
"""
DB_QUERY_SUMMARY: Final = "db.query.summary"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_QUERY_SUMMARY`.
"""
DB_QUERY_TEXT: Final = "db.query.text"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_QUERY_TEXT`.
"""
DB_REDIS_DATABASE_INDEX: Final = "db.redis.database_index"
"""
Deprecated: Uncategorized.
"""
DB_RESPONSE_RETURNED_ROWS: Final = "db.response.returned_rows"
"""
Number of rows returned by the operation.
"""
DB_RESPONSE_STATUS_CODE: Final = "db.response.status_code"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_RESPONSE_STATUS_CODE`.
"""
DB_SQL_TABLE: Final = "db.sql.table"
"""
Deprecated: Replaced by `db.collection.name`, but only if not extracting the value from `db.query.text`.
"""
DB_STATEMENT: Final = "db.statement"
"""
Deprecated: Replaced by `db.query.text`.
"""
DB_STORED_PROCEDURE_NAME: Final = "db.stored_procedure.name"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_STORED_PROCEDURE_NAME`.
"""
DB_SYSTEM: Final = "db.system"
"""
Deprecated: Replaced by `db.system.name`.
"""
DB_SYSTEM_NAME: Final = "db.system.name"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DB_SYSTEM_NAME`.
"""
DB_USER: Final = "db.user"
"""
Deprecated: Removed, no replacement at this time.
"""
@deprecated(
"The attribute db.cassandra.consistency_level is deprecated - Replaced by `cassandra.consistency.level`"
)
class DbCassandraConsistencyLevelValues(Enum):
ALL = "all"
"""all."""
EACH_QUORUM = "each_quorum"
"""each_quorum."""
QUORUM = "quorum"
"""quorum."""
LOCAL_QUORUM = "local_quorum"
"""local_quorum."""
ONE = "one"
"""one."""
TWO = "two"
"""two."""
THREE = "three"
"""three."""
LOCAL_ONE = "local_one"
"""local_one."""
ANY = "any"
"""any."""
SERIAL = "serial"
"""serial."""
LOCAL_SERIAL = "local_serial"
"""local_serial."""
class DbClientConnectionStateValues(Enum):
IDLE = "idle"
"""idle."""
USED = "used"
"""used."""
@deprecated(
"The attribute db.client.connections.state is deprecated - Replaced by `db.client.connection.state`"
)
class DbClientConnectionsStateValues(Enum):
IDLE = "idle"
"""idle."""
USED = "used"
"""used."""
@deprecated(
"The attribute db.cosmosdb.connection_mode is deprecated - Replaced by `azure.cosmosdb.connection.mode`"
)
class DbCosmosdbConnectionModeValues(Enum):
GATEWAY = "gateway"
"""Gateway (HTTP) connection."""
DIRECT = "direct"
"""Direct connection."""
@deprecated(
"The attribute db.cosmosdb.consistency_level is deprecated - Replaced by `azure.cosmosdb.consistency.level`"
)
class DbCosmosdbConsistencyLevelValues(Enum):
STRONG = "Strong"
"""strong."""
BOUNDED_STALENESS = "BoundedStaleness"
"""bounded_staleness."""
SESSION = "Session"
"""session."""
EVENTUAL = "Eventual"
"""eventual."""
CONSISTENT_PREFIX = "ConsistentPrefix"
"""consistent_prefix."""
@deprecated(
"The attribute db.cosmosdb.operation_type is deprecated - Removed, no replacement at this time"
)
class DbCosmosdbOperationTypeValues(Enum):
BATCH = "batch"
"""batch."""
CREATE = "create"
"""create."""
DELETE = "delete"
"""delete."""
EXECUTE = "execute"
"""execute."""
EXECUTE_JAVASCRIPT = "execute_javascript"
"""execute_javascript."""
INVALID = "invalid"
"""invalid."""
HEAD = "head"
"""head."""
HEAD_FEED = "head_feed"
"""head_feed."""
PATCH = "patch"
"""patch."""
QUERY = "query"
"""query."""
QUERY_PLAN = "query_plan"
"""query_plan."""
READ = "read"
"""read."""
READ_FEED = "read_feed"
"""read_feed."""
REPLACE = "replace"
"""replace."""
UPSERT = "upsert"
"""upsert."""
@deprecated(
"The attribute db.system is deprecated - Replaced by `db.system.name`"
)
class DbSystemValues(Enum):
OTHER_SQL = "other_sql"
"""Some other SQL database. Fallback only. See notes."""
ADABAS = "adabas"
"""Adabas (Adaptable Database System)."""
CACHE = "cache"
"""Deprecated: Replaced by `intersystems_cache`."""
INTERSYSTEMS_CACHE = "intersystems_cache"
"""InterSystems Caché."""
CASSANDRA = "cassandra"
"""Apache Cassandra."""
CLICKHOUSE = "clickhouse"
"""ClickHouse."""
CLOUDSCAPE = "cloudscape"
"""Deprecated: Replaced by `other_sql`."""
COCKROACHDB = "cockroachdb"
"""CockroachDB."""
COLDFUSION = "coldfusion"
"""Deprecated: Obsoleted."""
COSMOSDB = "cosmosdb"
"""Microsoft Azure Cosmos DB."""
COUCHBASE = "couchbase"
"""Couchbase."""
COUCHDB = "couchdb"
"""CouchDB."""
DB2 = "db2"
"""IBM Db2."""
DERBY = "derby"
"""Apache Derby."""
DYNAMODB = "dynamodb"
"""Amazon DynamoDB."""
EDB = "edb"
"""EnterpriseDB."""
ELASTICSEARCH = "elasticsearch"
"""Elasticsearch."""
FILEMAKER = "filemaker"
"""FileMaker."""
FIREBIRD = "firebird"
"""Firebird."""
FIRSTSQL = "firstsql"
"""Deprecated: Replaced by `other_sql`."""
GEODE = "geode"
"""Apache Geode."""
H2 = "h2"
"""H2."""
HANADB = "hanadb"
"""SAP HANA."""
HBASE = "hbase"
"""Apache HBase."""
HIVE = "hive"
"""Apache Hive."""
HSQLDB = "hsqldb"
"""HyperSQL DataBase."""
INFLUXDB = "influxdb"
"""InfluxDB."""
INFORMIX = "informix"
"""Informix."""
INGRES = "ingres"
"""Ingres."""
INSTANTDB = "instantdb"
"""InstantDB."""
INTERBASE = "interbase"
"""InterBase."""
MARIADB = "mariadb"
"""MariaDB."""
MAXDB = "maxdb"
"""SAP MaxDB."""
MEMCACHED = "memcached"
"""Memcached."""
MONGODB = "mongodb"
"""MongoDB."""
MSSQL = "mssql"
"""Microsoft SQL Server."""
MSSQLCOMPACT = "mssqlcompact"
"""Deprecated: Replaced by `other_sql`."""
MYSQL = "mysql"
"""MySQL."""
NEO4J = "neo4j"
"""Neo4j."""
NETEZZA = "netezza"
"""Netezza."""
OPENSEARCH = "opensearch"
"""OpenSearch."""
ORACLE = "oracle"
"""Oracle Database."""
PERVASIVE = "pervasive"
"""Pervasive PSQL."""
POINTBASE = "pointbase"
"""PointBase."""
POSTGRESQL = "postgresql"
"""PostgreSQL."""
PROGRESS = "progress"
"""Progress Database."""
REDIS = "redis"
"""Redis."""
REDSHIFT = "redshift"
"""Amazon Redshift."""
SPANNER = "spanner"
"""Cloud Spanner."""
SQLITE = "sqlite"
"""SQLite."""
SYBASE = "sybase"
"""Sybase."""
TERADATA = "teradata"
"""Teradata."""
TRINO = "trino"
"""Trino."""
VERTICA = "vertica"
"""Vertica."""
@deprecated(
"Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DbSystemNameValues`."
)
class DbSystemNameValues(Enum):
OTHER_SQL = "other_sql"
"""Some other SQL database. Fallback only."""
SOFTWAREAG_ADABAS = "softwareag.adabas"
"""[Adabas (Adaptable Database System)](https://documentation.softwareag.com/?pf=adabas)."""
ACTIAN_INGRES = "actian.ingres"
"""[Actian Ingres](https://www.actian.com/databases/ingres/)."""
AWS_DYNAMODB = "aws.dynamodb"
"""[Amazon DynamoDB](https://aws.amazon.com/pm/dynamodb/)."""
AWS_REDSHIFT = "aws.redshift"
"""[Amazon Redshift](https://aws.amazon.com/redshift/)."""
AZURE_COSMOSDB = "azure.cosmosdb"
"""[Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db)."""
INTERSYSTEMS_CACHE = "intersystems.cache"
"""[InterSystems Caché](https://www.intersystems.com/products/cache/)."""
CASSANDRA = "cassandra"
"""[Apache Cassandra](https://cassandra.apache.org/)."""
CLICKHOUSE = "clickhouse"
"""[ClickHouse](https://clickhouse.com/)."""
COCKROACHDB = "cockroachdb"
"""[CockroachDB](https://www.cockroachlabs.com/)."""
COUCHBASE = "couchbase"
"""[Couchbase](https://www.couchbase.com/)."""
COUCHDB = "couchdb"
"""[Apache CouchDB](https://couchdb.apache.org/)."""
DERBY = "derby"
"""[Apache Derby](https://db.apache.org/derby/)."""
ELASTICSEARCH = "elasticsearch"
"""[Elasticsearch](https://www.elastic.co/elasticsearch)."""
FIREBIRDSQL = "firebirdsql"
"""[Firebird](https://www.firebirdsql.org/)."""
GCP_SPANNER = "gcp.spanner"
"""[Google Cloud Spanner](https://cloud.google.com/spanner)."""
GEODE = "geode"
"""[Apache Geode](https://geode.apache.org/)."""
H2DATABASE = "h2database"
"""[H2 Database](https://h2database.com/)."""
HBASE = "hbase"
"""[Apache HBase](https://hbase.apache.org/)."""
HIVE = "hive"
"""[Apache Hive](https://hive.apache.org/)."""
HSQLDB = "hsqldb"
"""[HyperSQL Database](https://hsqldb.org/)."""
IBM_DB2 = "ibm.db2"
"""[IBM Db2](https://www.ibm.com/db2)."""
IBM_INFORMIX = "ibm.informix"
"""[IBM Informix](https://www.ibm.com/products/informix)."""
IBM_NETEZZA = "ibm.netezza"
"""[IBM Netezza](https://www.ibm.com/products/netezza)."""
INFLUXDB = "influxdb"
"""[InfluxDB](https://www.influxdata.com/)."""
INSTANTDB = "instantdb"
"""[Instant](https://www.instantdb.com/)."""
MARIADB = "mariadb"
"""Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DbSystemNameValues.MARIADB`."""
MEMCACHED = "memcached"
"""[Memcached](https://memcached.org/)."""
MONGODB = "mongodb"
"""[MongoDB](https://www.mongodb.com/)."""
MICROSOFT_SQL_SERVER = "microsoft.sql_server"
"""Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DbSystemNameValues.MICROSOFT_SQL_SERVER`."""
MYSQL = "mysql"
"""Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DbSystemNameValues.MYSQL`."""
NEO4J = "neo4j"
"""[Neo4j](https://neo4j.com/)."""
OPENSEARCH = "opensearch"
"""[OpenSearch](https://opensearch.org/)."""
ORACLE_DB = "oracle.db"
"""[Oracle Database](https://www.oracle.com/database/)."""
POSTGRESQL = "postgresql"
"""Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.db_attributes.DbSystemNameValues.POSTGRESQL`."""
REDIS = "redis"
"""[Redis](https://redis.io/)."""
SAP_HANA = "sap.hana"
"""[SAP HANA](https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html)."""
SAP_MAXDB = "sap.maxdb"
"""[SAP MaxDB](https://maxdb.sap.com/)."""
SQLITE = "sqlite"
"""[SQLite](https://www.sqlite.org/)."""
TERADATA = "teradata"
"""[Teradata](https://www.teradata.com/)."""
TRINO = "trino"
"""[Trino](https://trino.io/)."""

View File

@@ -0,0 +1,55 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Final
DEPLOYMENT_ENVIRONMENT: Final = "deployment.environment"
"""
Deprecated: Replaced by `deployment.environment.name`.
"""
DEPLOYMENT_ENVIRONMENT_NAME: Final = "deployment.environment.name"
"""
Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).
Note: `deployment.environment.name` does not affect the uniqueness constraints defined through
the `service.namespace`, `service.name` and `service.instance.id` resource attributes.
This implies that resources carrying the following attribute combinations MUST be
considered to be identifying the same service:
- `service.name=frontend`, `deployment.environment.name=production`
- `service.name=frontend`, `deployment.environment.name=staging`.
"""
DEPLOYMENT_ID: Final = "deployment.id"
"""
The id of the deployment.
"""
DEPLOYMENT_NAME: Final = "deployment.name"
"""
The name of the deployment.
"""
DEPLOYMENT_STATUS: Final = "deployment.status"
"""
The status of the deployment.
"""
class DeploymentStatusValues(Enum):
FAILED = "failed"
"""failed."""
SUCCEEDED = "succeeded"
"""succeeded."""

View File

@@ -0,0 +1,26 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
DESTINATION_ADDRESS: Final = "destination.address"
"""
Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
Note: When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available.
"""
DESTINATION_PORT: Final = "destination.port"
"""
Destination port number.
"""

View File

@@ -0,0 +1,54 @@
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Final
DEVICE_ID: Final = "device.id"
"""
A unique identifier representing the device.
Note: Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is uninstalled and re-installed.
However, it might be resettable by the user for all apps on a device.
Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as values.
More information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids).
> [!WARNING]
>
> This attribute may contain sensitive (PII) information. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply,
> ensure you do your own due diligence.
>
> Due to these reasons, this identifier is not recommended for consumer applications and will likely result in rejection from both Google Play and App Store.
> However, it may be appropriate for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with appropriate compliance clearance.
> Any instrumentation providing this identifier MUST implement it as an opt-in feature.
>
> See [`app.installation.id`](/docs/registry/attributes/app.md#app-installation-id) for a more privacy-preserving alternative.
"""
DEVICE_MANUFACTURER: Final = "device.manufacturer"
"""
The name of the device manufacturer.
Note: The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.
"""
DEVICE_MODEL_IDENTIFIER: Final = "device.model.identifier"
"""
The model identifier for the device.
Note: It's recommended this value represents a machine-readable version of the model identifier rather than the market or consumer-friendly name of the device.
"""
DEVICE_MODEL_NAME: Final = "device.model.name"
"""
The marketing name for the device model.
Note: It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.
"""

Some files were not shown because too many files have changed in this diff Show More