From 70d5ffd4a30f9d0a7ccc7006605ae8884effbcef Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 16 Feb 2024 18:49:04 -0800 Subject: [PATCH] update codegen version --- .../semconv/Client_attributes.py | 27 +- .../opentelemetry/semconv/Error_attributes.py | 17 +- .../opentelemetry/semconv/Http_attributes.py | 105 ++-- .../semconv/Network_attributes.py | 114 ++-- .../semconv/Server_attributes.py | 27 +- .../opentelemetry/semconv/Url_attributes.py | 72 +-- .../semconv/UserAgent_attributes.py | 27 - .../semconv/v1_23_1/Android_attributes.py | 30 +- .../semconv/v1_23_1/Aws_attributes.py | 555 ++++++++---------- .../semconv/v1_23_1/Browser_attributes.py | 63 +- .../semconv/v1_23_1/Cloud_attributes.py | 88 ++- .../semconv/v1_23_1/Cloudevents_attributes.py | 68 +-- .../semconv/v1_23_1/Code_attributes.py | 68 +-- .../semconv/v1_23_1/Container_attributes.py | 153 +++-- .../semconv/v1_23_1/Db_attributes.py | 392 ++++++------- .../semconv/v1_23_1/Deployment_attributes.py | 12 +- .../semconv/v1_23_1/Destination_attributes.py | 25 +- .../semconv/v1_23_1/Device_attributes.py | 63 +- .../semconv/v1_23_1/Enduser_attributes.py | 42 +- .../semconv/v1_23_1/Event_attributes.py | 30 +- .../semconv/v1_23_1/Exception_attributes.py | 49 +- .../semconv/v1_23_1/Faas_attributes.py | 224 ++++--- .../semconv/v1_23_1/FeatureFlag_attributes.py | 49 -- .../semconv/v1_23_1/Gcp_attributes.py | 55 +- .../semconv/v1_23_1/Graphql_attributes.py | 43 +- .../semconv/v1_23_1/Heroku_attributes.py | 42 +- .../semconv/v1_23_1/Host_attributes.py | 203 +++---- .../semconv/v1_23_1/Http_attributes.py | 23 +- .../semconv/v1_23_1/Ios_attributes.py | 17 +- .../semconv/v1_23_1/Jvm_attributes.py | 101 ++-- .../semconv/v1_23_1/K8s_attributes.py | 278 ++++----- .../semconv/v1_23_1/Log_attributes.py | 82 ++- .../semconv/v1_23_1/Message_attributes.py | 56 +- .../semconv/v1_23_1/Messaging_attributes.py | 395 ++++++------- .../semconv/v1_23_1/Network_attributes.py | 80 ++- .../semconv/v1_23_1/Oci_attributes.py | 16 +- .../semconv/v1_23_1/Opentracing_attributes.py | 17 +- .../semconv/v1_23_1/Os_attributes.py | 67 +-- .../semconv/v1_23_1/Otel_attributes.py | 54 +- .../semconv/v1_23_1/Other_attributes.py | 15 +- .../semconv/v1_23_1/Peer_attributes.py | 12 +- .../semconv/v1_23_1/Pool_attributes.py | 12 +- .../semconv/v1_23_1/Process_attributes.py | 146 +++-- .../semconv/v1_23_1/Rpc_attributes.py | 187 +++--- .../semconv/v1_23_1/Service_attributes.py | 61 +- .../semconv/v1_23_1/Session_attributes.py | 23 +- .../semconv/v1_23_1/Source_attributes.py | 25 +- .../semconv/v1_23_1/System_attributes.py | 197 +++---- .../semconv/v1_23_1/Telemetry_attributes.py | 71 ++- .../semconv/v1_23_1/Thread_attributes.py | 23 +- .../semconv/v1_23_1/Webengine_attributes.py | 42 +- scripts/semconv/generate.sh | 14 +- .../semconv/templates/semantic_attributes.j2 | 49 +- 53 files changed, 2116 insertions(+), 2590 deletions(-) delete mode 100644 opentelemetry-semantic-conventions/src/opentelemetry/semconv/UserAgent_attributes.py delete mode 100644 opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/FeatureFlag_attributes.py diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Client_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Client_attributes.py index 663724b7735..89ab626809b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Client_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Client_attributes.py @@ -15,22 +15,17 @@ # pylint: disable=too-many-lines -from enum import Enum -class ClientAttributes: +CLIENT_ADDRESS = "client.address" +""" +Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +Note: When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available. +""" - - CLIENT_ADDRESS = "client.address" - - """ - Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - Note: When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available. - """ - - CLIENT_PORT = "client.port" - - """ - Client port number. - Note: When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available. - """ \ No newline at end of file +CLIENT_PORT = "client.port" +""" +Client port number. +Note: When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Error_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Error_attributes.py index c04a1b45a16..d17eab0ca1c 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Error_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Error_attributes.py @@ -17,14 +17,11 @@ from enum import Enum -class ErrorAttributes: - - - ERROR_TYPE = "error.type" - - """ - Describes a class of error the operation ended with. - Note: The `error.type` SHOULD be predictable and SHOULD have low cardinality. + +ERROR_TYPE = "error.type" +""" +Describes a class of error the operation ended with. +Note: The `error.type` SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. The cardinality of `error.type` within one instrumentation library SHOULD be low. @@ -38,7 +35,9 @@ class ErrorAttributes: it's RECOMMENDED to: * Use a domain-specific attribute * Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. - """ +""" + + class ErrorTypeValues(Enum): OTHER = "_OTHER" """A fallback error value to be used when the instrumentation doesn't define a custom value.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Http_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Http_attributes.py index 54637262e2d..df046b28624 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Http_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Http_attributes.py @@ -17,24 +17,21 @@ from enum import Enum -class HttpAttributes: - - - HTTP_REQUEST_HEADER_TEMPLATE = "http.request.header" - - """ - HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. - Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. + +HTTP_REQUEST_HEADER_TEMPLATE = "http.request.header" + +""" +HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. +Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. The `User-Agent` header is already captured in the `user_agent.original` attribute. Users MAY explicitly configure instrumentations to capture them even though it is not recommended. The attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. - """ - - - HTTP_REQUEST_METHOD = "http.request.method" - - """ - HTTP request method. - Note: HTTP request method value SHOULD be "known" to the instrumentation. +""" + + +HTTP_REQUEST_METHOD = "http.request.method" +""" +HTTP request method. +Note: HTTP request method value SHOULD be "known" to the instrumentation. By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). @@ -48,48 +45,46 @@ class HttpAttributes: HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value. - """ - - - HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original" - - """ - Original HTTP method sent by the client in the request line. - """ - - - HTTP_REQUEST_RESEND_COUNT = "http.request.resend_count" - - """ - The ordinal number of request resending attempt (for any reason, including redirects). - Note: The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). - """ - - - HTTP_RESPONSE_HEADER_TEMPLATE = "http.response.header" - - """ - HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. - Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. +""" + + +HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original" +""" +Original HTTP method sent by the client in the request line. +""" + + +HTTP_REQUEST_RESEND_COUNT = "http.request.resend_count" +""" +The ordinal number of request resending attempt (for any reason, including redirects). +Note: The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). +""" + + +HTTP_RESPONSE_HEADER_TEMPLATE = "http.response.header" + +""" +HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. +Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. Users MAY explicitly configure instrumentations to capture them even though it is not recommended. The attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. - """ - - - HTTP_RESPONSE_STATUS_CODE = "http.response.status_code" - - """ - [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - """ - - - HTTP_ROUTE = "http.route" - - """ - The matched route, that is, the path template in the format used by the respective server framework. - Note: MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. +""" + + +HTTP_RESPONSE_STATUS_CODE = "http.response.status_code" +""" +[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). +""" + + +HTTP_ROUTE = "http.route" +""" +The matched route, that is, the path template in the format used by the respective server framework. +Note: MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. - """ +""" + + class HttpRequestMethodValues(Enum): CONNECT = "CONNECT" """CONNECT method.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Network_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Network_attributes.py index 5a5ce695689..154e4d8e31a 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Network_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Network_attributes.py @@ -17,71 +17,63 @@ from enum import Enum -class NetworkAttributes: - - - NETWORK_LOCAL_ADDRESS = "network.local.address" - - """ - Local address of the network connection - IP address or Unix domain socket name. - """ - - - NETWORK_LOCAL_PORT = "network.local.port" - - """ - Local port number of the network connection. - """ - - - NETWORK_PEER_ADDRESS = "network.peer.address" - - """ - Peer address of the network connection - IP address or Unix domain socket name. - """ - - - NETWORK_PEER_PORT = "network.peer.port" - - """ - Peer port number of the network connection. - """ - - - NETWORK_PROTOCOL_NAME = "network.protocol.name" - - """ - [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. - Note: The value SHOULD be normalized to lowercase. - """ - - - NETWORK_PROTOCOL_VERSION = "network.protocol.version" - - """ - Version of the protocol specified in `network.protocol.name`. - Note: `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`. - """ - - - NETWORK_TRANSPORT = "network.transport" - - """ - [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). - Note: The value SHOULD be normalized to lowercase. + +NETWORK_LOCAL_ADDRESS = "network.local.address" +""" +Local address of the network connection - IP address or Unix domain socket name. +""" + + +NETWORK_LOCAL_PORT = "network.local.port" +""" +Local port number of the network connection. +""" + + +NETWORK_PEER_ADDRESS = "network.peer.address" +""" +Peer address of the network connection - IP address or Unix domain socket name. +""" + + +NETWORK_PEER_PORT = "network.peer.port" +""" +Peer port number of the network connection. +""" + + +NETWORK_PROTOCOL_NAME = "network.protocol.name" +""" +[OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. +Note: The value SHOULD be normalized to lowercase. +""" + + +NETWORK_PROTOCOL_VERSION = "network.protocol.version" +""" +Version of the protocol specified in `network.protocol.name`. +Note: `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`. +""" + + +NETWORK_TRANSPORT = "network.transport" +""" +[OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). +Note: The value SHOULD be normalized to lowercase. Consider always setting the transport when setting a port number, since a port number is ambiguous without knowing the transport. For example different processes could be listening on TCP port 12345 and UDP port 12345. - """ - - - NETWORK_TYPE = "network.type" - - """ - [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. - Note: The value SHOULD be normalized to lowercase. - """ +""" + + +NETWORK_TYPE = "network.type" +""" +[OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. +Note: The value SHOULD be normalized to lowercase. +""" + + class NetworkTransportValues(Enum): TCP = "tcp" """TCP.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Server_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Server_attributes.py index 5c61aa232b0..6d04161183f 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Server_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Server_attributes.py @@ -15,22 +15,17 @@ # pylint: disable=too-many-lines -from enum import Enum -class ServerAttributes: +SERVER_ADDRESS = "server.address" +""" +Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +Note: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available. +""" - - SERVER_ADDRESS = "server.address" - - """ - Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - Note: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available. - """ - - SERVER_PORT = "server.port" - - """ - Server port number. - Note: When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. - """ \ No newline at end of file +SERVER_PORT = "server.port" +""" +Server port number. +Note: When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Url_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Url_attributes.py index ee982f8e149..990d6966c7d 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Url_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/Url_attributes.py @@ -15,45 +15,37 @@ # pylint: disable=too-many-lines -from enum import Enum - -class UrlAttributes: - - - URL_FRAGMENT = "url.fragment" - - """ - The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component. - """ - - - URL_FULL = "url.full" - - """ - Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986). - Note: For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. + +URL_FRAGMENT = "url.fragment" +""" +The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component. +""" + + +URL_FULL = "url.full" +""" +Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986). +Note: For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. `url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`. `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes. - """ - - - URL_PATH = "url.path" - - """ - The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component. - """ - - - URL_QUERY = "url.query" - - """ - The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component. - Note: Sensitive content provided in query string SHOULD be scrubbed when instrumentations can identify it. - """ - - - URL_SCHEME = "url.scheme" - - """ - The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. - """ \ No newline at end of file +""" + + +URL_PATH = "url.path" +""" +The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component. +""" + + +URL_QUERY = "url.query" +""" +The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component. +Note: Sensitive content provided in query string SHOULD be scrubbed when instrumentations can identify it. +""" + + +URL_SCHEME = "url.scheme" +""" +The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/UserAgent_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/UserAgent_attributes.py deleted file mode 100644 index 2b9f339932c..00000000000 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/UserAgent_attributes.py +++ /dev/null @@ -1,27 +0,0 @@ - -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# pylint: disable=too-many-lines - -from enum import Enum - -class UserAgentAttributes: - - - USER_AGENT_ORIGINAL = "user_agent.original" - - """ - Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. - """ \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Android_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Android_attributes.py index ca02744bc06..22e538ffbd0 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Android_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Android_attributes.py @@ -17,22 +17,20 @@ from enum import Enum -class AndroidAttributes: - - - ANDROID_OS_API_LEVEL = "android.os.api_level" - - """ - Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). - """ - - - ANDROID_STATE = "android.state" - - """ - This attribute represents the state the application has transitioned into at the occurrence of the event. - Note: The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. - """ + +ANDROID_OS_API_LEVEL = "android.os.api_level" +""" +Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). +""" + + +ANDROID_STATE = "android.state" +""" +This attribute represents the state the application has transitioned into at the occurrence of the event. +Note: The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. +""" + + class AndroidStateValues(Enum): CREATED = "created" """Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Aws_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Aws_attributes.py index d49edd8933f..67eecf97bb9 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Aws_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Aws_attributes.py @@ -17,295 +17,254 @@ from enum import Enum -class AwsAttributes: - - - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions" - - """ - The JSON-serialized value of each item in the `AttributeDefinitions` request field. - """ - - - AWS_DYNAMODB_ATTRIBUTES_TO_GET = "aws.dynamodb.attributes_to_get" - - """ - The value of the `AttributesToGet` request parameter. - """ - - - AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read" - - """ - The value of the `ConsistentRead` request parameter. - """ - - - AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity" - - """ - The JSON-serialized value of each item in the `ConsumedCapacity` response field. - """ - - - AWS_DYNAMODB_COUNT = "aws.dynamodb.count" - - """ - The value of the `Count` response parameter. - """ - - - AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table" - - """ - The value of the `ExclusiveStartTableName` request parameter. - """ - - - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = "aws.dynamodb.global_secondary_index_updates" - - """ - The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - """ - - - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes" - - """ - The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - """ - - - AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name" - - """ - The value of the `IndexName` request parameter. - """ - - - AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics" - - """ - The JSON-serialized value of the `ItemCollectionMetrics` response field. - """ - - - AWS_DYNAMODB_LIMIT = "aws.dynamodb.limit" - - """ - The value of the `Limit` request parameter. - """ - - - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes" - - """ - The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - """ - - - AWS_DYNAMODB_PROJECTION = "aws.dynamodb.projection" - - """ - The value of the `ProjectionExpression` request parameter. - """ - - - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = "aws.dynamodb.provisioned_read_capacity" - - """ - The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - """ - - - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = "aws.dynamodb.provisioned_write_capacity" - - """ - The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - """ - - - AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward" - - """ - The value of the `ScanIndexForward` request parameter. - """ - - - AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count" - - """ - The value of the `ScannedCount` response parameter. - """ - - - AWS_DYNAMODB_SEGMENT = "aws.dynamodb.segment" - - """ - The value of the `Segment` request parameter. - """ - - - AWS_DYNAMODB_SELECT = "aws.dynamodb.select" - - """ - The value of the `Select` request parameter. - """ - - - AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count" - - """ - The the number of items in the `TableNames` response parameter. - """ - - - AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names" - - """ - The keys in the `RequestItems` object field. - """ - - - AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments" - - """ - The value of the `TotalSegments` request parameter. - """ - - - AWS_ECS_CLUSTER_ARN = "aws.ecs.cluster.arn" - - """ - The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - """ - - - AWS_ECS_CONTAINER_ARN = "aws.ecs.container.arn" - - """ - The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - """ - - - AWS_ECS_LAUNCHTYPE = "aws.ecs.launchtype" - - """ - The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - """ - - - AWS_ECS_TASK_ARN = "aws.ecs.task.arn" - - """ - The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - """ - - - AWS_ECS_TASK_FAMILY = "aws.ecs.task.family" - - """ - The task definition family this task definition is a member of. - """ - - - AWS_ECS_TASK_REVISION = "aws.ecs.task.revision" - - """ - The revision for this task definition. - """ - - - AWS_EKS_CLUSTER_ARN = "aws.eks.cluster.arn" - - """ - The ARN of an EKS cluster. - """ - - - AWS_LAMBDA_INVOKED_ARN = "aws.lambda.invoked_arn" - - """ - The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - Note: This may be different from `cloud.resource_id` if an alias is involved. - """ - - - AWS_LOG_GROUP_ARNS = "aws.log.group.arns" - - """ - The Amazon Resource Name(s) (ARN) of the AWS log group(s). - Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - """ - - - AWS_LOG_GROUP_NAMES = "aws.log.group.names" - - """ - The name(s) of the AWS log group(s) an application is writing to. - Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - """ - - - AWS_LOG_STREAM_ARNS = "aws.log.stream.arns" - - """ - The ARN(s) of the AWS log stream(s). - Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - """ - - - AWS_LOG_STREAM_NAMES = "aws.log.stream.names" - - """ - The name(s) of the AWS log stream(s) an application is writing to. - """ - - - AWS_REQUEST_ID = "aws.request_id" - - """ - The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. - """ - - - AWS_S3_BUCKET = "aws.s3.bucket" - - """ - The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. - Note: The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter. + +AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions" +""" +The JSON-serialized value of each item in the `AttributeDefinitions` request field. +""" + + +AWS_DYNAMODB_ATTRIBUTES_TO_GET = "aws.dynamodb.attributes_to_get" +""" +The value of the `AttributesToGet` request parameter. +""" + + +AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read" +""" +The value of the `ConsistentRead` request parameter. +""" + + +AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity" +""" +The JSON-serialized value of each item in the `ConsumedCapacity` response field. +""" + + +AWS_DYNAMODB_COUNT = "aws.dynamodb.count" +""" +The value of the `Count` response parameter. +""" + + +AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table" +""" +The value of the `ExclusiveStartTableName` request parameter. +""" + + +AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = "aws.dynamodb.global_secondary_index_updates" +""" +The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. +""" + + +AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes" +""" +The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. +""" + + +AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name" +""" +The value of the `IndexName` request parameter. +""" + + +AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics" +""" +The JSON-serialized value of the `ItemCollectionMetrics` response field. +""" + + +AWS_DYNAMODB_LIMIT = "aws.dynamodb.limit" +""" +The value of the `Limit` request parameter. +""" + + +AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes" +""" +The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. +""" + + +AWS_DYNAMODB_PROJECTION = "aws.dynamodb.projection" +""" +The value of the `ProjectionExpression` request parameter. +""" + + +AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = "aws.dynamodb.provisioned_read_capacity" +""" +The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. +""" + + +AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = "aws.dynamodb.provisioned_write_capacity" +""" +The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. +""" + + +AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward" +""" +The value of the `ScanIndexForward` request parameter. +""" + + +AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count" +""" +The value of the `ScannedCount` response parameter. +""" + + +AWS_DYNAMODB_SEGMENT = "aws.dynamodb.segment" +""" +The value of the `Segment` request parameter. +""" + + +AWS_DYNAMODB_SELECT = "aws.dynamodb.select" +""" +The value of the `Select` request parameter. +""" + + +AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count" +""" +The the number of items in the `TableNames` response parameter. +""" + + +AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names" +""" +The keys in the `RequestItems` object field. +""" + + +AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments" +""" +The value of the `TotalSegments` request parameter. +""" + + +AWS_ECS_CLUSTER_ARN = "aws.ecs.cluster.arn" +""" +The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +""" + + +AWS_ECS_CONTAINER_ARN = "aws.ecs.container.arn" +""" +The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +""" + + +AWS_ECS_LAUNCHTYPE = "aws.ecs.launchtype" +""" +The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. +""" + + +AWS_ECS_TASK_ARN = "aws.ecs.task.arn" +""" +The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). +""" + + +AWS_ECS_TASK_FAMILY = "aws.ecs.task.family" +""" +The task definition family this task definition is a member of. +""" + + +AWS_ECS_TASK_REVISION = "aws.ecs.task.revision" +""" +The revision for this task definition. +""" + + +AWS_EKS_CLUSTER_ARN = "aws.eks.cluster.arn" +""" +The ARN of an EKS cluster. +""" + + +AWS_LAMBDA_INVOKED_ARN = "aws.lambda.invoked_arn" +""" +The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). +Note: This may be different from `cloud.resource_id` if an alias is involved. +""" + + +AWS_LOG_GROUP_ARNS = "aws.log.group.arns" +""" +The Amazon Resource Name(s) (ARN) of the AWS log group(s). +Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). +""" + + +AWS_LOG_GROUP_NAMES = "aws.log.group.names" +""" +The name(s) of the AWS log group(s) an application is writing to. +Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. +""" + + +AWS_LOG_STREAM_ARNS = "aws.log.stream.arns" +""" +The ARN(s) of the AWS log stream(s). +Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. +""" + + +AWS_LOG_STREAM_NAMES = "aws.log.stream.names" +""" +The name(s) of the AWS log stream(s) an application is writing to. +""" + + +AWS_REQUEST_ID = "aws.request_id" +""" +The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +""" + + +AWS_S3_BUCKET = "aws.s3.bucket" +""" +The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. +Note: The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter. This applies to almost all S3 operations except `list-buckets`. - """ - - - AWS_S3_COPY_SOURCE = "aws.s3.copy_source" - - """ - The source object (in the form `bucket`/`key`) for the copy operation. - Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter +""" + + +AWS_S3_COPY_SOURCE = "aws.s3.copy_source" +""" +The source object (in the form `bucket`/`key`) for the copy operation. +Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). This applies in particular to the following operations: - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html). - """ - - - AWS_S3_DELETE = "aws.s3.delete" - - """ - The delete request container that specifies the objects to be deleted. - Note: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation. +""" + + +AWS_S3_DELETE = "aws.s3.delete" +""" +The delete request container that specifies the objects to be deleted. +Note: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation. The `delete` attribute corresponds to the `--delete` parameter of the [delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). - """ - - - AWS_S3_KEY = "aws.s3.key" - - """ - The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. - Note: The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter. +""" + + +AWS_S3_KEY = "aws.s3.key" +""" +The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. +Note: The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter. This applies in particular to the following operations: - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) @@ -321,25 +280,23 @@ class AwsAttributes: - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html). - """ - - - AWS_S3_PART_NUMBER = "aws.s3.part_number" - - """ - The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. - Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) +""" + + +AWS_S3_PART_NUMBER = "aws.s3.part_number" +""" +The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. +Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations. The `part_number` attribute corresponds to the `--part-number` parameter of the [upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). - """ - - - AWS_S3_UPLOAD_ID = "aws.s3.upload_id" - - """ - Upload ID that identifies the multipart upload. - Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter +""" + + +AWS_S3_UPLOAD_ID = "aws.s3.upload_id" +""" +Upload ID that identifies the multipart upload. +Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations. This applies in particular to the following operations: @@ -348,7 +305,9 @@ class AwsAttributes: - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html). - """ +""" + + class AwsEcsLaunchtypeValues(Enum): EC2 = "ec2" """ec2.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Browser_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Browser_attributes.py index 17633dd043b..fb7d0bf49f3 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Browser_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Browser_attributes.py @@ -15,39 +15,32 @@ # pylint: disable=too-many-lines -from enum import Enum - -class BrowserAttributes: - - - BROWSER_BRANDS = "browser.brands" - - """ - Array of brand name and version separated by a space. - Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`). - """ - - - BROWSER_LANGUAGE = "browser.language" - - """ - Preferred language of the user using the browser. - Note: This value is intended to be taken from the Navigator API `navigator.language`. - """ - - - BROWSER_MOBILE = "browser.mobile" - - """ - A boolean that is true if the browser is running on a mobile device. - Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset. - """ - - - BROWSER_PLATFORM = "browser.platform" - - """ - The platform on which the browser is running. - Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent. + +BROWSER_BRANDS = "browser.brands" +""" +Array of brand name and version separated by a space. +Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`). +""" + + +BROWSER_LANGUAGE = "browser.language" +""" +Preferred language of the user using the browser. +Note: This value is intended to be taken from the Navigator API `navigator.language`. +""" + + +BROWSER_MOBILE = "browser.mobile" +""" +A boolean that is true if the browser is running on a mobile device. +Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset. +""" + + +BROWSER_PLATFORM = "browser.platform" +""" +The platform on which the browser is running. +Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent. The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides. - """ \ No newline at end of file +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloud_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloud_attributes.py index b2001c6e86a..fdc68929ae6 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloud_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloud_attributes.py @@ -17,52 +17,44 @@ from enum import Enum -class CloudAttributes: - - - CLOUD_ACCOUNT_ID = "cloud.account.id" - - """ - The cloud account ID the resource is assigned to. - """ - - - 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 Alibaba Cloud and Google Cloud. - """ - - - CLOUD_PLATFORM = "cloud.platform" - - """ - The cloud platform in use. - Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - """ - - - CLOUD_PROVIDER = "cloud.provider" - - """ - Name of the cloud provider. - """ - - - CLOUD_REGION = "cloud.region" - - """ - The geographical region the resource is running. - 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/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). - """ - - - CLOUD_RESOURCE_ID = "cloud.resource_id" - - """ - Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP). - Note: On some cloud providers, it may not be possible to determine the full ID at startup, + +CLOUD_ACCOUNT_ID = "cloud.account.id" +""" +The cloud account ID the resource is assigned to. +""" + + +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 Alibaba Cloud and Google Cloud. +""" + + +CLOUD_PLATFORM = "cloud.platform" +""" +The cloud platform in use. +Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. +""" + + +CLOUD_PROVIDER = "cloud.provider" +""" +Name of the cloud provider. +""" + + +CLOUD_REGION = "cloud.region" +""" +The geographical region the resource is running. +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/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). +""" + + +CLOUD_RESOURCE_ID = "cloud.resource_id" +""" +Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP). +Note: On some cloud providers, it may not be possible to determine the full ID at startup, so it may be necessary to set `cloud.resource_id` as a span attribute instead. The exact value to use for `cloud.resource_id` depends on the cloud provider. @@ -79,7 +71,9 @@ class CloudAttributes: `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share a TracerProvider. - """ +""" + + class CloudPlatformValues(Enum): ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs" """Alibaba Cloud Elastic Compute Service.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloudevents_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloudevents_attributes.py index bde274e0d29..006696a3cad 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloudevents_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Cloudevents_attributes.py @@ -15,41 +15,33 @@ # pylint: disable=too-many-lines -from enum import Enum - -class CloudeventsAttributes: - - - 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_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). - """ - - - 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. - """ \ No newline at end of file + +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_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). +""" + + +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. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Code_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Code_attributes.py index b4073c95462..45641af17f3 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Code_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Code_attributes.py @@ -15,41 +15,33 @@ # pylint: disable=too-many-lines -from enum import Enum - -class CodeAttributes: - - - CODE_COLUMN = "code.column" - - """ - The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - """ - - - CODE_FILEPATH = "code.filepath" - - """ - The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - """ - - - CODE_FUNCTION = "code.function" - - """ - The method or function name, or equivalent (usually rightmost part of the code unit's name). - """ - - - CODE_LINENO = "code.lineno" - - """ - The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - """ - - - CODE_NAMESPACE = "code.namespace" - - """ - The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - """ \ No newline at end of file + +CODE_COLUMN = "code.column" +""" +The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. +""" + + +CODE_FILEPATH = "code.filepath" +""" +The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). +""" + + +CODE_FUNCTION = "code.function" +""" +The method or function name, or equivalent (usually rightmost part of the code unit's name). +""" + + +CODE_LINENO = "code.lineno" +""" +The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. +""" + + +CODE_NAMESPACE = "code.namespace" +""" +The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Container_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Container_attributes.py index 8026a2b7215..e8df3771fe1 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Container_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Container_attributes.py @@ -15,88 +15,75 @@ # pylint: disable=too-many-lines -from enum import Enum - -class ContainerAttributes: - - - CONTAINER_COMMAND = "container.command" - - """ - The command used to run the container (i.e. the command name). - Note: If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. - """ - - - CONTAINER_COMMAND_ARGS = "container.command_args" - - """ - All the command arguments (including the command/executable itself) run by the container. [2]. - """ - - - CONTAINER_COMMAND_LINE = "container.command_line" - - """ - The full command run by the container as a single string representing the full command. [2]. - """ - - - CONTAINER_ID = "container.id" - - """ - Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - """ - - - CONTAINER_IMAGE_ID = "container.image.id" - - """ - Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - Note: Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. + +CONTAINER_COMMAND = "container.command" +""" +The command used to run the container (i.e. the command name). +Note: If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. +""" + + +CONTAINER_COMMAND_ARGS = "container.command_args" +""" +All the command arguments (including the command/executable itself) run by the container. [2]. +""" + + +CONTAINER_COMMAND_LINE = "container.command_line" +""" +The full command run by the container as a single string representing the full command. [2]. +""" + + +CONTAINER_ID = "container.id" +""" +Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. +""" + + +CONTAINER_IMAGE_ID = "container.image.id" +""" +Runtime specific image identifier. Usually a hash algorithm followed by a UUID. +Note: Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. The ID is assinged by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. - """ - - - CONTAINER_IMAGE_NAME = "container.image.name" - - """ - Name of the image the container was built on. - """ - - - CONTAINER_IMAGE_REPO_DIGESTS = "container.image.repo_digests" - - """ - Repo digests of the container image as provided by the container runtime. - Note: [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. - """ - - - CONTAINER_IMAGE_TAGS = "container.image.tags" - - """ - Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. - """ - - - CONTAINER_LABELS_TEMPLATE = "container.labels" - - """ - Container labels, `` being the label name, the value being the label value. - """ - - - CONTAINER_NAME = "container.name" - - """ - Container name used by container runtime. - """ - - - CONTAINER_RUNTIME = "container.runtime" - - """ - The container runtime managing this container. - """ \ No newline at end of file +""" + + +CONTAINER_IMAGE_NAME = "container.image.name" +""" +Name of the image the container was built on. +""" + + +CONTAINER_IMAGE_REPO_DIGESTS = "container.image.repo_digests" +""" +Repo digests of the container image as provided by the container runtime. +Note: [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. +""" + + +CONTAINER_IMAGE_TAGS = "container.image.tags" +""" +Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. +""" + + +CONTAINER_LABELS_TEMPLATE = "container.labels" + +""" +Container labels, `` being the label name, the value being the label value. +""" + + +CONTAINER_NAME = "container.name" +""" +Container name used by container runtime. +""" + + +CONTAINER_RUNTIME = "container.runtime" +""" +The container runtime managing this container. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Db_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Db_attributes.py index f06c7c1053c..d4c09eeee55 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Db_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Db_attributes.py @@ -17,216 +17,188 @@ from enum import Enum -class DbAttributes: - - - DB_CASSANDRA_CONSISTENCY_LEVEL = "db.cassandra.consistency_level" - - """ - The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - """ - - - DB_CASSANDRA_COORDINATOR_DC = "db.cassandra.coordinator.dc" - - """ - The data center of the coordinating node for a query. - """ - - - DB_CASSANDRA_COORDINATOR_ID = "db.cassandra.coordinator.id" - - """ - The ID of the coordinating node for a query. - """ - - - DB_CASSANDRA_IDEMPOTENCE = "db.cassandra.idempotence" - - """ - Whether or not the query is idempotent. - """ - - - DB_CASSANDRA_PAGE_SIZE = "db.cassandra.page_size" - - """ - The fetch size used for paging, i.e. how many rows will be returned at once. - """ - - - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = "db.cassandra.speculative_execution_count" - - """ - The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - """ - - - DB_CASSANDRA_TABLE = "db.cassandra.table" - - """ - The name of the primary table that the operation is acting upon, including the keyspace name (if applicable). - 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. - """ - - - DB_CONNECTION_STRING = "db.connection_string" - - """ - The connection string used to connect to the database. It is recommended to remove embedded credentials. - """ - - - DB_COSMOSDB_CLIENT_ID = "db.cosmosdb.client_id" - - """ - Unique Cosmos client instance id. - """ - - - DB_COSMOSDB_CONNECTION_MODE = "db.cosmosdb.connection_mode" - - """ - Cosmos client connection mode. - """ - - - DB_COSMOSDB_CONTAINER = "db.cosmosdb.container" - - """ - Cosmos DB container name. - """ - - - DB_COSMOSDB_OPERATION_TYPE = "db.cosmosdb.operation_type" - - """ - CosmosDB Operation Type. - """ - - - DB_COSMOSDB_REQUEST_CHARGE = "db.cosmosdb.request_charge" - - """ - RU consumed for that operation. - """ - - - DB_COSMOSDB_REQUEST_CONTENT_LENGTH = "db.cosmosdb.request_content_length" - - """ - Request payload size in bytes. - """ - - - DB_COSMOSDB_STATUS_CODE = "db.cosmosdb.status_code" - - """ - Cosmos DB status code. - """ - - - DB_COSMOSDB_SUB_STATUS_CODE = "db.cosmosdb.sub_status_code" - - """ - Cosmos DB sub status code. - """ - - - DB_ELASTICSEARCH_CLUSTER_NAME = "db.elasticsearch.cluster.name" - - """ - Represents the identifier of an Elasticsearch cluster. - """ - - - DB_ELASTICSEARCH_NODE_NAME = "db.elasticsearch.node.name" - - """ - Represents the human-readable identifier of the node/instance to which a request was routed. - """ - - - DB_ELASTICSEARCH_PATH_PARTS_TEMPLATE = "db.elasticsearch.path_parts" - - """ - A dynamic value in the url path. - Note: Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. - """ - - - DB_JDBC_DRIVER_CLASSNAME = "db.jdbc.driver_classname" - - """ - The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - """ - - - DB_MONGODB_COLLECTION = "db.mongodb.collection" - - """ - The collection being accessed within the database stated in `db.name`. - """ - - - DB_MSSQL_INSTANCE_NAME = "db.mssql.instance_name" - - """ - The Microsoft SQL Server [instance name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - Note: If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard). - """ - - - DB_NAME = "db.name" - - """ - 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). - 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). - """ - - - DB_OPERATION = "db.operation" - - """ - The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - """ - - - DB_REDIS_DATABASE_INDEX = "db.redis.database_index" - - """ - 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. - """ - - - DB_SQL_TABLE = "db.sql.table" - - """ - The name of the primary table that the operation is acting upon, including the database name (if applicable). - 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. - """ - - - DB_STATEMENT = "db.statement" - - """ - The database statement being executed. - """ - - - DB_SYSTEM = "db.system" - - """ - An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - """ - - - DB_USER = "db.user" - - """ - Username for accessing the database. - """ + +DB_CASSANDRA_CONSISTENCY_LEVEL = "db.cassandra.consistency_level" +""" +The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). +""" + + +DB_CASSANDRA_COORDINATOR_DC = "db.cassandra.coordinator.dc" +""" +The data center of the coordinating node for a query. +""" + + +DB_CASSANDRA_COORDINATOR_ID = "db.cassandra.coordinator.id" +""" +The ID of the coordinating node for a query. +""" + + +DB_CASSANDRA_IDEMPOTENCE = "db.cassandra.idempotence" +""" +Whether or not the query is idempotent. +""" + + +DB_CASSANDRA_PAGE_SIZE = "db.cassandra.page_size" +""" +The fetch size used for paging, i.e. how many rows will be returned at once. +""" + + +DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = "db.cassandra.speculative_execution_count" +""" +The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. +""" + + +DB_CASSANDRA_TABLE = "db.cassandra.table" +""" +The name of the primary table that the operation is acting upon, including the keyspace name (if applicable). +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. +""" + + +DB_CONNECTION_STRING = "db.connection_string" +""" +The connection string used to connect to the database. It is recommended to remove embedded credentials. +""" + + +DB_COSMOSDB_CLIENT_ID = "db.cosmosdb.client_id" +""" +Unique Cosmos client instance id. +""" + + +DB_COSMOSDB_CONNECTION_MODE = "db.cosmosdb.connection_mode" +""" +Cosmos client connection mode. +""" + + +DB_COSMOSDB_CONTAINER = "db.cosmosdb.container" +""" +Cosmos DB container name. +""" + + +DB_COSMOSDB_OPERATION_TYPE = "db.cosmosdb.operation_type" +""" +CosmosDB Operation Type. +""" + + +DB_COSMOSDB_REQUEST_CHARGE = "db.cosmosdb.request_charge" +""" +RU consumed for that operation. +""" + + +DB_COSMOSDB_REQUEST_CONTENT_LENGTH = "db.cosmosdb.request_content_length" +""" +Request payload size in bytes. +""" + + +DB_COSMOSDB_STATUS_CODE = "db.cosmosdb.status_code" +""" +Cosmos DB status code. +""" + + +DB_COSMOSDB_SUB_STATUS_CODE = "db.cosmosdb.sub_status_code" +""" +Cosmos DB sub status code. +""" + + +DB_ELASTICSEARCH_CLUSTER_NAME = "db.elasticsearch.cluster.name" +""" +Represents the identifier of an Elasticsearch cluster. +""" + + +DB_ELASTICSEARCH_NODE_NAME = "db.elasticsearch.node.name" +""" +Represents the human-readable identifier of the node/instance to which a request was routed. +""" + + +DB_ELASTICSEARCH_PATH_PARTS_TEMPLATE = "db.elasticsearch.path_parts" + +""" +A dynamic value in the url path. +Note: Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. +""" + + +DB_JDBC_DRIVER_CLASSNAME = "db.jdbc.driver_classname" +""" +The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. +""" + + +DB_MONGODB_COLLECTION = "db.mongodb.collection" +""" +The collection being accessed within the database stated in `db.name`. +""" + + +DB_MSSQL_INSTANCE_NAME = "db.mssql.instance_name" +""" +The Microsoft SQL Server [instance name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. +Note: If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard). +""" + + +DB_NAME = "db.name" +""" +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). +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). +""" + + +DB_OPERATION = "db.operation" +""" +The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. +Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. +""" + + +DB_REDIS_DATABASE_INDEX = "db.redis.database_index" +""" +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. +""" + + +DB_SQL_TABLE = "db.sql.table" +""" +The name of the primary table that the operation is acting upon, including the database name (if applicable). +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. +""" + + +DB_STATEMENT = "db.statement" +""" +The database statement being executed. +""" + + +DB_SYSTEM = "db.system" +""" +An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. +""" + + +DB_USER = "db.user" +""" +Username for accessing the database. +""" + + class DbCassandraConsistencyLevelValues(Enum): ALL = "all" """all.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Deployment_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Deployment_attributes.py index 72ab6db0132..2449e70bc6f 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Deployment_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Deployment_attributes.py @@ -15,13 +15,9 @@ # pylint: disable=too-many-lines -from enum import Enum -class DeploymentAttributes: +DEPLOYMENT_ENVIRONMENT = "deployment.environment" +""" +Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). +""" - - DEPLOYMENT_ENVIRONMENT = "deployment.environment" - - """ - Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - """ \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Destination_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Destination_attributes.py index d73c3ac344d..498892f957f 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Destination_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Destination_attributes.py @@ -15,21 +15,16 @@ # pylint: disable=too-many-lines -from enum import Enum -class DestinationAttributes: +DESTINATION_ADDRESS = "destination.address" +""" +Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +Note: When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available. +""" - - DESTINATION_ADDRESS = "destination.address" - - """ - Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - Note: When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available. - """ - - DESTINATION_PORT = "destination.port" - - """ - Destination port number. - """ \ No newline at end of file +DESTINATION_PORT = "destination.port" +""" +Destination port number. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Device_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Device_attributes.py index 954be982249..4087e2424b1 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Device_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Device_attributes.py @@ -15,38 +15,31 @@ # pylint: disable=too-many-lines -from enum import Enum - -class DeviceAttributes: - - - DEVICE_ID = "device.id" - - """ - A unique identifier representing the device. - Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - """ - - - 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`. - """ - - - DEVICE_MODEL_IDENTIFIER = "device.model.identifier" - - """ - The model identifier for the device. - Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - """ - - - DEVICE_MODEL_NAME = "device.model.name" - - """ - The marketing name for the device model. - Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - """ \ No newline at end of file + +DEVICE_ID = "device.id" +""" +A unique identifier representing the device. +Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. +""" + + +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`. +""" + + +DEVICE_MODEL_IDENTIFIER = "device.model.identifier" +""" +The model identifier for the device. +Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. +""" + + +DEVICE_MODEL_NAME = "device.model.name" +""" +The marketing name for the device model. +Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Enduser_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Enduser_attributes.py index 9726e0cdeb6..01f0f065fe6 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Enduser_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Enduser_attributes.py @@ -15,27 +15,21 @@ # pylint: disable=too-many-lines -from enum import Enum - -class EnduserAttributes: - - - ENDUSER_ID = "enduser.id" - - """ - Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - """ - - - ENDUSER_ROLE = "enduser.role" - - """ - Actual/assumed role the client is making the request under extracted from token or application security context. - """ - - - ENDUSER_SCOPE = "enduser.scope" - - """ - Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - """ \ No newline at end of file + +ENDUSER_ID = "enduser.id" +""" +Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. +""" + + +ENDUSER_ROLE = "enduser.role" +""" +Actual/assumed role the client is making the request under extracted from token or application security context. +""" + + +ENDUSER_SCOPE = "enduser.scope" +""" +Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Event_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Event_attributes.py index 3921c39590d..14f504331dc 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Event_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Event_attributes.py @@ -17,22 +17,20 @@ from enum import Enum -class EventAttributes: - - - EVENT_DOMAIN = "event.domain" - - """ - The domain identifies the business context for the events. - Note: Events across different domains may have same `event.name`, yet be unrelated events. - """ - - - EVENT_NAME = "event.name" - - """ - The name identifies the event. - """ + +EVENT_DOMAIN = "event.domain" +""" +The domain identifies the business context for the events. +Note: Events across different domains may have same `event.name`, yet be unrelated events. +""" + + +EVENT_NAME = "event.name" +""" +The name identifies the event. +""" + + class EventDomainValues(Enum): BROWSER = "browser" """Events from browser apps.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Exception_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Exception_attributes.py index d46de5fa5d4..eb7a72d593b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Exception_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Exception_attributes.py @@ -15,16 +15,11 @@ # pylint: disable=too-many-lines -from enum import Enum -class ExceptionAttributes: - - - EXCEPTION_ESCAPED = "exception.escaped" - - """ - SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - Note: An exception is considered to have escaped (or left) the scope of a span, +EXCEPTION_ESCAPED = "exception.escaped" +""" +SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. +Note: An exception is considered to have escaped (or left) the scope of a span, if that span is ended while the exception is still logically "in flight". This may be actually "in flight" in some languages (e.g. if the exception is passed to a Context manager's `__exit__` method in Python) but will @@ -40,25 +35,23 @@ class ExceptionAttributes: even if the `exception.escaped` attribute was not set or set to false, since the event might have been recorded at a time where it was not clear whether the exception will escape. - """ +""" + + +EXCEPTION_MESSAGE = "exception.message" +""" +The exception message. +""" + + +EXCEPTION_STACKTRACE = "exception.stacktrace" +""" +A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. +""" - - EXCEPTION_MESSAGE = "exception.message" - - """ - The exception message. - """ - - EXCEPTION_STACKTRACE = "exception.stacktrace" - - """ - A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - """ +EXCEPTION_TYPE = "exception.type" +""" +The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. +""" - - EXCEPTION_TYPE = "exception.type" - - """ - The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - """ \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Faas_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Faas_attributes.py index 4d0ef41c1a6..30fcd22a82b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Faas_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Faas_attributes.py @@ -17,103 +17,88 @@ from enum import Enum -class FaasAttributes: - - - FAAS_COLDSTART = "faas.coldstart" - - """ - A boolean that is true if the serverless function is executed for the first time (aka cold-start). - """ - - - FAAS_CRON = "faas.cron" - - """ - A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - """ - - - FAAS_DOCUMENT_COLLECTION = "faas.document.collection" - - """ - The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - """ - - - FAAS_DOCUMENT_NAME = "faas.document.name" - - """ - The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - """ - - - FAAS_DOCUMENT_OPERATION = "faas.document.operation" - - """ - Describes the type of the operation that was performed on the data. - """ - - - FAAS_DOCUMENT_TIME = "faas.document.time" - - """ - A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - """ - - - FAAS_INSTANCE = "faas.instance" - - """ - The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - Note: * **AWS Lambda:** Use the (full) log stream name. - """ - - - FAAS_INVOCATION_ID = "faas.invocation_id" - - """ - The invocation ID of the current function invocation. - """ - - - FAAS_INVOKED_NAME = "faas.invoked_name" - - """ - The name of the invoked function. - Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - """ - - - FAAS_INVOKED_PROVIDER = "faas.invoked_provider" - - """ - The cloud provider of the invoked function. - Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - """ - - - FAAS_INVOKED_REGION = "faas.invoked_region" - - """ - The cloud region of the invoked function. - Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - """ - - - FAAS_MAX_MEMORY = "faas.max_memory" - - """ - The amount of memory available to the serverless function converted to Bytes. - Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576). - """ - - - FAAS_NAME = "faas.name" - - """ - The name of the single function that this runtime instance executes. - Note: This is the name of the function as configured/deployed on the FaaS + +FAAS_COLDSTART = "faas.coldstart" +""" +A boolean that is true if the serverless function is executed for the first time (aka cold-start). +""" + + +FAAS_CRON = "faas.cron" +""" +A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +""" + + +FAAS_DOCUMENT_COLLECTION = "faas.document.collection" +""" +The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. +""" + + +FAAS_DOCUMENT_NAME = "faas.document.name" +""" +The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. +""" + + +FAAS_DOCUMENT_OPERATION = "faas.document.operation" +""" +Describes the type of the operation that was performed on the data. +""" + + +FAAS_DOCUMENT_TIME = "faas.document.time" +""" +A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +""" + + +FAAS_INSTANCE = "faas.instance" +""" +The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. +Note: * **AWS Lambda:** Use the (full) log stream name. +""" + + +FAAS_INVOCATION_ID = "faas.invocation_id" +""" +The invocation ID of the current function invocation. +""" + + +FAAS_INVOKED_NAME = "faas.invoked_name" +""" +The name of the invoked function. +Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. +""" + + +FAAS_INVOKED_PROVIDER = "faas.invoked_provider" +""" +The cloud provider of the invoked function. +Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. +""" + + +FAAS_INVOKED_REGION = "faas.invoked_region" +""" +The cloud region of the invoked function. +Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. +""" + + +FAAS_MAX_MEMORY = "faas.max_memory" +""" +The amount of memory available to the serverless function converted to Bytes. +Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576). +""" + + +FAAS_NAME = "faas.name" +""" +The name of the single function that this runtime instance executes. +Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) @@ -129,28 +114,25 @@ class FaasAttributes: This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share a TracerProvider (see also the `cloud.resource_id` attribute). - """ - - - FAAS_TIME = "faas.time" - - """ - A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - """ - - - FAAS_TRIGGER = "faas.trigger" - - """ - Type of the trigger which caused this function invocation. - """ - - - FAAS_VERSION = "faas.version" - - """ - The immutable version of the function being executed. - Note: Depending on the cloud provider and platform, use: +""" + + +FAAS_TIME = "faas.time" +""" +A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +""" + + +FAAS_TRIGGER = "faas.trigger" +""" +Type of the trigger which caused this function invocation. +""" + + +FAAS_VERSION = "faas.version" +""" +The immutable version of the function being executed. +Note: Depending on the cloud provider and platform, use: * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) (an integer represented as a decimal string). @@ -159,7 +141,9 @@ class FaasAttributes: * **Google Cloud Functions:** The value of the [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). * **Azure Functions:** Not applicable. Do not set this attribute. - """ +""" + + class FaasDocumentOperationValues(Enum): INSERT = "insert" """When a new object is created.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/FeatureFlag_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/FeatureFlag_attributes.py deleted file mode 100644 index b5b952afad9..00000000000 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/FeatureFlag_attributes.py +++ /dev/null @@ -1,49 +0,0 @@ - -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# pylint: disable=too-many-lines - -from enum import Enum - -class FeatureFlagAttributes: - - - FEATURE_FLAG_KEY = "feature_flag.key" - - """ - The unique identifier of the feature flag. - """ - - - FEATURE_FLAG_PROVIDER_NAME = "feature_flag.provider_name" - - """ - The name of the service provider that performs the flag evaluation. - """ - - - FEATURE_FLAG_VARIANT = "feature_flag.variant" - - """ - SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. - Note: A semantic identifier, commonly referred to as a variant, provides a means - for referring to a value without including the value itself. This can - provide additional context for understanding the meaning behind a value. - For example, the variant `red` maybe be used for the value `#c05543`. - - A stringified version of the value can be used in situations where a - semantic identifier is unavailable. String representation of the value - should be determined by the implementer. - """ \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Gcp_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Gcp_attributes.py index c8a636dd93d..64c8fc17e4a 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Gcp_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Gcp_attributes.py @@ -15,34 +15,27 @@ # pylint: disable=too-many-lines -from enum import Enum - -class GcpAttributes: - - - GCP_CLOUD_RUN_JOB_EXECUTION = "gcp.cloud_run.job.execution" - - """ - The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. - """ - - - GCP_CLOUD_RUN_JOB_TASK_INDEX = "gcp.cloud_run.job.task_index" - - """ - The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. - """ - - - GCP_GCE_INSTANCE_HOSTNAME = "gcp.gce.instance.hostname" - - """ - The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). - """ - - - GCP_GCE_INSTANCE_NAME = "gcp.gce.instance.name" - - """ - The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). - """ \ No newline at end of file + +GCP_CLOUD_RUN_JOB_EXECUTION = "gcp.cloud_run.job.execution" +""" +The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. +""" + + +GCP_CLOUD_RUN_JOB_TASK_INDEX = "gcp.cloud_run.job.task_index" +""" +The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. +""" + + +GCP_GCE_INSTANCE_HOSTNAME = "gcp.gce.instance.hostname" +""" +The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). +""" + + +GCP_GCE_INSTANCE_NAME = "gcp.gce.instance.name" +""" +The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Graphql_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Graphql_attributes.py index a23abf899f5..ee05ebe9230 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Graphql_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Graphql_attributes.py @@ -17,29 +17,26 @@ from enum import Enum -class GraphqlAttributes: - - - GRAPHQL_DOCUMENT = "graphql.document" - - """ - The GraphQL document being executed. - Note: The value may be sanitized to exclude sensitive information. - """ - - - GRAPHQL_OPERATION_NAME = "graphql.operation.name" - - """ - The name of the operation being executed. - """ - - - GRAPHQL_OPERATION_TYPE = "graphql.operation.type" - - """ - The type of the operation being executed. - """ + +GRAPHQL_DOCUMENT = "graphql.document" +""" +The GraphQL document being executed. +Note: The value may be sanitized to exclude sensitive information. +""" + + +GRAPHQL_OPERATION_NAME = "graphql.operation.name" +""" +The name of the operation being executed. +""" + + +GRAPHQL_OPERATION_TYPE = "graphql.operation.type" +""" +The type of the operation being executed. +""" + + class GraphqlOperationTypeValues(Enum): QUERY = "query" """GraphQL query.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Heroku_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Heroku_attributes.py index 8206bb0cd73..c17e0ead246 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Heroku_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Heroku_attributes.py @@ -15,27 +15,21 @@ # pylint: disable=too-many-lines -from enum import Enum - -class HerokuAttributes: - - - HEROKU_APP_ID = "heroku.app.id" - - """ - Unique identifier for the application. - """ - - - HEROKU_RELEASE_COMMIT = "heroku.release.commit" - - """ - Commit hash for the current release. - """ - - - HEROKU_RELEASE_CREATION_TIMESTAMP = "heroku.release.creation_timestamp" - - """ - Time and date the release was created. - """ \ No newline at end of file + +HEROKU_APP_ID = "heroku.app.id" +""" +Unique identifier for the application. +""" + + +HEROKU_RELEASE_COMMIT = "heroku.release.commit" +""" +Commit hash for the current release. +""" + + +HEROKU_RELEASE_CREATION_TIMESTAMP = "heroku.release.creation_timestamp" +""" +Time and date the release was created. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Host_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Host_attributes.py index e2a521c37e2..368a4fcc154 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Host_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Host_attributes.py @@ -17,115 +17,100 @@ from enum import Enum -class HostAttributes: - - - HOST_ARCH = "host.arch" - - """ - The CPU architecture the host system is running on. - """ - - - HOST_CPU_CACHE_L2_SIZE = "host.cpu.cache.l2.size" - - """ - The amount of level 2 memory cache available to the processor (in Bytes). - """ - - - HOST_CPU_FAMILY = "host.cpu.family" - - """ - Numeric value specifying the family or generation of the CPU. - """ - - - HOST_CPU_MODEL_ID = "host.cpu.model.id" - - """ - Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. - """ - - - HOST_CPU_MODEL_NAME = "host.cpu.model.name" - - """ - Model designation of the processor. - """ - - - HOST_CPU_STEPPING = "host.cpu.stepping" - - """ - Stepping or core revisions. - """ - - - HOST_CPU_VENDOR_ID = "host.cpu.vendor.id" - - """ - Processor manufacturer identifier. A maximum 12-character string. - Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string. - """ - - - HOST_ID = "host.id" - - """ - Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. - """ - - - HOST_IMAGE_ID = "host.image.id" - - """ - VM image ID or host OS image ID. For Cloud, this value is from the provider. - """ - - - HOST_IMAGE_NAME = "host.image.name" - - """ - Name of the VM image or OS install the host was instantiated from. - """ - - - HOST_IMAGE_VERSION = "host.image.version" - - """ - The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). - """ - - - HOST_IP = "host.ip" - - """ - Available IP addresses of the host, excluding loopback interfaces. - Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. - """ - - - HOST_MAC = "host.mac" - - """ - Available MAC addresses of the host, excluding loopback interfaces. - Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant. - """ - - - HOST_NAME = "host.name" - - """ - Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - """ - - - HOST_TYPE = "host.type" - - """ - Type of host. For Cloud, this must be the machine type. - """ + +HOST_ARCH = "host.arch" +""" +The CPU architecture the host system is running on. +""" + + +HOST_CPU_CACHE_L2_SIZE = "host.cpu.cache.l2.size" +""" +The amount of level 2 memory cache available to the processor (in Bytes). +""" + + +HOST_CPU_FAMILY = "host.cpu.family" +""" +Numeric value specifying the family or generation of the CPU. +""" + + +HOST_CPU_MODEL_ID = "host.cpu.model.id" +""" +Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. +""" + + +HOST_CPU_MODEL_NAME = "host.cpu.model.name" +""" +Model designation of the processor. +""" + + +HOST_CPU_STEPPING = "host.cpu.stepping" +""" +Stepping or core revisions. +""" + + +HOST_CPU_VENDOR_ID = "host.cpu.vendor.id" +""" +Processor manufacturer identifier. A maximum 12-character string. +Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string. +""" + + +HOST_ID = "host.id" +""" +Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. +""" + + +HOST_IMAGE_ID = "host.image.id" +""" +VM image ID or host OS image ID. For Cloud, this value is from the provider. +""" + + +HOST_IMAGE_NAME = "host.image.name" +""" +Name of the VM image or OS install the host was instantiated from. +""" + + +HOST_IMAGE_VERSION = "host.image.version" +""" +The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). +""" + + +HOST_IP = "host.ip" +""" +Available IP addresses of the host, excluding loopback interfaces. +Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. +""" + + +HOST_MAC = "host.mac" +""" +Available MAC addresses of the host, excluding loopback interfaces. +Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant. +""" + + +HOST_NAME = "host.name" +""" +Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. +""" + + +HOST_TYPE = "host.type" +""" +Type of host. For Cloud, this must be the machine type. +""" + + class HostArchValues(Enum): AMD64 = "amd64" """AMD64.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Http_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Http_attributes.py index 7ab2df3b1a7..327dc61a053 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Http_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Http_attributes.py @@ -15,20 +15,15 @@ # pylint: disable=too-many-lines -from enum import Enum -class HttpAttributes: +HTTP_REQUEST_BODY_SIZE = "http.request.body.size" +""" +The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. +""" - - HTTP_REQUEST_BODY_SIZE = "http.request.body.size" - - """ - The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - """ - - HTTP_RESPONSE_BODY_SIZE = "http.response.body.size" - - """ - The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - """ \ No newline at end of file +HTTP_RESPONSE_BODY_SIZE = "http.response.body.size" +""" +The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Ios_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Ios_attributes.py index dca6f48b220..6247a683670 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Ios_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Ios_attributes.py @@ -17,15 +17,14 @@ from enum import Enum -class IosAttributes: - - - IOS_STATE = "ios.state" - - """ - This attribute represents the state the application has transitioned into at the occurrence of the event. - Note: The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived. - """ + +IOS_STATE = "ios.state" +""" +This attribute represents the state the application has transitioned into at the occurrence of the event. +Note: The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived. +""" + + class IosStateValues(Enum): ACTIVE = "active" """The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Jvm_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Jvm_attributes.py index cafaabaa1b4..0de5209de94 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Jvm_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Jvm_attributes.py @@ -17,60 +17,53 @@ from enum import Enum -class JvmAttributes: - - - JVM_BUFFER_POOL_NAME = "jvm.buffer.pool.name" - - """ - Name of the buffer pool. - Note: Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). - """ - - - JVM_GC_ACTION = "jvm.gc.action" - - """ - Name of the garbage collector action. - Note: Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). - """ - - - JVM_GC_NAME = "jvm.gc.name" - - """ - Name of the garbage collector. - Note: Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). - """ - - - JVM_MEMORY_POOL_NAME = "jvm.memory.pool.name" - - """ - Name of the memory pool. - Note: Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). - """ - - - JVM_MEMORY_TYPE = "jvm.memory.type" - - """ - The type of memory. - """ - - - JVM_THREAD_DAEMON = "jvm.thread.daemon" - - """ - Whether the thread is daemon or not. - """ - - - JVM_THREAD_STATE = "jvm.thread.state" - - """ - State of the thread. - """ + +JVM_BUFFER_POOL_NAME = "jvm.buffer.pool.name" +""" +Name of the buffer pool. +Note: Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). +""" + + +JVM_GC_ACTION = "jvm.gc.action" +""" +Name of the garbage collector action. +Note: Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). +""" + + +JVM_GC_NAME = "jvm.gc.name" +""" +Name of the garbage collector. +Note: Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). +""" + + +JVM_MEMORY_POOL_NAME = "jvm.memory.pool.name" +""" +Name of the memory pool. +Note: Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). +""" + + +JVM_MEMORY_TYPE = "jvm.memory.type" +""" +The type of memory. +""" + + +JVM_THREAD_DAEMON = "jvm.thread.daemon" +""" +Whether the thread is daemon or not. +""" + + +JVM_THREAD_STATE = "jvm.thread.state" +""" +State of the thread. +""" + + class JvmMemoryTypeValues(Enum): HEAP = "heap" """Heap memory.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/K8s_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/K8s_attributes.py index 4e4bf0c6252..749f701ae93 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/K8s_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/K8s_attributes.py @@ -15,23 +15,17 @@ # pylint: disable=too-many-lines -from enum import Enum - -class K8sAttributes: - - - K8S_CLUSTER_NAME = "k8s.cluster.name" - - """ - The name of the cluster. - """ - - - K8S_CLUSTER_UID = "k8s.cluster.uid" - - """ - A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. - Note: K8s doesn't have support for obtaining a cluster ID. If this is ever + +K8S_CLUSTER_NAME = "k8s.cluster.name" +""" +The name of the cluster. +""" + + +K8S_CLUSTER_UID = "k8s.cluster.uid" +""" +A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. +Note: K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will recommend collecting the `k8s.cluster.uid` through the official APIs. In the meantime, we are able to use the `uid` of the `kube-system` namespace as a proxy for cluster ID. Read on for the @@ -53,137 +47,119 @@ class K8sAttributes: Therefore, UIDs between clusters should be extremely unlikely to conflict. - """ - - - K8S_CONTAINER_NAME = "k8s.container.name" - - """ - The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). - """ - - - K8S_CONTAINER_RESTART_COUNT = "k8s.container.restart_count" - - """ - Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. - """ - - - K8S_CRONJOB_NAME = "k8s.cronjob.name" - - """ - The name of the CronJob. - """ - - - K8S_CRONJOB_UID = "k8s.cronjob.uid" - - """ - The UID of the CronJob. - """ - - - K8S_DAEMONSET_NAME = "k8s.daemonset.name" - - """ - The name of the DaemonSet. - """ - - - K8S_DAEMONSET_UID = "k8s.daemonset.uid" - - """ - The UID of the DaemonSet. - """ - - - K8S_DEPLOYMENT_NAME = "k8s.deployment.name" - - """ - The name of the Deployment. - """ - - - K8S_DEPLOYMENT_UID = "k8s.deployment.uid" - - """ - The UID of the Deployment. - """ - - - K8S_JOB_NAME = "k8s.job.name" - - """ - The name of the Job. - """ - - - K8S_JOB_UID = "k8s.job.uid" - - """ - The UID of the Job. - """ - - - K8S_NAMESPACE_NAME = "k8s.namespace.name" - - """ - The name of the namespace that the pod is running in. - """ - - - K8S_NODE_NAME = "k8s.node.name" - - """ - The name of the Node. - """ - - - K8S_NODE_UID = "k8s.node.uid" - - """ - The UID of the Node. - """ - - - K8S_POD_NAME = "k8s.pod.name" - - """ - The name of the Pod. - """ - - - K8S_POD_UID = "k8s.pod.uid" - - """ - The UID of the Pod. - """ - - - K8S_REPLICASET_NAME = "k8s.replicaset.name" - - """ - The name of the ReplicaSet. - """ - - - K8S_REPLICASET_UID = "k8s.replicaset.uid" - - """ - The UID of the ReplicaSet. - """ - - - K8S_STATEFULSET_NAME = "k8s.statefulset.name" - - """ - The name of the StatefulSet. - """ - - - K8S_STATEFULSET_UID = "k8s.statefulset.uid" - - """ - The UID of the StatefulSet. - """ \ No newline at end of file +""" + + +K8S_CONTAINER_NAME = "k8s.container.name" +""" +The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). +""" + + +K8S_CONTAINER_RESTART_COUNT = "k8s.container.restart_count" +""" +Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. +""" + + +K8S_CRONJOB_NAME = "k8s.cronjob.name" +""" +The name of the CronJob. +""" + + +K8S_CRONJOB_UID = "k8s.cronjob.uid" +""" +The UID of the CronJob. +""" + + +K8S_DAEMONSET_NAME = "k8s.daemonset.name" +""" +The name of the DaemonSet. +""" + + +K8S_DAEMONSET_UID = "k8s.daemonset.uid" +""" +The UID of the DaemonSet. +""" + + +K8S_DEPLOYMENT_NAME = "k8s.deployment.name" +""" +The name of the Deployment. +""" + + +K8S_DEPLOYMENT_UID = "k8s.deployment.uid" +""" +The UID of the Deployment. +""" + + +K8S_JOB_NAME = "k8s.job.name" +""" +The name of the Job. +""" + + +K8S_JOB_UID = "k8s.job.uid" +""" +The UID of the Job. +""" + + +K8S_NAMESPACE_NAME = "k8s.namespace.name" +""" +The name of the namespace that the pod is running in. +""" + + +K8S_NODE_NAME = "k8s.node.name" +""" +The name of the Node. +""" + + +K8S_NODE_UID = "k8s.node.uid" +""" +The UID of the Node. +""" + + +K8S_POD_NAME = "k8s.pod.name" +""" +The name of the Pod. +""" + + +K8S_POD_UID = "k8s.pod.uid" +""" +The UID of the Pod. +""" + + +K8S_REPLICASET_NAME = "k8s.replicaset.name" +""" +The name of the ReplicaSet. +""" + + +K8S_REPLICASET_UID = "k8s.replicaset.uid" +""" +The UID of the ReplicaSet. +""" + + +K8S_STATEFULSET_NAME = "k8s.statefulset.name" +""" +The name of the StatefulSet. +""" + + +K8S_STATEFULSET_UID = "k8s.statefulset.uid" +""" +The UID of the StatefulSet. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Log_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Log_attributes.py index 205a997d0a9..567443235bd 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Log_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Log_attributes.py @@ -17,51 +17,45 @@ from enum import Enum -class LogAttributes: - - - LOG_FILE_NAME = "log.file.name" - - """ - The basename of the file. - """ - - - LOG_FILE_NAME_RESOLVED = "log.file.name_resolved" - - """ - The basename of the file, with symlinks resolved. - """ - - - LOG_FILE_PATH = "log.file.path" - - """ - The full path to the file. - """ - - - LOG_FILE_PATH_RESOLVED = "log.file.path_resolved" - - """ - The full path to the file, with symlinks resolved. - """ - - - LOG_IOSTREAM = "log.iostream" - - """ - The stream associated with the log. See below for a list of well-known values. - """ - - - LOG_RECORD_UID = "log.record.uid" - - """ - A unique identifier for the Log Record. - Note: If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. + +LOG_FILE_NAME = "log.file.name" +""" +The basename of the file. +""" + + +LOG_FILE_NAME_RESOLVED = "log.file.name_resolved" +""" +The basename of the file, with symlinks resolved. +""" + + +LOG_FILE_PATH = "log.file.path" +""" +The full path to the file. +""" + + +LOG_FILE_PATH_RESOLVED = "log.file.path_resolved" +""" +The full path to the file, with symlinks resolved. +""" + + +LOG_IOSTREAM = "log.iostream" +""" +The stream associated with the log. See below for a list of well-known values. +""" + + +LOG_RECORD_UID = "log.record.uid" +""" +A unique identifier for the Log Record. +Note: If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. - """ +""" + + class LogIostreamValues(Enum): STDOUT = "stdout" """Logs from stdout stream.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Message_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Message_attributes.py index e96d427ed89..7a3c6dac252 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Message_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Message_attributes.py @@ -17,36 +17,32 @@ from enum import Enum -class MessageAttributes: - - - MESSAGE_COMPRESSED_SIZE = "message.compressed_size" - - """ - Compressed size of the message in bytes. - """ - - - MESSAGE_ID = "message.id" - - """ - MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - Note: This way we guarantee that the values will be consistent between different implementations. - """ - - - MESSAGE_TYPE = "message.type" - - """ - Whether this is a received or sent message. - """ - - - MESSAGE_UNCOMPRESSED_SIZE = "message.uncompressed_size" - - """ - Uncompressed size of the message in bytes. - """ + +MESSAGE_COMPRESSED_SIZE = "message.compressed_size" +""" +Compressed size of the message in bytes. +""" + + +MESSAGE_ID = "message.id" +""" +MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. +Note: This way we guarantee that the values will be consistent between different implementations. +""" + + +MESSAGE_TYPE = "message.type" +""" +Whether this is a received or sent message. +""" + + +MESSAGE_UNCOMPRESSED_SIZE = "message.uncompressed_size" +""" +Uncompressed size of the message in bytes. +""" + + class MessageTypeValues(Enum): SENT = "SENT" """sent.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Messaging_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Messaging_attributes.py index d4cdb67184f..0e2fa579b97 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Messaging_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Messaging_attributes.py @@ -17,222 +17,193 @@ from enum import Enum -class MessagingAttributes: - - - MESSAGING_BATCH_MESSAGE_COUNT = "messaging.batch.message_count" - - """ - The number of messages sent, received, or processed in the scope of the batching operation. - Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. - """ - - - MESSAGING_CLIENT_ID = "messaging.client_id" - - """ - A unique identifier for the client that consumes or produces a message. - """ - - - MESSAGING_DESTINATION_ANONYMOUS = "messaging.destination.anonymous" - - """ - A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). - """ - - - MESSAGING_DESTINATION_NAME = "messaging.destination.name" - - """ - The message destination name. - Note: Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If + +MESSAGING_BATCH_MESSAGE_COUNT = "messaging.batch.message_count" +""" +The number of messages sent, received, or processed in the scope of the batching operation. +Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. +""" + + +MESSAGING_CLIENT_ID = "messaging.client_id" +""" +A unique identifier for the client that consumes or produces a message. +""" + + +MESSAGING_DESTINATION_ANONYMOUS = "messaging.destination.anonymous" +""" +A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). +""" + + +MESSAGING_DESTINATION_NAME = "messaging.destination.name" +""" +The message destination name. +Note: Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. - """ - - - MESSAGING_DESTINATION_TEMPLATE = "messaging.destination.template" - - """ - Low cardinality representation of the messaging destination name. - Note: Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. - """ - - - MESSAGING_DESTINATION_TEMPORARY = "messaging.destination.temporary" - - """ - A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. - """ - - - MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = "messaging.destination_publish.anonymous" - - """ - A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name). - """ - - - MESSAGING_DESTINATION_PUBLISH_NAME = "messaging.destination_publish.name" - - """ - The name of the original destination the message was published to. - Note: The name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If +""" + + +MESSAGING_DESTINATION_TEMPLATE = "messaging.destination.template" +""" +Low cardinality representation of the messaging destination name. +Note: Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. +""" + + +MESSAGING_DESTINATION_TEMPORARY = "messaging.destination.temporary" +""" +A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. +""" + + +MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = "messaging.destination_publish.anonymous" +""" +A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name). +""" + + +MESSAGING_DESTINATION_PUBLISH_NAME = "messaging.destination_publish.name" +""" +The name of the original destination the message was published to. +Note: The name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If the broker doesn't have such notion, the original destination name SHOULD uniquely identify the broker. - """ - - - MESSAGING_KAFKA_CONSUMER_GROUP = "messaging.kafka.consumer.group" - - """ - Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - """ - - - MESSAGING_KAFKA_DESTINATION_PARTITION = "messaging.kafka.destination.partition" - - """ - Partition the message is sent to. - """ - - - 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, 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_MESSAGE_OFFSET = "messaging.kafka.message.offset" - - """ - The offset of a record in the corresponding Kafka partition. - """ - - - MESSAGING_KAFKA_MESSAGE_TOMBSTONE = "messaging.kafka.message.tombstone" - - """ - A boolean that is true if the message is a tombstone. - """ - - - MESSAGING_MESSAGE_BODY_SIZE = "messaging.message.body.size" - - """ - The size of the message body in bytes. - Note: This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed +""" + + +MESSAGING_KAFKA_CONSUMER_GROUP = "messaging.kafka.consumer.group" +""" +Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. +""" + + +MESSAGING_KAFKA_DESTINATION_PARTITION = "messaging.kafka.destination.partition" +""" +Partition the message is sent to. +""" + + +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, 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_MESSAGE_OFFSET = "messaging.kafka.message.offset" +""" +The offset of a record in the corresponding Kafka partition. +""" + + +MESSAGING_KAFKA_MESSAGE_TOMBSTONE = "messaging.kafka.message.tombstone" +""" +A boolean that is true if the message is a tombstone. +""" + + +MESSAGING_MESSAGE_BODY_SIZE = "messaging.message.body.size" +""" +The size of the message body in bytes. +Note: This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed body size should be used. - """ - - - MESSAGING_MESSAGE_CONVERSATION_ID = "messaging.message.conversation_id" - - """ - The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - """ - - - MESSAGING_MESSAGE_ENVELOPE_SIZE = "messaging.message.envelope.size" - - """ - The size of the message body and metadata in bytes. - Note: This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed +""" + + +MESSAGING_MESSAGE_CONVERSATION_ID = "messaging.message.conversation_id" +""" +The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". +""" + + +MESSAGING_MESSAGE_ENVELOPE_SIZE = "messaging.message.envelope.size" +""" +The size of the message body and metadata in bytes. +Note: This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed size should be used. - """ - - - MESSAGING_MESSAGE_ID = "messaging.message.id" - - """ - A value used by the messaging system as an identifier for the message, represented as a string. - """ - - - MESSAGING_OPERATION = "messaging.operation" - - """ - A string identifying the kind of messaging operation. - Note: If a custom value is used, it MUST be of low cardinality. - """ - - - MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = "messaging.rabbitmq.destination.routing_key" - - """ - RabbitMQ message routing key. - """ - - - MESSAGING_ROCKETMQ_CLIENT_GROUP = "messaging.rocketmq.client_group" - - """ - Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind. - """ - - - MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = "messaging.rocketmq.consumption_model" - - """ - Model of message consumption. This only applies to consumer spans. - """ - - - MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = "messaging.rocketmq.message.delay_time_level" - - """ - The delay time level for delay message, which determines the message delay time. - """ - - - MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = "messaging.rocketmq.message.delivery_timestamp" - - """ - The timestamp in milliseconds that the delay message is expected to be delivered to consumer. - """ - - - MESSAGING_ROCKETMQ_MESSAGE_GROUP = "messaging.rocketmq.message.group" - - """ - It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. - """ - - - MESSAGING_ROCKETMQ_MESSAGE_KEYS = "messaging.rocketmq.message.keys" - - """ - Key(s) of message, another way to mark message besides message id. - """ - - - MESSAGING_ROCKETMQ_MESSAGE_TAG = "messaging.rocketmq.message.tag" - - """ - The secondary classifier of message besides topic. - """ - - - MESSAGING_ROCKETMQ_MESSAGE_TYPE = "messaging.rocketmq.message.type" - - """ - Type of message. - """ - - - MESSAGING_ROCKETMQ_NAMESPACE = "messaging.rocketmq.namespace" - - """ - Namespace of RocketMQ resources, resources in different namespaces are individual. - """ - - - MESSAGING_SYSTEM = "messaging.system" - - """ - A string identifying the messaging system. - """ +""" + + +MESSAGING_MESSAGE_ID = "messaging.message.id" +""" +A value used by the messaging system as an identifier for the message, represented as a string. +""" + + +MESSAGING_OPERATION = "messaging.operation" +""" +A string identifying the kind of messaging operation. +Note: If a custom value is used, it MUST be of low cardinality. +""" + + +MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = "messaging.rabbitmq.destination.routing_key" +""" +RabbitMQ message routing key. +""" + + +MESSAGING_ROCKETMQ_CLIENT_GROUP = "messaging.rocketmq.client_group" +""" +Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind. +""" + + +MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = "messaging.rocketmq.consumption_model" +""" +Model of message consumption. This only applies to consumer spans. +""" + + +MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = "messaging.rocketmq.message.delay_time_level" +""" +The delay time level for delay message, which determines the message delay time. +""" + + +MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = "messaging.rocketmq.message.delivery_timestamp" +""" +The timestamp in milliseconds that the delay message is expected to be delivered to consumer. +""" + + +MESSAGING_ROCKETMQ_MESSAGE_GROUP = "messaging.rocketmq.message.group" +""" +It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. +""" + + +MESSAGING_ROCKETMQ_MESSAGE_KEYS = "messaging.rocketmq.message.keys" +""" +Key(s) of message, another way to mark message besides message id. +""" + + +MESSAGING_ROCKETMQ_MESSAGE_TAG = "messaging.rocketmq.message.tag" +""" +The secondary classifier of message besides topic. +""" + + +MESSAGING_ROCKETMQ_MESSAGE_TYPE = "messaging.rocketmq.message.type" +""" +Type of message. +""" + + +MESSAGING_ROCKETMQ_NAMESPACE = "messaging.rocketmq.namespace" +""" +Namespace of RocketMQ resources, resources in different namespaces are individual. +""" + + +MESSAGING_SYSTEM = "messaging.system" +""" +A string identifying the messaging system. +""" + + class MessagingOperationValues(Enum): PUBLISH = "publish" """One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Network_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Network_attributes.py index 9e313ef5355..1a8a0e2263e 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Network_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Network_attributes.py @@ -17,49 +17,43 @@ from enum import Enum -class NetworkAttributes: - - - NETWORK_CARRIER_ICC = "network.carrier.icc" - - """ - The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - """ - - - NETWORK_CARRIER_MCC = "network.carrier.mcc" - - """ - The mobile carrier country code. - """ - - - NETWORK_CARRIER_MNC = "network.carrier.mnc" - - """ - The mobile carrier network code. - """ - - - NETWORK_CARRIER_NAME = "network.carrier.name" - - """ - The name of the mobile carrier. - """ - - - NETWORK_CONNECTION_SUBTYPE = "network.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. - """ - - - NETWORK_CONNECTION_TYPE = "network.connection.type" - - """ - The internet connection type. - """ + +NETWORK_CARRIER_ICC = "network.carrier.icc" +""" +The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. +""" + + +NETWORK_CARRIER_MCC = "network.carrier.mcc" +""" +The mobile carrier country code. +""" + + +NETWORK_CARRIER_MNC = "network.carrier.mnc" +""" +The mobile carrier network code. +""" + + +NETWORK_CARRIER_NAME = "network.carrier.name" +""" +The name of the mobile carrier. +""" + + +NETWORK_CONNECTION_SUBTYPE = "network.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. +""" + + +NETWORK_CONNECTION_TYPE = "network.connection.type" +""" +The internet connection type. +""" + + class NetworkConnectionSubtypeValues(Enum): GPRS = "gprs" """GPRS.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Oci_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Oci_attributes.py index eb90c581964..620c8ad105f 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Oci_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Oci_attributes.py @@ -15,15 +15,11 @@ # pylint: disable=too-many-lines -from enum import Enum -class OciAttributes: - - - OCI_MANIFEST_DIGEST = "oci.manifest.digest" - - """ - The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. - Note: Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). +OCI_MANIFEST_DIGEST = "oci.manifest.digest" +""" +The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. +Note: Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). An example can be found in [Example Image Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). - """ \ No newline at end of file +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Opentracing_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Opentracing_attributes.py index 7e08a2bb2d0..538da14e408 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Opentracing_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Opentracing_attributes.py @@ -17,15 +17,14 @@ from enum import Enum -class OpentracingAttributes: - - - OPENTRACING_REF_TYPE = "opentracing.ref_type" - - """ - Parent-child Reference type. - Note: The causal relationship between a child Span and a parent Span. - """ + +OPENTRACING_REF_TYPE = "opentracing.ref_type" +""" +Parent-child Reference type. +Note: The causal relationship between a child Span and a parent Span. +""" + + class OpentracingRefTypeValues(Enum): CHILD_OF = "child_of" """The parent Span depends on the child Span in some capacity.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Os_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Os_attributes.py index 36b153a2a57..7565d59c60c 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Os_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Os_attributes.py @@ -17,42 +17,37 @@ from enum import Enum -class OsAttributes: - - - OS_BUILD_ID = "os.build_id" - - """ - Unique identifier for a particular build or compilation of the operating system. - """ - - - OS_DESCRIPTION = "os.description" - - """ - Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - """ - - - OS_NAME = "os.name" - - """ - Human readable operating system name. - """ - - - OS_TYPE = "os.type" - - """ - The operating system type. - """ - - - OS_VERSION = "os.version" - - """ - The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). - """ + +OS_BUILD_ID = "os.build_id" +""" +Unique identifier for a particular build or compilation of the operating system. +""" + + +OS_DESCRIPTION = "os.description" +""" +Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. +""" + + +OS_NAME = "os.name" +""" +Human readable operating system name. +""" + + +OS_TYPE = "os.type" +""" +The operating system type. +""" + + +OS_VERSION = "os.version" +""" +The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +""" + + class OsTypeValues(Enum): WINDOWS = "windows" """Microsoft Windows.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Otel_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Otel_attributes.py index dba7c1010fc..7ee9e2e14df 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Otel_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Otel_attributes.py @@ -17,35 +17,31 @@ from enum import Enum -class OtelAttributes: - - - OTEL_SCOPE_NAME = "otel.scope.name" - - """ - The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). - """ - - - OTEL_SCOPE_VERSION = "otel.scope.version" - - """ - The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - """ - - - OTEL_STATUS_CODE = "otel.status_code" - - """ - Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. - """ - - - OTEL_STATUS_DESCRIPTION = "otel.status_description" - - """ - Description of the Status if it has a value, otherwise not set. - """ + +OTEL_SCOPE_NAME = "otel.scope.name" +""" +The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). +""" + + +OTEL_SCOPE_VERSION = "otel.scope.version" +""" +The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). +""" + + +OTEL_STATUS_CODE = "otel.status_code" +""" +Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. +""" + + +OTEL_STATUS_DESCRIPTION = "otel.status_description" +""" +Description of the Status if it has a value, otherwise not set. +""" + + class OtelStatusCodeValues(Enum): OK = "OK" """The operation has been validated by an Application developer or Operator to have completed successfully.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Other_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Other_attributes.py index 63ddd4620f5..b1917f1ce14 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Other_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Other_attributes.py @@ -17,14 +17,13 @@ from enum import Enum -class OtherAttributes: - - - STATE = "state" - - """ - The state of a connection in the pool. - """ + +STATE = "state" +""" +The state of a connection in the pool. +""" + + class StateValues(Enum): IDLE = "idle" """idle.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Peer_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Peer_attributes.py index 64e58dca3fe..0ba120265e0 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Peer_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Peer_attributes.py @@ -15,13 +15,9 @@ # pylint: disable=too-many-lines -from enum import Enum -class PeerAttributes: +PEER_SERVICE = "peer.service" +""" +The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. +""" - - PEER_SERVICE = "peer.service" - - """ - The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - """ \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Pool_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Pool_attributes.py index feefbe352b2..ea209078b84 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Pool_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Pool_attributes.py @@ -15,13 +15,9 @@ # pylint: disable=too-many-lines -from enum import Enum -class PoolAttributes: +POOL_NAME = "pool.name" +""" +The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, then the [db.connection_string](/docs/database/database-spans.md#connection-level-attributes) should be used. +""" - - POOL_NAME = "pool.name" - - """ - The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, then the [db.connection_string](/docs/database/database-spans.md#connection-level-attributes) should be used. - """ \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Process_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Process_attributes.py index 3220a547be3..21f69284bec 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Process_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Process_attributes.py @@ -15,83 +15,69 @@ # pylint: disable=too-many-lines -from enum import Enum - -class ProcessAttributes: - - - PROCESS_COMMAND = "process.command" - - """ - The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - """ - - - PROCESS_COMMAND_ARGS = "process.command_args" - - """ - All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - """ - - - PROCESS_COMMAND_LINE = "process.command_line" - - """ - The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - """ - - - PROCESS_EXECUTABLE_NAME = "process.executable.name" - - """ - The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - """ - - - PROCESS_EXECUTABLE_PATH = "process.executable.path" - - """ - The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - """ - - - PROCESS_OWNER = "process.owner" - - """ - The username of the user that owns the process. - """ - - - PROCESS_PARENT_PID = "process.parent_pid" - - """ - Parent Process identifier (PID). - """ - - - PROCESS_PID = "process.pid" - - """ - Process identifier (PID). - """ - - - PROCESS_RUNTIME_DESCRIPTION = "process.runtime.description" - - """ - An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - """ - - - PROCESS_RUNTIME_NAME = "process.runtime.name" - - """ - The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - """ - - - PROCESS_RUNTIME_VERSION = "process.runtime.version" - - """ - The version of the runtime of this process, as returned by the runtime without modification. - """ \ No newline at end of file + +PROCESS_COMMAND = "process.command" +""" +The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. +""" + + +PROCESS_COMMAND_ARGS = "process.command_args" +""" +All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. +""" + + +PROCESS_COMMAND_LINE = "process.command_line" +""" +The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. +""" + + +PROCESS_EXECUTABLE_NAME = "process.executable.name" +""" +The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. +""" + + +PROCESS_EXECUTABLE_PATH = "process.executable.path" +""" +The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. +""" + + +PROCESS_OWNER = "process.owner" +""" +The username of the user that owns the process. +""" + + +PROCESS_PARENT_PID = "process.parent_pid" +""" +Parent Process identifier (PID). +""" + + +PROCESS_PID = "process.pid" +""" +Process identifier (PID). +""" + + +PROCESS_RUNTIME_DESCRIPTION = "process.runtime.description" +""" +An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. +""" + + +PROCESS_RUNTIME_NAME = "process.runtime.name" +""" +The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. +""" + + +PROCESS_RUNTIME_VERSION = "process.runtime.version" +""" +The version of the runtime of this process, as returned by the runtime without modification. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Rpc_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Rpc_attributes.py index d90047f35aa..0a9c79cf2b7 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Rpc_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Rpc_attributes.py @@ -17,104 +17,95 @@ from enum import Enum -class RpcAttributes: - - - RPC_CONNECT_RPC_ERROR_CODE = "rpc.connect_rpc.error_code" - - """ - The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. - """ - - - RPC_CONNECT_RPC_REQUEST_METADATA_TEMPLATE = "rpc.connect_rpc.request.metadata" - - """ - Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - """ - - - RPC_CONNECT_RPC_RESPONSE_METADATA_TEMPLATE = "rpc.connect_rpc.response.metadata" - - """ - Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - """ - - - RPC_GRPC_REQUEST_METADATA_TEMPLATE = "rpc.grpc.request.metadata" - - """ - gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - """ - - - RPC_GRPC_RESPONSE_METADATA_TEMPLATE = "rpc.grpc.response.metadata" - - """ - gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - """ - - - RPC_GRPC_STATUS_CODE = "rpc.grpc.status_code" - - """ - The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - """ - - - RPC_JSONRPC_ERROR_CODE = "rpc.jsonrpc.error_code" - - """ - `error.code` property of response if it is an error response. - """ - - - RPC_JSONRPC_ERROR_MESSAGE = "rpc.jsonrpc.error_message" - - """ - `error.message` property of response if it is an error response. - """ - - - RPC_JSONRPC_REQUEST_ID = "rpc.jsonrpc.request_id" - - """ - `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - """ - - - RPC_JSONRPC_VERSION = "rpc.jsonrpc.version" - - """ - Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. - """ - - - RPC_METHOD = "rpc.method" - - """ - The name of the (logical) method being called, must be equal to the $method part in the span name. - Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - """ - - - RPC_SERVICE = "rpc.service" - - """ - The full (logical) name of the service being called, including its package name, if applicable. - Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - """ - - - RPC_SYSTEM = "rpc.system" - - """ - A string identifying the remoting system. See below for a list of well-known identifiers. - """ + +RPC_CONNECT_RPC_ERROR_CODE = "rpc.connect_rpc.error_code" +""" +The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. +""" + + +RPC_CONNECT_RPC_REQUEST_METADATA_TEMPLATE = "rpc.connect_rpc.request.metadata" + +""" +Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. +""" + + +RPC_CONNECT_RPC_RESPONSE_METADATA_TEMPLATE = "rpc.connect_rpc.response.metadata" + +""" +Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. +""" + + +RPC_GRPC_REQUEST_METADATA_TEMPLATE = "rpc.grpc.request.metadata" + +""" +gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. +""" + + +RPC_GRPC_RESPONSE_METADATA_TEMPLATE = "rpc.grpc.response.metadata" + +""" +gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +Note: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. +""" + + +RPC_GRPC_STATUS_CODE = "rpc.grpc.status_code" +""" +The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. +""" + + +RPC_JSONRPC_ERROR_CODE = "rpc.jsonrpc.error_code" +""" +`error.code` property of response if it is an error response. +""" + + +RPC_JSONRPC_ERROR_MESSAGE = "rpc.jsonrpc.error_message" +""" +`error.message` property of response if it is an error response. +""" + + +RPC_JSONRPC_REQUEST_ID = "rpc.jsonrpc.request_id" +""" +`id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. +""" + + +RPC_JSONRPC_VERSION = "rpc.jsonrpc.version" +""" +Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. +""" + + +RPC_METHOD = "rpc.method" +""" +The name of the (logical) method being called, must be equal to the $method part in the span name. +Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). +""" + + +RPC_SERVICE = "rpc.service" +""" +The full (logical) name of the service being called, including its package name, if applicable. +Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). +""" + + +RPC_SYSTEM = "rpc.system" +""" +A string identifying the remoting system. See below for a list of well-known identifiers. +""" + + class RpcConnectRpcErrorCodeValues(Enum): CANCELLED = "cancelled" """cancelled.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Service_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Service_attributes.py index bfba715ee1b..1542b36e044 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Service_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Service_attributes.py @@ -15,37 +15,30 @@ # pylint: disable=too-many-lines -from enum import Enum - -class ServiceAttributes: - - - SERVICE_INSTANCE_ID = "service.instance.id" - - """ - The string ID of the service instance. - Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - """ - - - SERVICE_NAME = "service.name" - - """ - Logical name of the service. - Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - """ - - - SERVICE_NAMESPACE = "service.namespace" - - """ - A namespace for `service.name`. - Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - """ - - - SERVICE_VERSION = "service.version" - - """ - The version string of the service API or implementation. The format is not defined by these conventions. - """ \ No newline at end of file + +SERVICE_INSTANCE_ID = "service.instance.id" +""" +The string ID of the service instance. +Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). +""" + + +SERVICE_NAME = "service.name" +""" +Logical name of the service. +Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. +""" + + +SERVICE_NAMESPACE = "service.namespace" +""" +A namespace for `service.name`. +Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. +""" + + +SERVICE_VERSION = "service.version" +""" +The version string of the service API or implementation. The format is not defined by these conventions. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Session_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Session_attributes.py index b069e967cd2..b413fa90fc0 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Session_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Session_attributes.py @@ -15,20 +15,15 @@ # pylint: disable=too-many-lines -from enum import Enum -class SessionAttributes: +SESSION_ID = "session.id" +""" +A unique id to identify a session. +""" - - SESSION_ID = "session.id" - - """ - A unique id to identify a session. - """ - - SESSION_PREVIOUS_ID = "session.previous_id" - - """ - The previous `session.id` for this user, when known. - """ \ No newline at end of file +SESSION_PREVIOUS_ID = "session.previous_id" +""" +The previous `session.id` for this user, when known. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Source_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Source_attributes.py index e22d125427f..067f484bd81 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Source_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Source_attributes.py @@ -15,21 +15,16 @@ # pylint: disable=too-many-lines -from enum import Enum -class SourceAttributes: +SOURCE_ADDRESS = "source.address" +""" +Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +Note: When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries, for example proxies, if it's available. +""" - - SOURCE_ADDRESS = "source.address" - - """ - Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - Note: When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries, for example proxies, if it's available. - """ - - SOURCE_PORT = "source.port" - - """ - Source port number. - """ \ No newline at end of file +SOURCE_PORT = "source.port" +""" +Source port number. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/System_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/System_attributes.py index 8f070a1f3e8..ded0296e7ae 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/System_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/System_attributes.py @@ -17,112 +17,97 @@ from enum import Enum -class SystemAttributes: - - - SYSTEM_CPU_LOGICAL_NUMBER = "system.cpu.logical_number" - - """ - The logical CPU number [0..n-1]. - """ - - - SYSTEM_CPU_STATE = "system.cpu.state" - - """ - The state of the CPU. - """ - - - SYSTEM_DEVICE = "system.device" - - """ - The device identifier. - """ - - - SYSTEM_DISK_DIRECTION = "system.disk.direction" - - """ - The disk operation direction. - """ - - - SYSTEM_FILESYSTEM_MODE = "system.filesystem.mode" - - """ - The filesystem mode. - """ - - - SYSTEM_FILESYSTEM_MOUNTPOINT = "system.filesystem.mountpoint" - - """ - The filesystem mount path. - """ - - - SYSTEM_FILESYSTEM_STATE = "system.filesystem.state" - - """ - The filesystem state. - """ - - - SYSTEM_FILESYSTEM_TYPE = "system.filesystem.type" - - """ - The filesystem type. - """ - - - SYSTEM_MEMORY_STATE = "system.memory.state" - - """ - The memory state. - """ - - - SYSTEM_NETWORK_DIRECTION = "system.network.direction" - - """ - . - """ - - - SYSTEM_NETWORK_STATE = "system.network.state" - - """ - A stateless protocol MUST NOT set this attribute. - """ - - - SYSTEM_PAGING_DIRECTION = "system.paging.direction" - - """ - The paging access direction. - """ - - - SYSTEM_PAGING_STATE = "system.paging.state" - - """ - The memory paging state. - """ - - - SYSTEM_PAGING_TYPE = "system.paging.type" - - """ - The memory paging type. - """ - - - SYSTEM_PROCESSES_STATUS = "system.processes.status" - - """ - The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES). - """ + +SYSTEM_CPU_LOGICAL_NUMBER = "system.cpu.logical_number" +""" +The logical CPU number [0..n-1]. +""" + + +SYSTEM_CPU_STATE = "system.cpu.state" +""" +The state of the CPU. +""" + + +SYSTEM_DEVICE = "system.device" +""" +The device identifier. +""" + + +SYSTEM_DISK_DIRECTION = "system.disk.direction" +""" +The disk operation direction. +""" + + +SYSTEM_FILESYSTEM_MODE = "system.filesystem.mode" +""" +The filesystem mode. +""" + + +SYSTEM_FILESYSTEM_MOUNTPOINT = "system.filesystem.mountpoint" +""" +The filesystem mount path. +""" + + +SYSTEM_FILESYSTEM_STATE = "system.filesystem.state" +""" +The filesystem state. +""" + + +SYSTEM_FILESYSTEM_TYPE = "system.filesystem.type" +""" +The filesystem type. +""" + + +SYSTEM_MEMORY_STATE = "system.memory.state" +""" +The memory state. +""" + + +SYSTEM_NETWORK_DIRECTION = "system.network.direction" +""" +. +""" + + +SYSTEM_NETWORK_STATE = "system.network.state" +""" +A stateless protocol MUST NOT set this attribute. +""" + + +SYSTEM_PAGING_DIRECTION = "system.paging.direction" +""" +The paging access direction. +""" + + +SYSTEM_PAGING_STATE = "system.paging.state" +""" +The memory paging state. +""" + + +SYSTEM_PAGING_TYPE = "system.paging.type" +""" +The memory paging type. +""" + + +SYSTEM_PROCESSES_STATUS = "system.processes.status" +""" +The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES). +""" + + class SystemCpuStateValues(Enum): USER = "user" """user.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Telemetry_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Telemetry_attributes.py index 911fc120249..a2858ad3ec0 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Telemetry_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Telemetry_attributes.py @@ -17,50 +17,45 @@ from enum import Enum -class TelemetryAttributes: - - - TELEMETRY_DISTRO_NAME = "telemetry.distro.name" - - """ - The name of the auto instrumentation agent or distribution, if used. - Note: Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to + +TELEMETRY_DISTRO_NAME = "telemetry.distro.name" +""" +The name of the auto instrumentation agent or distribution, if used. +Note: Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`. - """ - - - TELEMETRY_DISTRO_VERSION = "telemetry.distro.version" - - """ - The version string of the auto instrumentation agent or distribution, if used. - """ - - - TELEMETRY_SDK_LANGUAGE = "telemetry.sdk.language" - - """ - The language of the telemetry SDK. - """ - - - TELEMETRY_SDK_NAME = "telemetry.sdk.name" - - """ - The name of the telemetry SDK as defined above. - Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`. +""" + + +TELEMETRY_DISTRO_VERSION = "telemetry.distro.version" +""" +The version string of the auto instrumentation agent or distribution, if used. +""" + + +TELEMETRY_SDK_LANGUAGE = "telemetry.sdk.language" +""" +The language of the telemetry SDK. +""" + + +TELEMETRY_SDK_NAME = "telemetry.sdk.name" +""" +The name of the telemetry SDK as defined above. +Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`. If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point or another suitable identifier depending on the language. The identifier `opentelemetry` is reserved and MUST NOT be used in this case. All custom identifiers SHOULD be stable across different versions of an implementation. - """ - - - TELEMETRY_SDK_VERSION = "telemetry.sdk.version" - - """ - The version string of the telemetry SDK. - """ +""" + + +TELEMETRY_SDK_VERSION = "telemetry.sdk.version" +""" +The version string of the telemetry SDK. +""" + + class TelemetrySdkLanguageValues(Enum): CPP = "cpp" """cpp.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Thread_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Thread_attributes.py index 83d6d121e78..214625e5711 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Thread_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Thread_attributes.py @@ -15,20 +15,15 @@ # pylint: disable=too-many-lines -from enum import Enum -class ThreadAttributes: +THREAD_ID = "thread.id" +""" +Current "managed" thread ID (as opposed to OS thread ID). +""" - - THREAD_ID = "thread.id" - - """ - Current "managed" thread ID (as opposed to OS thread ID). - """ - - THREAD_NAME = "thread.name" - - """ - Current thread name. - """ \ No newline at end of file +THREAD_NAME = "thread.name" +""" +Current thread name. +""" + diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Webengine_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Webengine_attributes.py index 7af0a682b8f..39c693fc160 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Webengine_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/v1_23_1/Webengine_attributes.py @@ -15,27 +15,21 @@ # pylint: disable=too-many-lines -from enum import Enum - -class WebengineAttributes: - - - WEBENGINE_DESCRIPTION = "webengine.description" - - """ - Additional description of the web engine (e.g. detailed version and edition information). - """ - - - WEBENGINE_NAME = "webengine.name" - - """ - The name of the web engine. - """ - - - WEBENGINE_VERSION = "webengine.version" - - """ - The version of the web engine. - """ \ No newline at end of file + +WEBENGINE_DESCRIPTION = "webengine.description" +""" +Additional description of the web engine (e.g. detailed version and edition information). +""" + + +WEBENGINE_NAME = "webengine.name" +""" +The name of the web engine. +""" + + +WEBENGINE_VERSION = "webengine.version" +""" +The version of the web engine. +""" + diff --git a/scripts/semconv/generate.sh b/scripts/semconv/generate.sh index 07581e4aa72..0bcd90906ed 100755 --- a/scripts/semconv/generate.sh +++ b/scripts/semconv/generate.sh @@ -7,7 +7,7 @@ ROOT_DIR="${SCRIPT_DIR}/../../" SPEC_VERSION=v1.23.1 SPEC_VERSION_ESCAPED=v1_23_1 SCHEMA_URL=https://opentelemetry.io/schemas/$SPEC_VERSION -OTEL_SEMCONV_GEN_IMG_VERSION=foo15 +OTEL_SEMCONV_GEN_IMG_VERSION=feature-codegen-by-namespace cd ${SCRIPT_DIR} @@ -26,10 +26,10 @@ docker run --rm \ -v ${SCRIPT_DIR}/semantic-conventions/model:/source \ -v ${SCRIPT_DIR}/templates:/templates \ -v ${ROOT_DIR}/opentelemetry-semantic-conventions/src/opentelemetry/semconv/:/output \ - semconvgen:$OTEL_SEMCONV_GEN_IMG_VERSION \ + otel/semconvgen:$OTEL_SEMCONV_GEN_IMG_VERSION \ -f /source code \ --template /templates/semantic_attributes.j2 \ - --output /output/_attributes.py \ + --output /output/{{snake_prefix}}_attributes.py \ --file-per-group root_namespace \ -Dfilter=is_stable @@ -39,10 +39,10 @@ docker run --rm \ -v ${SCRIPT_DIR}/semantic-conventions/model:/source \ -v ${SCRIPT_DIR}/templates:/templates \ -v ${ROOT_DIR}/opentelemetry-semantic-conventions/src/opentelemetry/semconv/:/output \ - semconvgen:$OTEL_SEMCONV_GEN_IMG_VERSION \ + otel/semconvgen:$OTEL_SEMCONV_GEN_IMG_VERSION \ -f /source code \ --template /templates/semantic_attributes.j2 \ - --output /output/$SPEC_VERSION_ESCAPED/_attributes.py \ + --output /output/$SPEC_VERSION_ESCAPED/{{snake_prefix}}_attributes.py \ --file-per-group root_namespace \ -Dfilter=is_experimental @@ -51,10 +51,10 @@ docker run --rm \ -v ${SCRIPT_DIR}/semantic-conventions/model:/source \ -v ${SCRIPT_DIR}/templates:/templates \ -v ${ROOT_DIR}/opentelemetry-semantic-conventions/src/opentelemetry/semconv/:/output \ - semconvgen:$OTEL_SEMCONV_GEN_IMG_VERSION \ + otel/semconvgen:$OTEL_SEMCONV_GEN_IMG_VERSION \ -f /source code \ --template /templates/semantic_metrics.j2 \ - --output /output/$SPEC_VERSION_ESCAPED/_metrics.py \ + --output /output/$SPEC_VERSION_ESCAPED/{{snake_prefix}}_metrics.py \ --file-per-group root_namespace \ -Dfilter=is_experimental diff --git a/scripts/semconv/templates/semantic_attributes.j2 b/scripts/semconv/templates/semantic_attributes.j2 index 09174152011..db1ec30a1d3 100644 --- a/scripts/semconv/templates/semantic_attributes.j2 +++ b/scripts/semconv/templates/semantic_attributes.j2 @@ -20,31 +20,33 @@ {{ "\"" if type == "string"}}{{value}}{{ "\"" if type == "string"}} {%- endmacro %} -from enum import Enum - -class {{ root_namespace | to_camelcase(True) }}Attributes: - {%- for attribute in filtered_attributes %} - - {% if attribute | is_template %} - {{attribute.fqn | to_const_name}}_TEMPLATE = "{{attribute.fqn}}" - {% else %} - {{attribute.fqn | to_const_name}} = "{{attribute.fqn}}" - {% endif %} - """ - {{attribute.brief | to_doc_brief}}. +{%- set enum_attributes = filtered_attributes | selectattr("is_enum", "true") | list %} +{%- if enum_attributes | count > 0 %} - {%- if attribute.note %} - Note: {{attribute.note | to_doc_brief | indent}}. - {%- endif %} - - {%- if attribute | is_deprecated %} - Deprecated: {{attribute.deprecated | to_doc_brief}}. - {%- endif %} - """ - {%- endfor %} +from enum import Enum +{%- endif %} {%- for attribute in filtered_attributes %} -{%- if attribute.is_enum %} + +{% if attribute | is_template %} +{{attribute.fqn | to_const_name}}_TEMPLATE = "{{attribute.fqn}}" +{% else %} +{{attribute.fqn | to_const_name}} = "{{attribute.fqn}}" +{%- endif %} +""" +{{attribute.brief | to_doc_brief}}. +{%- if attribute.note %} +Note: {{attribute.note | to_doc_brief | indent}}. +{%- endif %} + +{%- if attribute | is_deprecated %} +Deprecated: {{attribute.deprecated | to_doc_brief}}. +{%- endif %} +""" +{%- endfor %} +{# Extra line #} +{# Extra line #} +{%- for attribute in enum_attributes %} {%- set class_name = attribute.fqn | to_camelcase(True) ~ "Values" %} {%- set type = attribute.attr_type.enum_type %} class {{class_name}}(Enum): @@ -53,6 +55,5 @@ class {{class_name}}(Enum): """{% filter escape %}{{member.brief | to_doc_brief}}.{% endfilter %}""" {# Extra line #} {%- endfor %} -{% endif %} -{%- endfor %} +{% endfor %} {%- endif %} \ No newline at end of file