Skip to content

Commit 3658e21

Browse files
authored
Update to semantic conventions v1.11.0 (#2669)
1 parent 4497dd5 commit 3658e21

File tree

4 files changed

+77
-7
lines changed

4 files changed

+77
-7
lines changed

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.11.1-0.30b1...HEAD)
99

10+
- Update to semantic conventions v1.11.0
11+
([#2669](https://github.com/open-telemetry/opentelemetry-python/pull/2669))
1012
- Update opentelemetry-proto to v0.17.0
1113
([#2668](https://github.com/open-telemetry/opentelemetry-python/pull/2668))
1214
- Add CallbackOptions to observable instrument callback params

Diff for: opentelemetry-semantic-conventions/src/opentelemetry/semconv/resource/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ class ResourceAttributes:
150150
Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.
151151
"""
152152

153+
DEVICE_MANUFACTURER = "device.manufacturer"
154+
"""
155+
The name of the device manufacturer.
156+
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`.
157+
"""
158+
153159
FAAS_NAME = "faas.name"
154160
"""
155161
The name of the single function that this runtime instance executes.
@@ -610,7 +616,7 @@ class OsTypeValues(Enum):
610616
"""AIX (Advanced Interactive eXecutive)."""
611617

612618
SOLARIS = "solaris"
613-
"""Oracle Solaris."""
619+
"""SunOS, Oracle Solaris."""
614620

615621
Z_OS = "z_os"
616622
"""IBM z/OS."""

Diff for: opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py

+66-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,37 @@ class SpanAttributes:
2424
Note: This may be different from `faas.id` if an alias is involved.
2525
"""
2626

27+
CLOUDEVENTS_EVENT_ID = "cloudevents.event_id"
28+
"""
29+
The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.
30+
"""
31+
32+
CLOUDEVENTS_EVENT_SOURCE = "cloudevents.event_source"
33+
"""
34+
The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.
35+
"""
36+
37+
CLOUDEVENTS_EVENT_SPEC_VERSION = "cloudevents.event_spec_version"
38+
"""
39+
The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.
40+
"""
41+
42+
CLOUDEVENTS_EVENT_TYPE = "cloudevents.event_type"
43+
"""
44+
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.
45+
"""
46+
47+
CLOUDEVENTS_EVENT_SUBJECT = "cloudevents.event_subject"
48+
"""
49+
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).
50+
"""
51+
52+
OPENTRACING_REF_TYPE = "opentracing.ref_type"
53+
"""
54+
Parent-child Reference type.
55+
Note: The causal relationship between a child Span and a parent Span.
56+
"""
57+
2758
DB_SYSTEM = "db.system"
2859
"""
2960
An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
@@ -65,6 +96,7 @@ class SpanAttributes:
6596
NET_PEER_NAME = "net.peer.name"
6697
"""
6798
Remote hostname or similar, see note below.
99+
Note: `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup.
68100
"""
69101

70102
NET_PEER_IP = "net.peer.ip"
@@ -170,7 +202,7 @@ class SpanAttributes:
170202
whether it will escape the scope of a span.
171203
However, it is trivial to know that an exception
172204
will escape, if one checks for an active exception just before ending the span,
173-
as done in the [example above](#exception-end-example).
205+
as done in the [example above](#recording-an-exception).
174206
175207
It follows that an exception may still escape the scope of the span
176208
even if the `exception.escaped` attribute was not set or set to false,
@@ -284,6 +316,11 @@ class SpanAttributes:
284316
The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.
285317
"""
286318

319+
HTTP_RETRY_COUNT = "http.retry_count"
320+
"""
321+
The ordinal number of request re-sending attempt.
322+
"""
323+
287324
HTTP_SERVER_NAME = "http.server_name"
288325
"""
289326
The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).
@@ -762,6 +799,14 @@ class SpanAttributes:
762799
"""
763800

764801

802+
class OpentracingRefTypeValues(Enum):
803+
CHILD_OF = "child_of"
804+
"""The parent Span depends on the child Span in some capacity."""
805+
806+
FOLLOWS_FROM = "follows_from"
807+
"""The parent Span does not depend in any way on the result of the child Span."""
808+
809+
765810
class DbSystemValues(Enum):
766811
OTHER_SQL = "other_sql"
767812
"""Some other SQL database. Fallback only. See notes."""
@@ -993,13 +1038,16 @@ class FaasDocumentOperationValues(Enum):
9931038

9941039
class HttpFlavorValues(Enum):
9951040
HTTP_1_0 = "1.0"
996-
"""HTTP 1.0."""
1041+
"""HTTP/1.0."""
9971042

9981043
HTTP_1_1 = "1.1"
999-
"""HTTP 1.1."""
1044+
"""HTTP/1.1."""
10001045

10011046
HTTP_2_0 = "2.0"
1002-
"""HTTP 2."""
1047+
"""HTTP/2."""
1048+
1049+
HTTP_3_0 = "3.0"
1050+
"""HTTP/3."""
10031051

10041052
SPDY = "SPDY"
10051053
"""SPDY protocol."""
@@ -1115,6 +1163,20 @@ class FaasInvokedProviderValues(Enum):
11151163
"""Tencent Cloud."""
11161164

11171165

1166+
class RpcSystemValues(Enum):
1167+
GRPC = "grpc"
1168+
"""gRPC."""
1169+
1170+
JAVA_RMI = "java_rmi"
1171+
"""Java RMI."""
1172+
1173+
DOTNET_WCF = "dotnet_wcf"
1174+
""".NET WCF."""
1175+
1176+
APACHE_DUBBO = "apache_dubbo"
1177+
"""Apache Dubbo."""
1178+
1179+
11181180
class MessagingOperationValues(Enum):
11191181
RECEIVE = "receive"
11201182
"""receive."""

Diff for: scripts/semconv/generate.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
ROOT_DIR="${SCRIPT_DIR}/../../"
55

66
# freeze the spec version to make SemanticAttributes generation reproducible
7-
SPEC_VERSION=v1.8.0
8-
OTEL_SEMCONV_GEN_IMG_VERSION=0.9.0
7+
SPEC_VERSION=v1.11.0
8+
OTEL_SEMCONV_GEN_IMG_VERSION=0.11.1
99

1010
cd ${SCRIPT_DIR}
1111

0 commit comments

Comments
 (0)