Skip to content

Commit bca57eb

Browse files
author
Liudmila Molkova
committed
Generate upcoming semconv (dry run)
1 parent 58f2d16 commit bca57eb

25 files changed

+963
-73
lines changed

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/artifact_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
ARTIFACT_ATTESTATION_HASH: Final = "artifact.attestation.hash"
2323
"""
24-
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).
24+
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**.
2525
"""
2626

2727
ARTIFACT_ATTESTATION_ID: Final = "artifact.attestation.id"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/aws_attributes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@
181181
The ARN of an EKS cluster.
182182
"""
183183

184+
AWS_EXTENDED_REQUEST_ID: Final = "aws.extended_request_id"
185+
"""
186+
The AWS extended request ID as returned in the response header `x-amz-id-2`.
187+
"""
188+
184189
AWS_LAMBDA_INVOKED_ARN: Final = "aws.lambda.invoked_arn"
185190
"""
186191
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).
@@ -212,7 +217,7 @@
212217

213218
AWS_REQUEST_ID: Final = "aws.request_id"
214219
"""
215-
The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
220+
The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.
216221
"""
217222

218223
AWS_S3_BUCKET: Final = "aws.s3.bucket"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cicd_attributes.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,21 @@
2020
The human readable name of the pipeline within a CI/CD system.
2121
"""
2222

23+
CICD_PIPELINE_RESULT: Final = "cicd.pipeline.result"
24+
"""
25+
The result of a pipeline run.
26+
"""
27+
2328
CICD_PIPELINE_RUN_ID: Final = "cicd.pipeline.run.id"
2429
"""
2530
The unique identifier of a pipeline run within a CI/CD system.
2631
"""
2732

33+
CICD_PIPELINE_RUN_STATE: Final = "cicd.pipeline.run.state"
34+
"""
35+
The pipeline run goes through these states during its lifecycle.
36+
"""
37+
2838
CICD_PIPELINE_TASK_NAME: Final = "cicd.pipeline.task.name"
2939
"""
3040
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.
@@ -45,6 +55,40 @@
4555
The type of the task within a pipeline.
4656
"""
4757

58+
CICD_SYSTEM_COMPONENT: Final = "cicd.system.component"
59+
"""
60+
The name of a component of the CICD system.
61+
"""
62+
63+
CICD_WORKER_STATE: Final = "cicd.worker.state"
64+
"""
65+
The state of a CICD worker / agent.
66+
"""
67+
68+
69+
class CicdPipelineResultValues(Enum):
70+
SUCCESS = "success"
71+
"""The pipeline run finished successfully."""
72+
FAILURE = "failure"
73+
"""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."""
74+
ERROR = "error"
75+
"""The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed."""
76+
TIMEOUT = "timeout"
77+
"""A timeout caused the pipeline run to be interrupted."""
78+
CANCELLATION = "cancellation"
79+
"""The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run."""
80+
SKIP = "skip"
81+
"""The pipeline run was skipped, eg. due to a precondition not being met."""
82+
83+
84+
class CicdPipelineRunStateValues(Enum):
85+
PENDING = "pending"
86+
"""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)."""
87+
EXECUTING = "executing"
88+
"""The executing state spans the execution of any run tasks (eg. build, test)."""
89+
FINALIZING = "finalizing"
90+
"""The finalizing state spans from when the run has finished executing (eg. cleanup of run resources)."""
91+
4892

4993
class CicdPipelineTaskTypeValues(Enum):
5094
BUILD = "build"
@@ -53,3 +97,12 @@ class CicdPipelineTaskTypeValues(Enum):
5397
"""test."""
5498
DEPLOY = "deploy"
5599
"""deploy."""
100+
101+
102+
class CicdWorkerStateValues(Enum):
103+
AVAILABLE = "available"
104+
"""The worker is not performing work for the CICD system. It is available to the CICD system to perform work on (online / idle)."""
105+
BUSY = "busy"
106+
"""The worker is performing work for the CICD system."""
107+
OFFLINE = "offline"
108+
"""The worker is not available to the CICD system (disconnected / down)."""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cloud_attributes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ class CloudPlatformValues(Enum):
117117
"""Red Hat OpenShift on Google Cloud."""
118118
IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"
119119
"""Red Hat OpenShift on IBM Cloud."""
120+
ORACLE_CLOUD_COMPUTE = "oracle_cloud_compute"
121+
"""Compute on Oracle Cloud Infrastructure (OCI)."""
122+
ORACLE_CLOUD_OKE = "oracle_cloud_oke"
123+
"""Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)."""
120124
TENCENT_CLOUD_CVM = "tencent_cloud_cvm"
121125
"""Tencent Cloud Cloud Virtual Machine (CVM)."""
122126
TENCENT_CLOUD_EKS = "tencent_cloud_eks"
@@ -138,5 +142,7 @@ class CloudProviderValues(Enum):
138142
"""Heroku Platform as a Service."""
139143
IBM_CLOUD = "ibm_cloud"
140144
"""IBM Cloud."""
145+
ORACLE_CLOUD = "oracle_cloud"
146+
"""Oracle Cloud Infrastructure (OCI)."""
141147
TENCENT_CLOUD = "tencent_cloud"
142148
"""Tencent Cloud."""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/code_attributes.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,47 @@
1616

1717
CODE_COLUMN: Final = "code.column"
1818
"""
19-
The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
19+
Deprecated: Replaced by `code.column.number`.
2020
"""
2121

22-
CODE_FILEPATH: Final = "code.filepath"
22+
CODE_COLUMN_NUMBER: Final = "code.column.number"
23+
"""
24+
The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
25+
"""
26+
27+
CODE_FILE_PATH: Final = "code.file.path"
2328
"""
2429
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
2530
"""
2631

32+
CODE_FILEPATH: Final = "code.filepath"
33+
"""
34+
Deprecated, use `code.file.path` instead.
35+
"""
36+
2737
CODE_FUNCTION: Final = "code.function"
2838
"""
39+
Deprecated: Replaced by `code.function.name`.
40+
"""
41+
42+
CODE_FUNCTION_NAME: Final = "code.function.name"
43+
"""
2944
The method or function name, or equivalent (usually rightmost part of the code unit's name).
3045
"""
3146

47+
CODE_LINE_NUMBER: Final = "code.line.number"
48+
"""
49+
The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
50+
"""
51+
3252
CODE_LINENO: Final = "code.lineno"
3353
"""
34-
The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
54+
Deprecated: Replaced by `code.line.number`.
3555
"""
3656

3757
CODE_NAMESPACE: Final = "code.namespace"
3858
"""
39-
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.
59+
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.
4060
"""
4161

4262
CODE_STACKTRACE: Final = "code.stacktrace"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/db_attributes.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@
8484
8585
For batch operations, if the individual operations are known to have the same collection name
8686
then that collection name SHOULD be used.
87-
88-
This attribute has stability level RELEASE CANDIDATE.
8987
"""
9088

9189
DB_CONNECTION_STRING: Final = "db.connection_string"
@@ -193,7 +191,6 @@
193191
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.
194192
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
195193
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
196-
This attribute has stability level RELEASE CANDIDATE.
197194
"""
198195

199196
DB_OPERATION: Final = "db.operation"
@@ -205,7 +202,6 @@
205202
"""
206203
The number of queries included in a batch operation.
207204
Note: Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
208-
This attribute has stability level RELEASE CANDIDATE.
209205
"""
210206

211207
DB_OPERATION_NAME: Final = "db.operation.name"
@@ -221,16 +217,13 @@
221217
then that operation name SHOULD be used prepended by `BATCH `,
222218
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
223219
system specific term if more applicable.
224-
225-
This attribute has stability level RELEASE CANDIDATE.
226220
"""
227221

228222
DB_OPERATION_PARAMETER_TEMPLATE: Final = "db.operation.parameter"
229223
"""
230224
A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.
231225
Note: If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index.
232226
If `db.query.text` is also captured, then `db.operation.parameter.<key>` SHOULD match up with the parameterized placeholders present in `db.query.text`.
233-
This attribute has stability level RELEASE CANDIDATE.
234227
"""
235228

236229
DB_QUERY_PARAMETER_TEMPLATE: Final = "db.query.parameter"
@@ -243,7 +236,6 @@
243236
Low cardinality representation of a database query text.
244237
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.
245238
Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-query-text) section.
246-
This attribute has stability level RELEASE CANDIDATE.
247239
"""
248240

249241
DB_QUERY_TEXT: Final = "db.query.text"
@@ -252,7 +244,6 @@
252244
Note: For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
253245
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.
254246
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.
255-
This attribute has stability level RELEASE CANDIDATE.
256247
"""
257248

