Skip to content

Commit 22abc0b

Browse files
committed
fix: Rename op db to db.query
1 parent cfbb8db commit 22abc0b

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class OP:
496496
CACHE_PUT = "cache.put"
497497
COHERE_CHAT_COMPLETIONS_CREATE = "ai.chat_completions.create.cohere"
498498
COHERE_EMBEDDINGS_CREATE = "ai.embeddings.create.cohere"
499-
DB = "db"
499+
DB_QUERY = "db.query"
500500
DB_REDIS = "db.redis"
501501
EVENT_DJANGO = "event.django"
502502
FUNCTION = "function"

sentry_sdk/integrations/asyncpg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async def _inner(*args: Any, **kwargs: Any) -> T:
163163
return await f(*args, **kwargs)
164164

165165
with sentry_sdk.start_span(
166-
op=OP.DB,
166+
op=OP.DB_QUERY,
167167
name="connect",
168168
origin=AsyncPGIntegration.origin,
169169
only_if_parent=True,

sentry_sdk/integrations/clickhouse_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _inner(*args: P.args, **kwargs: P.kwargs) -> T:
8585
params = args[3] if len(args) > 3 else kwargs.get("params")
8686

8787
span = sentry_sdk.start_span(
88-
op=OP.DB,
88+
op=OP.DB_QUERY,
8989
name=query,
9090
origin=ClickhouseDriverIntegration.origin,
9191
only_if_parent=True,

sentry_sdk/integrations/django/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def connect(self):
660660
sentry_sdk.add_breadcrumb(message="connect", category="query")
661661

662662
with sentry_sdk.start_span(
663-
op=OP.DB,
663+
op=OP.DB_QUERY,
664664
name="connect",
665665
origin=DjangoIntegration.origin_db,
666666
only_if_parent=True,

sentry_sdk/integrations/pymongo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ def started(self, event):
150150

151151
query = _serialize_span_attribute(command)
152152
span = sentry_sdk.start_span(
153-
op=OP.DB,
153+
op=OP.DB_QUERY,
154154
name=query,
155155
origin=PyMongoIntegration.origin,
156156
only_if_parent=True,
157157
)
158158

159159
with capture_internal_exceptions():
160160
sentry_sdk.add_breadcrumb(
161-
message=query, category="query", type=OP.DB, data=data
161+
message=query, category="query", type=OP.DB_QUERY, data=data
162162
)
163163

164164
for key, value in data.items():

sentry_sdk/opentelemetry/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def span_data_for_db_query(span):
219219
# type: (ReadableSpan) -> OtelExtractedSpanData
220220
span_attributes = span.attributes or {}
221221

222-
op = cast("str", span_attributes.get(SentrySpanAttribute.OP, OP.DB))
222+
op = cast("str", span_attributes.get(SentrySpanAttribute.OP, OP.DB_QUERY))
223223

224224
statement = span_attributes.get(SpanAttributes.DB_STATEMENT, None)
225225
statement = cast("Optional[str]", statement)

sentry_sdk/tracing_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def record_sql_queries(
151151
sentry_sdk.add_breadcrumb(message=query, category="query", data=data)
152152

153153
with sentry_sdk.start_span(
154-
op=OP.DB,
154+
op=OP.DB_QUERY,
155155
name=query,
156156
origin=span_origin,
157157
only_if_parent=True,

0 commit comments

Comments
 (0)