Is your feature request related to a problem? Please describe.
The lettuce-5.1 library instrumentation implements Lettuce's native Tracing SPI (io.lettuce.core.tracing.Tracing) instead of using Instrumenter. InstrumenterCustomizerProvider doesn't work for lettuce-5.1
|
public synchronized Tracer.Span start() { |
|
// Set db.statement on SpanBuilder before starting span so it's available to samplers |
|
if (name != null) { |
|
String statement = |
|
sanitizer.sanitize(name, argsList != null ? argsList : splitArgs(argsString)); |
|
if (statement != null) { |
|
if (SemconvStability.emitStableDatabaseSemconv()) { |
|
spanBuilder.setAttribute(DB_QUERY_TEXT, statement); |
|
attributesBuilder.put(DB_QUERY_TEXT, statement); |
|
} |
|
if (SemconvStability.emitOldDatabaseSemconv()) { |
|
spanBuilder.setAttribute(DB_STATEMENT, statement); |
|
attributesBuilder.put(DB_STATEMENT, statement); |
|
} |
|
} |
|
} |
|
|
|
span = spanBuilder.startSpan(); |
|
spanStartNanos = System.nanoTime(); |
|
// Note: Span name cannot be set on SpanBuilder because it's set during |
|
// tracer.spanBuilder(name) call in nextSpan(), and we don't know the actual command name at |
|
// that point. We have to update the name after the span starts. |
|
if (name != null) { |
|
span.updateName(name); |
|
} |
|
|
|
if (events != null) { |
|
for (int i = 0; i < events.size(); i += 2) { |
|
span.addEvent((String) events.get(i), (Instant) events.get(i + 1)); |
|
} |
|
events = null; |
|
} |
|
|
|
if (error != null) { |
|
span.setStatus(StatusCode.ERROR); |
|
span.recordException(error); |
|
error = null; |
|
} |
|
|
|
return this; |
|
} |
Describe the solution you'd like
Introduce a dedicated SPI for lettuce-5.1 similar to InstrumenterCustomizerProvider.
Describe alternatives you've considered
Refactor lettuce-5.1 to use Instrumenter.
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Is your feature request related to a problem? Please describe.
The lettuce-5.1 library instrumentation implements Lettuce's native Tracing SPI (io.lettuce.core.tracing.Tracing) instead of using Instrumenter. InstrumenterCustomizerProvider doesn't work for lettuce-5.1
opentelemetry-java-instrumentation/instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/OpenTelemetryTracing.java
Lines 315 to 355 in 0dcdc06
Describe the solution you'd like
Introduce a dedicated SPI for lettuce-5.1 similar to InstrumenterCustomizerProvider.
Describe alternatives you've considered
Refactor lettuce-5.1 to use Instrumenter.
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.