Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to semantic conventions v1.6.1 #2077

Merged
merged 5 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build
eggs
parts
bin
include
var
sdist
develop-eggs
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.5.0-0.24b0...HEAD)

- `opentelemetry-semantic-conventions` Update to semantic conventions v1.6.1
([#2077](https://github.com/open-telemetry/opentelemetry-python/pull/2077))

## [1.5.0-0.24b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.5.0-0.24b0) - 2021-08-26


Expand Down
7 changes: 4 additions & 3 deletions opentelemetry-semantic-conventions/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ Installation
Code Generation
---------------

These files were generated automatically from code in opentelemetry-semantic-conventions_.
These files were generated automatically from code in semconv_.
To regenerate the code, run ``../scripts/semconv/generate.sh``.

To build against a new release or specific commit of opentelemetry-semantic-conventions_,
To build against a new release or specific commit of opentelemetry-specification_,
update the ``SPEC_VERSION`` variable in
``../scripts/semconv/generate.sh``. Then run the script and commit the changes.

.. _opentelemetry-semantic-conventions: https://github.com/open-telemetry/opentelemetry-semantic-conventions
.. _opentelemetry-specification: https://github.com/open-telemetry/opentelemetry-specification
.. _semconv: https://github.com/open-telemetry/opentelemetry-python/tree/main/scripts/semconv


References
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class ResourceAttributes:

CLOUD_REGION = "cloud.region"
"""
The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [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).
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).
"""

CLOUD_AVAILABILITY_ZONE = "cloud.availability_zone"
"""
Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
Note: Availability zones are called "zones" on Google Cloud.
Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.
"""

CLOUD_PLATFORM = "cloud.platform"
Expand Down Expand Up @@ -460,6 +460,9 @@ class ResourceAttributes:


class CloudProviderValues(Enum):
ALIBABA_CLOUD = "alibaba_cloud"
"""Alibaba Cloud."""

AWS = "aws"
"""Amazon Web Services."""

Expand All @@ -471,6 +474,12 @@ class CloudProviderValues(Enum):


class CloudPlatformValues(Enum):
ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"
"""Alibaba Cloud Elastic Compute Service."""

ALIBABA_CLOUD_FC = "alibaba_cloud_fc"
"""Alibaba Cloud Function Compute."""

AWS_EC2 = "aws_ec2"
"""AWS Elastic Compute Cloud."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# pylint: disable=too-many-lines

from enum import Enum


Expand Down Expand Up @@ -314,6 +316,36 @@ class SpanAttributes:
Local hostname or similar, see note below.
"""

NET_HOST_CONNECTION_TYPE = "net.host.connection.type"
"""
The internet connection type currently being used by the host.
"""

NET_HOST_CONNECTION_SUBTYPE = "net.host.connection.subtype"
"""
This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.
"""

NET_HOST_CARRIER_NAME = "net.host.carrier.name"
"""
The name of the mobile carrier.
"""

NET_HOST_CARRIER_MCC = "net.host.carrier.mcc"
"""
The mobile carrier country code.
"""

NET_HOST_CARRIER_MNC = "net.host.carrier.mnc"
"""
The mobile carrier network code.
"""

NET_HOST_CARRIER_ICC = "net.host.carrier.icc"
"""
The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.
"""

MESSAGING_SYSTEM = "messaging.system"
"""
A string identifying the messaging system.
Expand Down Expand Up @@ -608,7 +640,7 @@ class SpanAttributes:
MESSAGING_KAFKA_MESSAGE_KEY = "messaging.kafka.message_key"
"""
Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.
Note: If the key type is not string, its string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
"""

MESSAGING_KAFKA_CONSUMER_GROUP = "messaging.kafka.consumer_group"
Expand Down Expand Up @@ -903,6 +935,88 @@ class HttpFlavorValues(Enum):
"""QUIC protocol."""


class NetHostConnectionTypeValues(Enum):
WIFI = "wifi"
"""wifi."""

WIRED = "wired"
"""wired."""

CELL = "cell"
"""cell."""

UNAVAILABLE = "unavailable"
"""unavailable."""

UNKNOWN = "unknown"
"""unknown."""


class NetHostConnectionSubtypeValues(Enum):
GPRS = "gprs"
"""GPRS."""

EDGE = "edge"
"""EDGE."""

UMTS = "umts"
"""UMTS."""

CDMA = "cdma"
"""CDMA."""

EVDO_0 = "evdo_0"
"""EVDO Rel. 0."""

EVDO_A = "evdo_a"
"""EVDO Rev. A."""

CDMA2000_1XRTT = "cdma2000_1xrtt"
"""CDMA2000 1XRTT."""

HSDPA = "hsdpa"
"""HSDPA."""

HSUPA = "hsupa"
"""HSUPA."""

HSPA = "hspa"
"""HSPA."""

IDEN = "iden"
"""IDEN."""

EVDO_B = "evdo_b"
"""EVDO Rev. B."""

LTE = "lte"
"""LTE."""

EHRPD = "ehrpd"
"""EHRPD."""

HSPAP = "hspap"
"""HSPAP."""

GSM = "gsm"
"""GSM."""

TD_SCDMA = "td_scdma"
"""TD-SCDMA."""

IWLAN = "iwlan"
"""IWLAN."""

NR = "nr"
"""5G NR (New Radio)."""

NRNSA = "nrnsa"
"""5G NRNSA (New Radio Non-Standalone)."""

LTE_CA = "lte_ca"
"""LTE CA."""


class MessagingDestinationKindValues(Enum):
QUEUE = "queue"
"""A message sent to a queue."""
Expand All @@ -912,6 +1026,9 @@ class MessagingDestinationKindValues(Enum):


class FaasInvokedProviderValues(Enum):
ALIBABA_CLOUD = "alibaba_cloud"
"""Alibaba Cloud."""

AWS = "aws"
"""Amazon Web Services."""

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.5.0
OTEL_SEMCONV_GEN_IMG_VERSION=0.4.1
SPEC_VERSION=v1.6.1
OTEL_SEMCONV_GEN_IMG_VERSION=0.5.0

cd ${SCRIPT_DIR}

Expand Down