258249
DB_REDIS_DATABASE_INDEX: Final = "db.redis.database_index"
@@ -270,7 +261,6 @@
270261
Database response status code.
271262
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.
272263
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
273-
This attribute has stability level RELEASE CANDIDATE.
274264
"""
275265

276266
DB_SQL_TABLE: Final = "db.sql.table"
@@ -287,7 +277,6 @@
287277
"""
288278
The database management system (DBMS) product as identified by the client instrumentation.
289279
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` is set to `postgresql` based on the instrumentation's best knowledge.
290-
This attribute has stability level RELEASE CANDIDATE.
291280
"""
292281

293282
DB_USER: Final = "db.user"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/event_attributes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@
1616

1717
EVENT_NAME: Final = "event.name"
1818
"""
19-
Identifies the class / type of event.
20-
Note: Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes.
19+
Deprecated: Replaced by EventName top-level field on the LogRecord.
2120
"""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/exception_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
EXCEPTION_ESCAPED: Final = "exception.escaped"
1818
"""
19-
Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.exception_attributes.EXCEPTION_ESCAPED`.
19+
Deprecated: It's no longer recommended to record exceptions that are handled and do not escape the scope of a span.
2020
"""
2121

2222
EXCEPTION_MESSAGE: Final = "exception.message"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/faas_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
Note: This is the name of the function as configured/deployed on the FaaS
8787
platform and is usually different from the name of the callback
8888
function (which may be stored in the
89-
[`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
89+
[`code.namespace`/`code.function.name`](/docs/general/attributes.md#source-code-attributes)
9090
span attributes).
9191
9292
For some cloud providers, the above definition is ambiguous. The following

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
GEN_AI_OPENAI_REQUEST_SEED: Final = "gen_ai.openai.request.seed"
3131
"""
32-
Requests with same seed value more likely to return same result.
32+
Deprecated: Replaced by `gen_ai.request.seed` attribute.
3333
"""
3434

3535
GEN_AI_OPENAI_REQUEST_SERVICE_TIER: Final = (
@@ -90,6 +90,11 @@
9090
The presence penalty setting for the GenAI request.
9191
"""
9292

