Disable lettuce CONNECT spans by default (#10215)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
This commit is contained in:
parent
c418b14914
commit
f1ed419a39
|
@ -1,5 +1,6 @@
|
|||
# Settings for the Lettuce instrumentation
|
||||
|
||||
| System property | Type | Default | Description |
|
||||
| ----------------------------------------------------------- | ------- | ------- | --------------------------------------------------- |
|
||||
|-------------------------------------------------------------|---------|---------|-----------------------------------------------------|
|
||||
| `otel.instrumentation.lettuce.experimental-span-attributes` | Boolean | `false` | Enable the capture of experimental span attributes. |
|
||||
| `otel.instrumentation.lettuce.connection-telemetry.enabled` | Boolean | `false` | Enable the creation of Connect spans. |
|
||||
|
|
|
@ -20,5 +20,6 @@ dependencies {
|
|||
tasks.withType<Test>().configureEach {
|
||||
// TODO run tests both with and without experimental span attributes
|
||||
jvmArgs("-Dotel.instrumentation.lettuce.experimental-span-attributes=true")
|
||||
jvmArgs("-Dotel.instrumentation.lettuce.connection-telemetry.enabled=true")
|
||||
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
|||
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
||||
import io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesExtractor;
|
||||
import io.opentelemetry.javaagent.bootstrap.internal.CommonConfig;
|
||||
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||
|
||||
public final class LettuceSingletons {
|
||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.lettuce-4.0";
|
||||
|
@ -49,6 +50,9 @@ public final class LettuceSingletons {
|
|||
PeerServiceAttributesExtractor.create(
|
||||
netAttributesGetter, CommonConfig.get().getPeerServiceResolver()))
|
||||
.addAttributesExtractor(new LettuceConnectAttributesExtractor())
|
||||
.setEnabled(
|
||||
InstrumentationConfig.get()
|
||||
.getBoolean("otel.instrumentation.lettuce.connection-telemetry.enabled", false))
|
||||
.buildInstrumenter(SpanKindExtractor.alwaysClient());
|
||||
}
|
||||
|
||||
|
|
|
@ -25,5 +25,6 @@ dependencies {
|
|||
tasks.withType<Test>().configureEach {
|
||||
// TODO run tests both with and without experimental span attributes
|
||||
jvmArgs("-Dotel.instrumentation.lettuce.experimental-span-attributes=true")
|
||||
jvmArgs("-Dotel.instrumentation.lettuce.connection-telemetry.enabled=true")
|
||||
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
|||
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
||||
import io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesExtractor;
|
||||
import io.opentelemetry.javaagent.bootstrap.internal.CommonConfig;
|
||||
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||
|
||||
public final class LettuceSingletons {
|
||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.lettuce-5.0";
|
||||
|
@ -50,6 +51,9 @@ public final class LettuceSingletons {
|
|||
PeerServiceAttributesExtractor.create(
|
||||
connectNetworkAttributesGetter, CommonConfig.get().getPeerServiceResolver()))
|
||||
.addAttributesExtractor(new LettuceConnectAttributesExtractor())
|
||||
.setEnabled(
|
||||
InstrumentationConfig.get()
|
||||
.getBoolean("otel.instrumentation.lettuce.connection-telemetry.enabled", false))
|
||||
.buildInstrumenter(SpanKindExtractor.alwaysClient());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue