Skip to content

Fixed doc strings of SPANDATA #2084

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,43 @@ class INSTRUMENTER:
OTEL = "otel"


# See: https://develop.sentry.dev/sdk/performance/span-data-conventions/
class SPANDATA:
# An identifier for the database management system (DBMS) product being used.
# See: https://github.com/open-telemetry/opentelemetry-python/blob/e00306206ea25cf8549eca289e39e0b6ba2fa560/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py#L58
"""
Additional information describing the type of the span.
See: https://develop.sentry.dev/sdk/performance/span-data-conventions/
"""

DB_SYSTEM = "db.system"
"""
An identifier for the database management system (DBMS) product being used.
See: https://github.com/open-telemetry/opentelemetry-specification/blob/24de67b3827a4e3ab2515cd8ab62d5bcf837c586/specification/trace/semantic_conventions/database.md
Example: postgresql
"""

# A boolean indicating whether the requested data was found in the cache.
CACHE_HIT = "cache.hit"
"""
A boolean indicating whether the requested data was found in the cache.
Example: true
"""

# The size of the requested data in bytes.
CACHE_ITEM_SIZE = "cache.item_size"
"""
An identifier for the database management system (DBMS) product being used.
See: https://github.com/open-telemetry/opentelemetry-python/blob/e00306206ea25cf8549eca289e39e0b6ba2fa560/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py#L58
The size of the requested data in bytes.
Example: 58
"""

HTTP_QUERY = "http.query"
"""
The Query string present in the URL.
Example: ?foo=bar&bar=baz
"""

HTTP_FRAGMENT = "http.fragment"
"""
The Fragments present in the URL.
Example: #foo=bar
"""

HTTP_METHOD = "http.method"
"""
The HTTP method used.
Expand Down