Skip to content

Commit 99049a9

Browse files
almudenasanzxrmx
andauthored
replace SpanAttributes by semconv attributes (#3501)
Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent 4b9b949 commit 99049a9

File tree

1 file changed

+4
-2
lines changed
  • exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole

1 file changed

+4
-2
lines changed

exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
import opentelemetry.trace
6565
from opentelemetry.sdk.trace import ReadableSpan
6666
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
67-
from opentelemetry.semconv.trace import SpanAttributes
67+
from opentelemetry.semconv._incubating.attributes.db_attributes import (
68+
DB_STATEMENT,
69+
)
6870

6971

7072
def _ns_to_time(nanoseconds):
@@ -120,7 +122,7 @@ def _child_add_optional_attributes(child: Tree, span: ReadableSpan):
120122
label=Text.from_markup("[bold cyan]Attributes :[/bold cyan] ")
121123
)
122124
for attribute in span.attributes:
123-
if attribute == SpanAttributes.DB_STATEMENT:
125+
if attribute == DB_STATEMENT:
124126
attributes.add(
125127
Text.from_markup(f"[bold cyan]{attribute} :[/bold cyan] ")
126128
)

0 commit comments

Comments
 (0)