93+
GEN_AI_REQUEST_SEED: Final = "gen_ai.request.seed"
94+
"""
95+
Requests with same seed value more likely to return same result.
96+
"""
97+
9398
GEN_AI_REQUEST_STOP_SEQUENCES: Final = "gen_ai.request.stop_sequences"
9499
"""
95100
List of sequences that the model will use to stop generating further tokens.
@@ -132,8 +137,10 @@
132137
by `gen_ai.request.model` and `gen_ai.response.model` attributes.
133138
134139
The actual GenAI product may differ from the one identified by the client.
135-
For example, when using OpenAI client libraries to communicate with Mistral, the `gen_ai.system`
136-
is set to `openai` based on the instrumentation's best knowledge.
140+
Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client
141+
libraries. In such cases, the `gen_ai.system` is set to `openai` based on the
142+
instrumentation's best knowledge, instead of the actual system. The `server.address`
143+
attribute may help identify the actual system in use for `openai`.
137144
138145
For custom model, a custom friendly name SHOULD be used.
139146
If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
@@ -195,16 +202,30 @@ class GenAiSystemValues(Enum):
195202
"""OpenAI."""
196203
VERTEX_AI = "vertex_ai"
197204
"""Vertex AI."""
205+
GEMINI = "gemini"
206+
"""Gemini."""
198207
ANTHROPIC = "anthropic"
199208
"""Anthropic."""
200209
COHERE = "cohere"
201210
"""Cohere."""
202211
AZ_AI_INFERENCE = "az.ai.inference"
203212
"""Azure AI Inference."""
213+
AZ_AI_OPENAI = "az.ai.openai"
214+
"""Azure OpenAI."""
204215
IBM_WATSONX_AI = "ibm.watsonx.ai"
205216
"""IBM Watsonx AI."""
206217
AWS_BEDROCK = "aws.bedrock"
207218
"""AWS Bedrock."""
219+
PERPLEXITY = "perplexity"
220+
"""Perplexity."""
221+
XAI = "xai"
222+
"""xAI."""
223+
DEEPSEEK = "deepseek"
224+
"""DeepSeek."""
225+
GROQ = "groq"
226+
"""Groq."""
227+
MISTRAL_AI = "mistral_ai"
228+
"""Mistral AI."""
208229

209230

210231
class GenAiTokenTypeValues(Enum):

0 commit comments

Comments
 (0)