diff --git a/opentelemetry-api/src/opentelemetry/trace/attributes.py b/opentelemetry-api/src/opentelemetry/trace/attributes.py index af2e67fdef8..1895c52add6 100644 --- a/opentelemetry-api/src/opentelemetry/trace/attributes.py +++ b/opentelemetry-api/src/opentelemetry/trace/attributes.py @@ -14,7 +14,8 @@ from enum import Enum -class SpanSemanticAttributes(Enum): + +class SpanAttributes(Enum): DB_SYSTEM = "db.system" """ An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. @@ -105,7 +106,9 @@ class SpanSemanticAttributes(Enum): Whether or not the query is idempotent. """ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = "db.cassandra.speculative_execution_count" + 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. """ @@ -254,7 +257,9 @@ class SpanSemanticAttributes(Enum): 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://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. """ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = "http.request_content_length_uncompressed" + HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = ( + "http.request_content_length_uncompressed" + ) """ The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. """ @@ -264,7 +269,9 @@ class SpanSemanticAttributes(Enum): 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://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. """ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = "http.response_content_length_uncompressed" + HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = ( + "http.response_content_length_uncompressed" + ) """ The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. """ @@ -346,12 +353,16 @@ class SpanSemanticAttributes(Enum): The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". """ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = "messaging.message_payload_size_bytes" + MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = ( + "messaging.message_payload_size_bytes" + ) """ The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. """ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = "messaging.message_payload_compressed_size_bytes" + MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = ( + "messaging.message_payload_compressed_size_bytes" + ) """ The compressed size of the message payload in bytes. """ @@ -490,6 +501,7 @@ class SpanSemanticAttributes(Enum): The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. """ + class DbSystemValues(Enum): OTHER_SQL = "other_sql" """Some other SQL database. Fallback only. See notes.""" @@ -808,4 +820,3 @@ class RpcGrpcStatusCodeValues(Enum): UNAUTHENTICATED = 16 """UNAUTHENTICATED.""" - diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/resources/attributes.py b/opentelemetry-sdk/src/opentelemetry/sdk/resources/attributes.py index 77d812f3d80..e5133893777 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/resources/attributes.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/resources/attributes.py @@ -14,6 +14,7 @@ from enum import Enum + class ResourceAttributes(Enum): CLOUD_PROVIDER = "cloud.provider" """ @@ -385,6 +386,7 @@ class ResourceAttributes(Enum): The version string of the auto instrumentation agent, if used. """ + class CloudProviderValues(Enum): AWS = "aws" """Amazon Web Services.""" @@ -539,4 +541,3 @@ class TelemetrySdkLanguageValues(Enum): WEBJS = "webjs" """webjs.""" -