diff --git a/CHANGELOG.md b/CHANGELOG.md index 979231d18c7..fc3201cf8c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.11.1-0.30b1...HEAD) +- Update to semantic conventions v1.11.0 + ([#2669](https://github.com/open-telemetry/opentelemetry-python/pull/2669)) - Update opentelemetry-proto to v0.17.0 ([#2668](https://github.com/open-telemetry/opentelemetry-python/pull/2668)) - Add CallbackOptions to observable instrument callback params diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/resource/__init__.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/resource/__init__.py index 710c30a77b4..dc24d22b5fc 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/resource/__init__.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/resource/__init__.py @@ -150,6 +150,12 @@ class ResourceAttributes: Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. """ + DEVICE_MANUFACTURER = "device.manufacturer" + """ + The name of the device manufacturer. + 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`. + """ + FAAS_NAME = "faas.name" """ The name of the single function that this runtime instance executes. @@ -610,7 +616,7 @@ class OsTypeValues(Enum): """AIX (Advanced Interactive eXecutive).""" SOLARIS = "solaris" - """Oracle Solaris.""" + """SunOS, Oracle Solaris.""" Z_OS = "z_os" """IBM z/OS.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py index a762d88c2c2..36bab3d1a13 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py @@ -24,6 +24,37 @@ class SpanAttributes: Note: This may be different from `faas.id` if an alias is involved. """ + CLOUDEVENTS_EVENT_ID = "cloudevents.event_id" + """ + The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. + """ + + CLOUDEVENTS_EVENT_SOURCE = "cloudevents.event_source" + """ + The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. + """ + + CLOUDEVENTS_EVENT_SPEC_VERSION = "cloudevents.event_spec_version" + """ + The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. + """ + + CLOUDEVENTS_EVENT_TYPE = "cloudevents.event_type" + """ + 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. + """ + + CLOUDEVENTS_EVENT_SUBJECT = "cloudevents.event_subject" + """ + 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). + """ + + OPENTRACING_REF_TYPE = "opentracing.ref_type" + """ + Parent-child Reference type. + Note: The causal relationship between a child Span and a parent Span. + """ + DB_SYSTEM = "db.system" """ 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: NET_PEER_NAME = "net.peer.name" """ Remote hostname or similar, see note below. + Note: `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. """ NET_PEER_IP = "net.peer.ip" @@ -170,7 +202,7 @@ class SpanAttributes: whether it will escape the scope of a span. However, it is trivial to know that an exception will escape, if one checks for an active exception just before ending the span, -as done in the [example above](#exception-end-example). +as done in the [example above](#recording-an-exception). It follows that an exception may still escape the scope of the span even if the `exception.escaped` attribute was not set or set to false, @@ -284,6 +316,11 @@ class SpanAttributes: The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. """ + HTTP_RETRY_COUNT = "http.retry_count" + """ + The ordinal number of request re-sending attempt. + """ + HTTP_SERVER_NAME = "http.server_name" """ 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: """ +class OpentracingRefTypeValues(Enum): + CHILD_OF = "child_of" + """The parent Span depends on the child Span in some capacity.""" + + FOLLOWS_FROM = "follows_from" + """The parent Span does not depend in any way on the result of the child Span.""" + + class DbSystemValues(Enum): OTHER_SQL = "other_sql" """Some other SQL database. Fallback only. See notes.""" @@ -993,13 +1038,16 @@ class FaasDocumentOperationValues(Enum): class HttpFlavorValues(Enum): HTTP_1_0 = "1.0" - """HTTP 1.0.""" + """HTTP/1.0.""" HTTP_1_1 = "1.1" - """HTTP 1.1.""" + """HTTP/1.1.""" HTTP_2_0 = "2.0" - """HTTP 2.""" + """HTTP/2.""" + + HTTP_3_0 = "3.0" + """HTTP/3.""" SPDY = "SPDY" """SPDY protocol.""" @@ -1115,6 +1163,20 @@ class FaasInvokedProviderValues(Enum): """Tencent Cloud.""" +class RpcSystemValues(Enum): + GRPC = "grpc" + """gRPC.""" + + JAVA_RMI = "java_rmi" + """Java RMI.""" + + DOTNET_WCF = "dotnet_wcf" + """.NET WCF.""" + + APACHE_DUBBO = "apache_dubbo" + """Apache Dubbo.""" + + class MessagingOperationValues(Enum): RECEIVE = "receive" """receive.""" diff --git a/scripts/semconv/generate.sh b/scripts/semconv/generate.sh index 48c46a78c6b..866832fe6b3 100755 --- a/scripts/semconv/generate.sh +++ b/scripts/semconv/generate.sh @@ -4,8 +4,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="${SCRIPT_DIR}/../../" # freeze the spec version to make SemanticAttributes generation reproducible -SPEC_VERSION=v1.8.0 -OTEL_SEMCONV_GEN_IMG_VERSION=0.9.0 +SPEC_VERSION=v1.11.0 +OTEL_SEMCONV_GEN_IMG_VERSION=0.11.1 cd ${SCRIPT_DIR}