Skip to content

Commit 2bcbbcc

Browse files
authored
Generate Semantic Conventions 1.28.0 (#4218)
1 parent 189fa15 commit 2bcbbcc

26 files changed

+900
-65
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
([#4094](https://github.com/open-telemetry/opentelemetry-python/pull/4094))
1818
- Implement events sdk
1919
([#4176](https://github.com/open-telemetry/opentelemetry-python/pull/4176))
20+
- Update semantic conventions to version 1.28.0
21+
([#4218](https://github.com/open-telemetry/opentelemetry-python/pull/4218))
2022

2123
## Version 1.27.0/0.48b0 (2024-08-28)
2224

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

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
from typing import Final
1616

17+
AZ_NAMESPACE: Final = "az.namespace"
18+
"""
19+
[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.
20+
"""
21+
1722
AZ_SERVICE_REQUEST_ID: Final = "az.service_request_id"
1823
"""
1924
The unique identifier of the service request. It's generated by the Azure service and returned with the response.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
6161
* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,
6262
*not* the function app, having the form
63-
`/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
63+
`/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
6464
This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
6565
a TracerProvider.
6666
"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from typing import Final
16+
17+
CLOUDFOUNDRY_APP_ID: Final = "cloudfoundry.app.id"
18+
"""
19+
The guid of the application.
20+
Note: Application instrumentation should use the value from environment
21+
variable `VCAP_APPLICATION.application_id`. This is the same value as
22+
reported by `cf app <app-name> --guid`.
23+
"""
24+
25+
CLOUDFOUNDRY_APP_INSTANCE_ID: Final = "cloudfoundry.app.instance.id"
26+
"""
27+
The index of the application instance. 0 when just one instance is active.
28+
Note: CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).
29+
It is used for logs and metrics emitted by CloudFoundry. It is
30+
supposed to contain the application instance index for applications
31+
deployed on the runtime.
32+
33+
Application instrumentation should use the value from environment
34+
variable `CF_INSTANCE_INDEX`.
35+
"""
36+
37+
CLOUDFOUNDRY_APP_NAME: Final = "cloudfoundry.app.name"
38+
"""
39+
The name of the application.
40+
Note: Application instrumentation should use the value from environment
41+
variable `VCAP_APPLICATION.application_name`. This is the same value
42+
as reported by `cf apps`.
43+
"""
44+
45+
CLOUDFOUNDRY_ORG_ID: Final = "cloudfoundry.org.id"
46+
"""
47+
The guid of the CloudFoundry org the application is running in.
48+
Note: Application instrumentation should use the value from environment
49+
variable `VCAP_APPLICATION.org_id`. This is the same value as
50+
reported by `cf org <org-name> --guid`.
51+
"""
52+
53+
CLOUDFOUNDRY_ORG_NAME: Final = "cloudfoundry.org.name"
54+
"""
55+
The name of the CloudFoundry organization the app is running in.
56+
Note: Application instrumentation should use the value from environment
57+
variable `VCAP_APPLICATION.org_name`. This is the same value as
58+
reported by `cf orgs`.
59+
"""
60+
61+
CLOUDFOUNDRY_PROCESS_ID: Final = "cloudfoundry.process.id"
62+
"""
63+
The UID identifying the process.
64+
Note: Application instrumentation should use the value from environment
65+
variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to
66+
`VCAP_APPLICATION.app_id` for applications deployed to the runtime.
67+
For system components, this could be the actual PID.
68+
"""
69+
70+
CLOUDFOUNDRY_PROCESS_TYPE: Final = "cloudfoundry.process.type"
71+
"""
72+
The type of process.
73+
Note: CloudFoundry applications can consist of multiple jobs. Usually the
74+
main process will be of type `web`. There can be additional background
75+
tasks or side-cars with different process types.
76+
"""
77+
78+
CLOUDFOUNDRY_SPACE_ID: Final = "cloudfoundry.space.id"
79+
"""
80+
The guid of the CloudFoundry space the application is running in.
81+
Note: Application instrumentation should use the value from environment
82+
variable `VCAP_APPLICATION.space_id`. This is the same value as
83+
reported by `cf space <space-name> --guid`.
84+
"""
85+
86+
CLOUDFOUNDRY_SPACE_NAME: Final = "cloudfoundry.space.name"
87+
"""
88+
The name of the CloudFoundry space the application is running in.
89+
Note: Application instrumentation should use the value from environment
90+
variable `VCAP_APPLICATION.space_name`. This is the same value as
91+
reported by `cf spaces`.
92+
"""
93+
94+
CLOUDFOUNDRY_SYSTEM_ID: Final = "cloudfoundry.system.id"
95+
"""
96+
A guid or another name describing the event source.
97+
Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).
98+
It is used for logs and metrics emitted by CloudFoundry. It is
99+
supposed to contain the component name, e.g. "gorouter", for
100+
CloudFoundry components.
101+
102+
When system components are instrumented, values from the
103+
[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)
104+
should be used. The `system.id` should be set to
105+
`spec.deployment/spec.name`.
106+
"""
107+
108+
CLOUDFOUNDRY_SYSTEM_INSTANCE_ID: Final = "cloudfoundry.system.instance.id"
109+
"""
110+
A guid describing the concrete instance of the event source.
111+
Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).
112+
It is used for logs and metrics emitted by CloudFoundry. It is
113+
supposed to contain the vm id for CloudFoundry components.
114+
115+
When system components are instrumented, values from the
116+
[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)
117+
should be used. The `system.instance.id` should be set to `spec.id`.
118+
"""

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

+15-3
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,34 @@
2525

2626
CONTAINER_COMMAND_ARGS: Final = "container.command_args"
2727
"""
28-
All the command arguments (including the command/executable itself) run by the container. [2].
28+
All the command arguments (including the command/executable itself) run by the container.
2929
"""
3030

3131
CONTAINER_COMMAND_LINE: Final = "container.command_line"
3232
"""
33-
The full command run by the container as a single string representing the full command. [2].
33+
The full command run by the container as a single string representing the full command.
3434
"""
3535

3636
CONTAINER_CPU_STATE: Final = "container.cpu.state"
3737
"""
3838
Deprecated: Replaced by `cpu.mode`.
3939
"""
4040

41+
CONTAINER_CSI_PLUGIN_NAME: Final = "container.csi.plugin.name"
42+
"""
43+
The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume.
44+
Note: This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC.
45+
"""
46+
47+
CONTAINER_CSI_VOLUME_ID: Final = "container.csi.volume.id"
48+
"""
49+
The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin.
50+
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.
51+
"""
52+
4153
CONTAINER_ID: Final = "container.id"
4254
"""
43-
Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.
55+
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.
4456
"""
4557

4658
CONTAINER_IMAGE_ID: Final = "container.image.id"

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

+47-32
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@
8080
Note: It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
8181
If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix.
8282
For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured.
83+
This attribute has stability level RELEASE CANDIDATE.
8384
"""
8485

8586
DB_CONNECTION_STRING: Final = "db.connection_string"
8687
"""
87-
Deprecated: "Replaced by `server.address` and `server.port`.".
88+
Deprecated: Replaced by `server.address` and `server.port`.
8889
"""
8990

9091
DB_COSMOSDB_CLIENT_ID: Final = "db.cosmosdb.client_id"
@@ -104,7 +105,7 @@
104105

105106
DB_COSMOSDB_OPERATION_TYPE: Final = "db.cosmosdb.operation_type"
106107
"""
107-
CosmosDB Operation Type.
108+
Cosmos DB Operation Type.
108109
"""
109110

110111
DB_COSMOSDB_REQUEST_CHARGE: Final = "db.cosmosdb.request_charge"
@@ -121,7 +122,7 @@
121122

122123
DB_COSMOSDB_STATUS_CODE: Final = "db.cosmosdb.status_code"
123124
"""
124-
Cosmos DB status code.
125+
Deprecated: Replaced by `db.response.status_code`.
125126
"""
126127

127128
DB_COSMOSDB_SUB_STATUS_CODE: Final = "db.cosmosdb.sub_status_code"
@@ -176,6 +177,7 @@
176177
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.
177178
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
178179
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
180+
This attribute has stability level RELEASE CANDIDATE.
179181
"""
180182

181183
DB_OPERATION: Final = "db.operation"
@@ -185,8 +187,9 @@
185187

186188
DB_OPERATION_BATCH_SIZE: Final = "db.operation.batch.size"
187189
"""
188-
The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations).
190+
The number of queries included in a batch operation.
189191
Note: Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
192+
This attribute has stability level RELEASE CANDIDATE.
190193
"""
191194

192195
DB_OPERATION_NAME: Final = "db.operation.name"
@@ -195,13 +198,15 @@
195198
Note: It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
196199
If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query.
197200
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.
201+
This attribute has stability level RELEASE CANDIDATE.
198202
"""
199203

200204
DB_QUERY_PARAMETER_TEMPLATE: Final = "db.query.parameter"
201205
"""
202206
A query parameter used in `db.query.text`, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.
203207
Note: Query parameters should only be captured when `db.query.text` is parameterized with placeholders.
204208
If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index.
209+
This attribute has stability level RELEASE CANDIDATE.
205210
"""
206211

207212
DB_QUERY_TEXT: Final = "db.query.text"
@@ -210,13 +215,22 @@
210215
Note: For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
211216
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.
212217
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.
218+
This attribute has stability level RELEASE CANDIDATE.
213219
"""
214220

215221
DB_REDIS_DATABASE_INDEX: Final = "db.redis.database_index"
216222
"""
217223
Deprecated: Replaced by `db.namespace`.
218224
"""
219225

226+
DB_RESPONSE_STATUS_CODE: Final = "db.response.status_code"
227+
"""
228+
Database response status code.
229+
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.
230+
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
231+
This attribute has stability level RELEASE CANDIDATE.
232+
"""
233+
220234
DB_SQL_TABLE: Final = "db.sql.table"
221235
"""
222236
Deprecated: Replaced by `db.collection.name`.
@@ -231,6 +245,7 @@
231245
"""
232246
The database management system (DBMS) product as identified by the client instrumentation.
233247
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.
248+
This attribute has stability level RELEASE CANDIDATE.
234249
"""
235250

236251
DB_USER: Final = "db.user"
@@ -287,36 +302,36 @@ class DbCosmosdbConnectionModeValues(Enum):
287302

288303

289304
class DbCosmosdbOperationTypeValues(Enum):
290-
INVALID = "Invalid"
291-
"""invalid."""
292-
CREATE = "Create"
305+
BATCH = "batch"
306+
"""batch."""
307+
CREATE = "create"
293308
"""create."""
294-
PATCH = "Patch"
295-
"""patch."""
296-
READ = "Read"
297-
"""read."""
298-
READ_FEED = "ReadFeed"
299-
"""read_feed."""
300-
DELETE = "Delete"
309+
DELETE = "delete"
301310
"""delete."""
302-
REPLACE = "Replace"
303-
"""replace."""
304-
EXECUTE = "Execute"
311+
EXECUTE = "execute"
305312
"""execute."""
306-
QUERY = "Query"
307-
"""query."""
308-
HEAD = "Head"
313+
EXECUTE_JAVASCRIPT = "execute_javascript"
314+
"""execute_javascript."""
315+
INVALID = "invalid"
316+
"""invalid."""
317+
HEAD = "head"
309318
"""head."""
310-
HEAD_FEED = "HeadFeed"
319+
HEAD_FEED = "head_feed"
311320
"""head_feed."""
312-
UPSERT = "Upsert"
313-
"""upsert."""
314-
BATCH = "Batch"
315-
"""batch."""
316-
QUERY_PLAN = "QueryPlan"
321+
PATCH = "patch"
322+
"""patch."""
323+
QUERY = "query"
324+
"""query."""
325+
QUERY_PLAN = "query_plan"
317326
"""query_plan."""
318-
EXECUTE_JAVASCRIPT = "ExecuteJavaScript"
319-
"""execute_javascript."""
327+
READ = "read"
328+
"""read."""
329+
READ_FEED = "read_feed"
330+
"""read_feed."""
331+
REPLACE = "replace"
332+
"""replace."""
333+
UPSERT = "upsert"
334+
"""upsert."""
320335

321336

322337
class DbSystemValues(Enum):
@@ -383,19 +398,19 @@ class DbSystemValues(Enum):
383398
INTERBASE = "interbase"
384399
"""InterBase."""
385400
MARIADB = "mariadb"
386-
"""MariaDB."""
401+
"""MariaDB (This value has stability level RELEASE CANDIDATE)."""
387402
MAXDB = "maxdb"
388403
"""SAP MaxDB."""
389404
MEMCACHED = "memcached"
390405
"""Memcached."""
391406
MONGODB = "mongodb"
392407
"""MongoDB."""
393408
MSSQL = "mssql"
394-
"""Microsoft SQL Server."""
409+
"""Microsoft SQL Server (This value has stability level RELEASE CANDIDATE)."""
395410
MSSQLCOMPACT = "mssqlcompact"
396411
"""Deprecated: Removed, use `other_sql` instead."""
397412
MYSQL = "mysql"
398-
"""MySQL."""
413+
"""MySQL (This value has stability level RELEASE CANDIDATE)."""
399414
NEO4J = "neo4j"
400415
"""Neo4j."""
401416
NETEZZA = "netezza"
@@ -409,7 +424,7 @@ class DbSystemValues(Enum):
409424
POINTBASE = "pointbase"
410425
"""PointBase."""
411426
POSTGRESQL = "postgresql"
412-
"""PostgreSQL."""
427+
"""PostgreSQL (This value has stability level RELEASE CANDIDATE)."""
413428
PROGRESS = "progress"
414429
"""Progress Database."""
415430
REDIS = "redis"

0 commit comments

Comments
 (0)