File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
sentry_sdk/integrations/opentelemetry Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1717
1818import sentry_sdk
1919from sentry_sdk .utils import Dsn
20- from sentry_sdk .consts import SPANSTATUS
20+ from sentry_sdk .consts import SPANSTATUS , OP
2121from sentry_sdk .tracing import get_span_status_from_http_code , DEFAULT_SPAN_ORIGIN
2222from sentry_sdk .tracing_utils import Baggage
2323from sentry_sdk .integrations .opentelemetry .consts import SentrySpanAttribute
@@ -182,7 +182,7 @@ def span_data_for_db_query(span):
182182 # type: (ReadableSpan) -> OtelExtractedSpanData
183183 span_attributes = span .attributes or {}
184184
185- op = "db"
185+ op = span_attributes . get ( SentrySpanAttribute . OP , OP . DB )
186186
187187 statement = span_attributes .get (SpanAttributes .DB_STATEMENT , None )
188188 statement = cast ("Optional[str]" , statement )
You can’t perform that action at this time.
0 commit comments