Skip to content

Commit

Permalink
Update to semantic conventions v1.11.0 (#2669)
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored May 7, 2022
1 parent 4497dd5 commit 3658e21
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions scripts/semconv/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 3658e21

Please sign in to comment.