Class DbClientSpanNameExtractor<REQUEST>
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.db.DbClientSpanNameExtractor<REQUEST>
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>
public abstract class DbClientSpanNameExtractor<REQUEST>
extends Object
implements io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> create(DbClientAttributesGetter<REQUEST, ?> getter) Returns aSpanNameExtractorthat constructs the span name according to DB semantic conventions.static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> create(SqlClientAttributesGetter<REQUEST, ?> getter) Returns aSpanNameExtractorthat constructs the span name according to DB semantic conventions.static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> createWithGenericOldSpanName(SqlClientAttributesGetter<REQUEST, ?> getter) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor
extract
-
Method Details
-
create
public static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> create(DbClientAttributesGetter<REQUEST, ?> getter) Returns aSpanNameExtractorthat constructs the span name according to DB semantic conventions. -
create
public static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> create(SqlClientAttributesGetter<REQUEST, ?> getter) Returns aSpanNameExtractorthat constructs the span name according to DB semantic conventions. -
createWithGenericOldSpanName
@Deprecated public static <REQUEST> io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<REQUEST> createWithGenericOldSpanName(SqlClientAttributesGetter<REQUEST, ?> getter) Deprecated.Usecreate(SqlClientAttributesGetter)instead.Returns aSpanNameExtractorfor instrumentations that previously usedDbClientAttributesGetterand are migrating toSqlClientAttributesGetter.Unlike
create(SqlClientAttributesGetter), this method produces old semconv span names in the formatoperation namespace(without collection name), matching the behavior these instrumentations had before migration. For stable semconv, SQL parsing is used normally.Once old database semconv are dropped, callers should switch to
create(SqlClientAttributesGetter).
-
create(SqlClientAttributesGetter)instead.