Skip to content

Commit

Permalink
Fornat attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv committed Apr 10, 2021
1 parent 7e65087 commit 6fed934
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
25 changes: 18 additions & 7 deletions opentelemetry-api/src/opentelemetry/trace/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
"""
Expand All @@ -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.
"""
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -808,4 +820,3 @@ class RpcGrpcStatusCodeValues(Enum):

UNAUTHENTICATED = 16
"""UNAUTHENTICATED."""

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from enum import Enum


class ResourceAttributes(Enum):
CLOUD_PROVIDER = "cloud.provider"
"""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -539,4 +541,3 @@ class TelemetrySdkLanguageValues(Enum):

WEBJS = "webjs"
"""webjs."""

0 comments on commit 6fed934

Please sign in to comment.