You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: opentelemetry-semantic-conventions/src/opentelemetry/semconv/resource/__init__.py
+30-3Lines changed: 30 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@ class ResourceAttributes:
28
28
29
29
CLOUD_REGION="cloud.region"
30
30
"""
31
-
The geographical region the resource is running. 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/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).
31
+
The geographical region the resource is running.
32
+
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/en-us/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://intl.cloud.tencent.com/document/product/213/6091).
32
33
"""
33
34
34
35
CLOUD_AVAILABILITY_ZONE="cloud.availability_zone"
@@ -103,7 +104,7 @@ class ResourceAttributes:
103
104
104
105
CONTAINER_NAME="container.name"
105
106
"""
106
-
Container name.
107
+
Container name used by container runtime.
107
108
"""
108
109
109
110
CONTAINER_ID="container.id"
@@ -267,7 +268,12 @@ class ResourceAttributes:
267
268
268
269
K8S_CONTAINER_NAME="k8s.container.name"
269
270
"""
270
-
The name of the Container in a Pod template.
271
+
The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).
Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.
271
277
"""
272
278
273
279
K8S_REPLICASET_UID="k8s.replicaset.uid"
@@ -472,6 +478,9 @@ class CloudProviderValues(Enum):
472
478
GCP="gcp"
473
479
"""Google Cloud Platform."""
474
480
481
+
TENCENT_CLOUD="tencent_cloud"
482
+
"""Tencent Cloud."""
483
+
475
484
476
485
classCloudPlatformValues(Enum):
477
486
ALIBABA_CLOUD_ECS="alibaba_cloud_ecs"
@@ -495,6 +504,9 @@ class CloudPlatformValues(Enum):
495
504
AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk"
496
505
"""AWS Elastic Beanstalk."""
497
506
507
+
AWS_APP_RUNNER="aws_app_runner"
508
+
"""AWS App Runner."""
509
+
498
510
AZURE_VM="azure_vm"
499
511
"""Azure Virtual Machines."""
500
512
@@ -525,6 +537,15 @@ class CloudPlatformValues(Enum):
525
537
GCP_APP_ENGINE="gcp_app_engine"
526
538
"""Google Cloud App Engine (GAE)."""
527
539
540
+
TENCENT_CLOUD_CVM="tencent_cloud_cvm"
541
+
"""Tencent Cloud Cloud Virtual Machine (CVM)."""
542
+
543
+
TENCENT_CLOUD_EKS="tencent_cloud_eks"
544
+
"""Tencent Cloud Elastic Kubernetes Service (EKS)."""
545
+
546
+
TENCENT_CLOUD_SCF="tencent_cloud_scf"
547
+
"""Tencent Cloud Serverless Cloud Function (SCF)."""
548
+
528
549
529
550
classAwsEcsLaunchtypeValues(Enum):
530
551
EC2="ec2"
@@ -553,6 +574,9 @@ class HostArchValues(Enum):
553
574
PPC64="ppc64"
554
575
"""64-bit PowerPC."""
555
576
577
+
S390X="s390x"
578
+
"""IBM z/Architecture."""
579
+
556
580
X86="x86"
557
581
"""32-bit x86."""
558
582
@@ -622,3 +646,6 @@ class TelemetrySdkLanguageValues(Enum):
If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).
50
-
Note: In some SQL databases, the database name to be used is called "schema name".
49
+
This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).
50
+
Note: In some SQL databases, the database name to be used is called "schema name". In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name).
51
51
"""
52
52
53
53
DB_STATEMENT="db.statement"
@@ -88,11 +88,6 @@ class SpanAttributes:
88
88
Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).
89
89
"""
90
90
91
-
DB_CASSANDRA_KEYSPACE="db.cassandra.keyspace"
92
-
"""
93
-
The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.
94
-
"""
95
-
96
91
DB_CASSANDRA_PAGE_SIZE="db.cassandra.page_size"
97
92
"""
98
93
The fetch size used for paging, i.e. how many rows will be returned at once.
@@ -105,7 +100,7 @@ class SpanAttributes:
105
100
106
101
DB_CASSANDRA_TABLE="db.cassandra.table"
107
102
"""
108
-
The name of the primary table that the operation is acting upon, including the schema name (if applicable).
103
+
The name of the primary table that the operation is acting upon, including the keyspace name (if applicable).
109
104
Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.
110
105
"""
111
106
@@ -131,11 +126,6 @@ class SpanAttributes:
131
126
The data center of the coordinating node for a query.
132
127
"""
133
128
134
-
DB_HBASE_NAMESPACE="db.hbase.namespace"
135
-
"""
136
-
The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.
137
-
"""
138
-
139
129
DB_REDIS_DATABASE_INDEX="db.redis.database_index"
140
130
"""
141
131
The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.
@@ -148,7 +138,7 @@ class SpanAttributes:
148
138
149
139
DB_SQL_TABLE="db.sql.table"
150
140
"""
151
-
The name of the primary table that the operation is acting upon, including the schema name (if applicable).
141
+
The name of the primary table that the operation is acting upon, including the database name (if applicable).
152
142
Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.
153
143
"""
154
144
@@ -190,7 +180,16 @@ class SpanAttributes:
190
180
191
181
FAAS_TRIGGER="faas.trigger"
192
182
"""
193
-
Type of the trigger on which the function is executed.
183
+
Type of the trigger which caused this function execution.
184
+
Note: For the server/consumer span on the incoming side,
185
+
`faas.trigger` MUST be set.
186
+
187
+
Clients invoking FaaS instances usually cannot set `faas.trigger`,
188
+
since they would typically need to look in the payload to determine
189
+
the event type. If clients set it, it should be the same as the
190
+
trigger that corresponding incoming would have (i.e., this has
191
+
nothing to do with the underlying transport used to make the API
192
+
call to invoke the lambda, which is often HTTP).
194
193
"""
195
194
196
195
FAAS_EXECUTION="faas.execution"
@@ -236,7 +235,8 @@ class SpanAttributes:
236
235
237
236
HTTP_HOST="http.host"
238
237
"""
239
-
The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is empty or not present, this attribute should be the same.
238
+
The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.
239
+
Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.
240
240
"""
241
241
242
242
HTTP_SCHEME="http.scheme"
@@ -298,7 +298,17 @@ class SpanAttributes:
298
298
HTTP_CLIENT_IP="http.client_ip"
299
299
"""
300
300
The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
301
-
Note: This is not necessarily the same as `net.peer.ip`, which would identify the network-level peer, which may be a proxy.
301
+
Note: This is not necessarily the same as `net.peer.ip`, which would
302
+
identify the network-level peer, which may be a proxy.
303
+
304
+
This attribute should be set when a source of information different
305
+
from the one used for `net.peer.ip`, is available even if that other
306
+
source just confirms the same value as `net.peer.ip`.
307
+
Rationale: For `net.peer.ip`, one typically does not know if it
308
+
comes from a proxy, reverse proxy, or the actual client. Setting
309
+
`http.client_ip` when it's the same as `net.peer.ip` means that
310
+
one is at least somewhat confident that the address is not that of
311
+
the closest proxy.
302
312
"""
303
313
304
314
NET_HOST_IP="net.host.ip"
@@ -632,6 +642,11 @@ class SpanAttributes:
632
642
A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.
633
643
"""
634
644
645
+
MESSAGING_CONSUMER_ID="messaging.consumer_id"
646
+
"""
647
+
The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.
0 commit comments