structure saas with tools

This commit is contained in:
Davidson Gomes
2025-04-25 15:30:54 -03:00
commit 1aef473937
16434 changed files with 6584257 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
# 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_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 [here](https://developer.android.com/training/articles/user-data-ids).
"""

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,298 @@
# 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_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_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_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).
"""
class AwsEcsLaunchtypeValues(Enum):
EC2 = "ec2"
"""ec2."""
FARGATE = "fargate"
"""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"
"""
[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.
"""
AZ_SERVICE_REQUEST_ID: Final = "az.service_request_id"
"""
The unique identifier of the service request. It's generated by the Azure service and returned with the response.
"""

View File

@@ -0,0 +1,78 @@
# 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/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location).
"""
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.
"""
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,113 @@
# 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_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_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_STATE: Final = "cicd.worker.state"
"""
The state of a CICD worker / agent.
"""
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 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 the resource is running.
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://docs.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,80 @@
# 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"
"""
The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
"""
CODE_FILE_PATH: Final = "code.file.path"
"""
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
"""
CODE_FILEPATH: Final = "code.filepath"
"""
Deprecated: Replaced by `code.file.path`.
"""
CODE_FUNCTION: Final = "code.function"
"""
Deprecated: Replaced by `code.function.name`.
"""
CODE_FUNCTION_NAME: Final = "code.function.name"
"""
The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value.
Note: Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
`code.stacktrace` without information on arguments.
Examples:
* Java method: `com.example.MyHttpService.serveRequest`
* Java anonymous class method: `com.mycompany.Main$1.myMethod`
* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
* PHP function: `GuzzleHttp\\Client::transfer`
* Go function: `github.com/my/repo/pkg.foo.func5`
* Elixir: `OpenTelemetry.Ctx.new`
* Erlang: `opentelemetry_ctx:new`
* Rust: `playground::my_module::my_cool_func`
* C function: `fopen`.
"""
CODE_LINE_NUMBER: Final = "code.line.number"
"""
The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
"""
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"
"""
A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation).
"""

View File

@@ -0,0 +1,112 @@
# 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 deprecated 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/engine/api/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/engine/api/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/engine/api/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.
"""
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"
"""
The container runtime managing this container.
"""
@deprecated(
reason="The attribute container.cpu.state is deprecated - Replaced by `cpu.mode`"
) # type: ignore
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"
"""iowait."""
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,609 @@
# 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 deprecated 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"
"""
The name of a collection (table, container) within the database.
Note: It is RECOMMENDED to capture the value as provided by the application
without attempting to do any case normalization.
The collection name SHOULD NOT be extracted from `db.query.text`,
when the database system supports cross-table queries in non-batch operations.
For batch operations, if the individual operations are known to have the same
collection name then that collection name SHOULD be used.
"""
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: 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: Replaced by `db.response.status_code`.
"""
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: Deprecated, 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 as not used.
"""
DB_MONGODB_COLLECTION: Final = "db.mongodb.collection"
"""
Deprecated: Replaced by `db.collection.name`.
"""
DB_MSSQL_INSTANCE_NAME: Final = "db.mssql.instance_name"
"""
Deprecated: Deprecated, no replacement at this time.
"""
DB_NAME: Final = "db.name"
"""
Deprecated: Replaced by `db.namespace`.
"""
DB_NAMESPACE: Final = "db.namespace"
"""
The name of the database, fully qualified within the server address and port.
Note: If a database system has multiple namespace components, they SHOULD be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces SHOULD NOT be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid.
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
"""
DB_OPERATION: Final = "db.operation"
"""
Deprecated: Replaced by `db.operation.name`.
"""
DB_OPERATION_BATCH_SIZE: Final = "db.operation.batch.size"
"""
The number of queries included in a batch operation.
Note: Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
"""
DB_OPERATION_NAME: Final = "db.operation.name"
"""
The name of the operation or command being executed.
Note: 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`,
when the database system supports cross-table queries in non-batch operations.
If spaces can occur in the operation name, multiple consecutive spaces
SHOULD be normalized to a single space.
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.
"""
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: 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`.
`db.operation.parameter.<key>` SHOULD NOT be captured on batch operations.
"""
DB_QUERY_PARAMETER_TEMPLATE: Final = "db.query.parameter"
"""
Deprecated: Replaced by `db.operation.parameter`.
"""
DB_QUERY_SUMMARY: Final = "db.query.summary"
"""
Low cardinality representation of a database query text.
Note: `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](../database/database-spans.md#generating-a-summary-of-the-query-text) section.
"""
DB_QUERY_TEXT: Final = "db.query.text"
"""
The database query being executed.
Note: For sanitization see [Sanitization of `db.query.text`](../database/database-spans.md#sanitization-of-dbquerytext).
For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
"""
DB_REDIS_DATABASE_INDEX: Final = "db.redis.database_index"
"""
Deprecated: Replaced by `db.namespace`.
"""
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"
"""
Database response status code.
Note: The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
"""
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"
"""
The name of a stored procedure within the database.
Note: It is RECOMMENDED to capture the value as provided by the application
without attempting to do any case normalization.
For batch operations, if the individual operations are known to have the same
stored procedure name then that stored procedure name SHOULD be used.
"""
DB_SYSTEM: Final = "db.system"
"""
Deprecated: Replaced by `db.system.name`.
"""
DB_SYSTEM_NAME: Final = "db.system.name"
"""
The database management system (DBMS) product as identified by the client instrumentation.
Note: The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system.name` is set to `postgresql` based on the instrumentation's best knowledge.
"""
DB_USER: Final = "db.user"
"""
Deprecated: No replacement at this time.
"""
@deprecated(
reason="The attribute db.cassandra.consistency_level is deprecated - Replaced by `cassandra.consistency.level`"
) # type: ignore
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(
reason="The attribute db.client.connections.state is deprecated - Replaced by `db.client.connection.state`"
) # type: ignore
class DbClientConnectionsStateValues(Enum):
IDLE = "idle"
"""idle."""
USED = "used"
"""used."""
@deprecated(
reason="The attribute db.cosmosdb.connection_mode is deprecated - Replaced by `azure.cosmosdb.connection.mode`"
) # type: ignore
class DbCosmosdbConnectionModeValues(Enum):
GATEWAY = "gateway"
"""Gateway (HTTP) connection."""
DIRECT = "direct"
"""Direct connection."""
@deprecated(
reason="The attribute db.cosmosdb.consistency_level is deprecated - Replaced by `azure.cosmosdb.consistency.level`"
) # type: ignore
class DbCosmosdbConsistencyLevelValues(Enum):
STRONG = "Strong"
"""strong."""
BOUNDED_STALENESS = "BoundedStaleness"
"""bounded_staleness."""
SESSION = "Session"
"""session."""
EVENTUAL = "Eventual"
"""eventual."""
CONSISTENT_PREFIX = "ConsistentPrefix"
"""consistent_prefix."""
@deprecated(
reason="The attribute db.cosmosdb.operation_type is deprecated - No replacement at this time"
) # type: ignore
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(
reason="The attribute db.system is deprecated - Replaced by `db.system.name`"
) # type: ignore
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: Removed."""
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 (This value has stability level RELEASE CANDIDATE)."""
MAXDB = "maxdb"
"""SAP MaxDB."""
MEMCACHED = "memcached"
"""Memcached."""
MONGODB = "mongodb"
"""MongoDB."""
MSSQL = "mssql"
"""Microsoft SQL Server (This value has stability level RELEASE CANDIDATE)."""
MSSQLCOMPACT = "mssqlcompact"
"""Deprecated: Removed, use `other_sql` instead."""
MYSQL = "mysql"
"""MySQL (This value has stability level RELEASE CANDIDATE)."""
NEO4J = "neo4j"
"""Neo4j."""
NETEZZA = "netezza"
"""Netezza."""
OPENSEARCH = "opensearch"
"""OpenSearch."""
ORACLE = "oracle"
"""Oracle Database."""
PERVASIVE = "pervasive"
"""Pervasive PSQL."""
POINTBASE = "pointbase"
"""PointBase."""
POSTGRESQL = "postgresql"
"""PostgreSQL (This value has stability level RELEASE CANDIDATE)."""
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."""
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"
"""[MariaDB](https://mariadb.org/)."""
MEMCACHED = "memcached"
"""[Memcached](https://memcached.org/)."""
MONGODB = "mongodb"
"""[MongoDB](https://www.mongodb.com/)."""
MICROSOFT_SQL_SERVER = "microsoft.sql_server"
"""[Microsoft SQL Server](https://www.microsoft.com/sql-server)."""
MYSQL = "mysql"
"""[MySQL](https://www.mysql.com/)."""
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"
"""[PostgreSQL](https://www.postgresql.org/)."""
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: Deprecated, use `deployment.environment.name` instead.
"""
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 [here](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/attributes-registry/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.
"""

View File

@@ -0,0 +1,28 @@
# 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
DISK_IO_DIRECTION: Final = "disk.io.direction"
"""
The disk IO operation direction.
"""
class DiskIoDirectionValues(Enum):
READ = "read"
"""read."""
WRITE = "write"
"""write."""

View File

@@ -0,0 +1,21 @@
# 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
DNS_QUESTION_NAME: Final = "dns.question.name"
"""
The name being queried.
Note: If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \\t, \\r, and \\n respectively.
"""

View File

@@ -0,0 +1,20 @@
# 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
ELASTICSEARCH_NODE_NAME: Final = "elasticsearch.node.name"
"""
Represents the human-readable identifier of the node/instance to which a request was routed.
"""

View File

@@ -0,0 +1,43 @@
# 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
ENDUSER_ID: Final = "enduser.id"
"""
Unique identifier of an end user in the system. It maybe a username, email address, or other identifier.
Note: Unique identifier of an end user in the system.
> [!Warning]
> This field contains sensitive (PII) information.
"""
ENDUSER_PSEUDO_ID: Final = "enduser.pseudo.id"
"""
Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity.
Note: Pseudonymous identifier of an end user.
> [!Warning]
> This field contains sensitive (linkable PII) information.
"""
ENDUSER_ROLE: Final = "enduser.role"
"""
Deprecated: Replaced by `user.roles` attribute.
"""
ENDUSER_SCOPE: Final = "enduser.scope"
"""
Deprecated: Removed.
"""

View File

@@ -0,0 +1,41 @@
# 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 deprecated import deprecated
ERROR_MESSAGE: Final = "error.message"
"""
A message providing more detail about an error in human-readable form.
Note: `error.message` should provide additional context and detail about an error.
It is NOT RECOMMENDED to duplicate the value of `error.type` in `error.message`.
It is also NOT RECOMMENDED to duplicate the value of `exception.message` in `error.message`.
`error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status.
"""
ERROR_TYPE: Final = "error.type"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.error_attributes.ERROR_TYPE`.
"""
@deprecated(
reason="Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.error_attributes.ErrorTypeValues`."
) # type: ignore
class ErrorTypeValues(Enum):
OTHER = "_OTHER"
"""Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.error_attributes.ErrorTypeValues.OTHER`."""

View File

@@ -0,0 +1,20 @@
# 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
EVENT_NAME: Final = "event.name"
"""
Deprecated: Replaced by EventName top-level field on the LogRecord.
"""

View File

@@ -0,0 +1,35 @@
# 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
EXCEPTION_ESCAPED: Final = "exception.escaped"
"""
Deprecated: It's no longer recommended to record exceptions that are handled and do not escape the scope of a span.
"""
EXCEPTION_MESSAGE: Final = "exception.message"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.exception_attributes.EXCEPTION_MESSAGE`.
"""
EXCEPTION_STACKTRACE: Final = "exception.stacktrace"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.exception_attributes.EXCEPTION_STACKTRACE`.
"""
EXCEPTION_TYPE: Final = "exception.type"
"""
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.exception_attributes.EXCEPTION_TYPE`.
"""

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