Skip to content

Generate semconv 1.30.0 #4397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#4371](https://github.com/open-telemetry/opentelemetry-python/pull/4371))
- Fix span context manager typing by using ParamSpec from typing_extensions
([#4389](https://github.com/open-telemetry/opentelemetry-python/pull/4389))
- semantic-conventions: Bump to 1.30.0
([#4337](https://github.com/open-telemetry/opentelemetry-python/pull/4397))

## Version 1.29.0/0.50b0 (2024-12-11)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

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 also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec).
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@
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).
Expand Down Expand Up @@ -212,7 +217,7 @@

AWS_REQUEST_ID: Final = "aws.request_id"
"""
The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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."""
Original file line number Diff line number Diff line change
@@ -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."""
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@
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_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.
Expand All @@ -45,6 +55,40 @@
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"
Expand All @@ -53,3 +97,12 @@ class CicdPipelineTaskTypeValues(Enum):
"""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)."""
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ class CloudPlatformValues(Enum):
"""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"
Expand All @@ -138,5 +142,7 @@ class CloudProviderValues(Enum):
"""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."""
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,47 @@

CODE_COLUMN: Final = "code.column"
"""
The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
Deprecated: Replaced by `code.column.number`.
"""

CODE_FILEPATH: Final = "code.filepath"
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, use `code.file.path` instead.
"""

CODE_FUNCTION: Final = "code.function"
"""
Deprecated: Replaced by `code.function.name`.
"""

CODE_FUNCTION_NAME: Final = "code.function.name"
"""
The method or function name, or equivalent (usually rightmost part of the code unit's name).
"""

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"
"""
The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
Deprecated: Replaced by `code.line.number`.
"""

CODE_NAMESPACE: Final = "code.namespace"
"""
The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.
The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit.
"""

CODE_STACKTRACE: Final = "code.stacktrace"
Expand Down
Loading
Loading