InstrumentationConfig part 2 (#6292)
This commit is contained in:
parent
177f0aec7c
commit
7bbe918008
|
@ -7,8 +7,8 @@ package io.opentelemetry.javaagent.instrumentation.dropwizardviews;
|
||||||
|
|
||||||
import io.dropwizard.views.View;
|
import io.dropwizard.views.View;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public final class DropwizardSingletons {
|
public final class DropwizardSingletons {
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ muzzle {
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("org.elasticsearch.client:transport:5.0.0")
|
compileOnly("org.elasticsearch.client:transport:5.0.0")
|
||||||
|
|
||||||
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
|
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:javaagent"))
|
||||||
|
|
||||||
// Ensure no cross interference
|
// Ensure no cross interference
|
||||||
testInstrumentation(project(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent"))
|
testInstrumentation(project(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent"))
|
||||||
|
|
|
@ -32,7 +32,7 @@ dependencies {
|
||||||
isTransitive = false
|
isTransitive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
|
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:javaagent"))
|
||||||
|
|
||||||
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
|
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
|
||||||
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
|
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
|
||||||
|
|
|
@ -26,7 +26,7 @@ muzzle {
|
||||||
dependencies {
|
dependencies {
|
||||||
library("org.elasticsearch.client:transport:6.0.0")
|
library("org.elasticsearch.client:transport:6.0.0")
|
||||||
|
|
||||||
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
|
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:javaagent"))
|
||||||
|
|
||||||
// Ensure no cross interference
|
// Ensure no cross interference
|
||||||
testInstrumentation(project(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent"))
|
testInstrumentation(project(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent"))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("otel.library-instrumentation")
|
id("otel.javaagent-instrumentation")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
|
@ -6,18 +6,18 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.elasticsearch.transport;
|
package io.opentelemetry.javaagent.instrumentation.elasticsearch.transport;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
|
import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.db.DbClientAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.db.DbClientAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.db.DbClientSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.db.DbClientSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import org.elasticsearch.action.ActionResponse;
|
import org.elasticsearch.action.ActionResponse;
|
||||||
|
|
||||||
public final class ElasticsearchTransportInstrumenterFactory {
|
public final class ElasticsearchTransportInstrumenterFactory {
|
||||||
private static final boolean CAPTURE_EXPERIMENTAL_SPAN_ATTRIBUTES =
|
private static final boolean CAPTURE_EXPERIMENTAL_SPAN_ATTRIBUTES =
|
||||||
Config.get()
|
InstrumentationConfig.get()
|
||||||
.getBoolean("otel.instrumentation.elasticsearch.experimental-span-attributes", false);
|
.getBoolean("otel.instrumentation.elasticsearch.experimental-span-attributes", false);
|
||||||
|
|
||||||
public static Instrumenter<ElasticTransportRequest, ActionResponse> create(
|
public static Instrumenter<ElasticTransportRequest, ActionResponse> create(
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.grails;
|
package io.opentelemetry.javaagent.instrumentation.grails;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public final class GrailsSingletons {
|
public final class GrailsSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.grails-3.0";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.grails-3.0";
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v1_0;
|
package io.opentelemetry.javaagent.instrumentation.jaxrs.v1_0;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public final class JaxrsSingletons {
|
public final class JaxrsSingletons {
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.jaxrs;
|
package io.opentelemetry.javaagent.instrumentation.jaxrs;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public final class JaxrsInstrumenterFactory {
|
public final class JaxrsInstrumenterFactory {
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.axis2;
|
package io.opentelemetry.javaagent.instrumentation.axis2;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public class Axis2Singletons {
|
public class Axis2Singletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxws-2.0-axis2-1.6";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxws-2.0-axis2-1.6";
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.cxf;
|
package io.opentelemetry.javaagent.instrumentation.cxf;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public class CxfSingletons {
|
public class CxfSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxws-2.0-cxf-3.0";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxws-2.0-cxf-3.0";
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.metro;
|
package io.opentelemetry.javaagent.instrumentation.metro;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public class MetroSingletons {
|
public class MetroSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxws-2.0-metro-2.2";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxws-2.0-metro-2.2";
|
||||||
|
|
|
@ -12,5 +12,5 @@ muzzle {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
library("javax.xml.ws:jaxws-api:2.0")
|
library("javax.xml.ws:jaxws-api:2.0")
|
||||||
implementation(project(":instrumentation:jaxws:jaxws-common:library"))
|
implementation(project(":instrumentation:jaxws:jaxws-common:javaagent"))
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
plugins {
|
||||||
|
id("otel.javaagent-instrumentation")
|
||||||
|
}
|
|
@ -6,10 +6,10 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.jaxws.common;
|
package io.opentelemetry.javaagent.instrumentation.jaxws.common;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public final class JaxWsInstrumenterFactory {
|
public final class JaxWsInstrumenterFactory {
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
plugins {
|
|
||||||
id("otel.library-instrumentation")
|
|
||||||
}
|
|
|
@ -12,5 +12,5 @@ muzzle {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
library("javax.jws:javax.jws-api:1.1")
|
library("javax.jws:javax.jws-api:1.1")
|
||||||
implementation(project(":instrumentation:jaxws:jaxws-common:library"))
|
implementation(project(":instrumentation:jaxws:jaxws-common:javaagent"))
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.jms;
|
package io.opentelemetry.javaagent.instrumentation.jms;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessageOperation;
|
import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessageOperation;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public final class JmsSingletons {
|
public final class JmsSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jms-1.1";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jms-1.1";
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.mojarra;
|
package io.opentelemetry.javaagent.instrumentation.mojarra;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.instrumentation.jsf.JsfErrorCauseExtractor;
|
import io.opentelemetry.javaagent.instrumentation.jsf.JsfErrorCauseExtractor;
|
||||||
import io.opentelemetry.javaagent.instrumentation.jsf.JsfRequest;
|
import io.opentelemetry.javaagent.instrumentation.jsf.JsfRequest;
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.myfaces;
|
package io.opentelemetry.javaagent.instrumentation.myfaces;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.instrumentation.jsf.JsfRequest;
|
import io.opentelemetry.javaagent.instrumentation.jsf.JsfRequest;
|
||||||
|
|
||||||
public class MyFacesSingletons {
|
public class MyFacesSingletons {
|
||||||
|
|
|
@ -8,6 +8,7 @@ package io.opentelemetry.javaagent.instrumentation.kafkaclients;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||||
|
@ -30,7 +31,9 @@ public final class KafkaSingletons {
|
||||||
.setCaptureExperimentalSpanAttributes(
|
.setCaptureExperimentalSpanAttributes(
|
||||||
InstrumentationConfig.get()
|
InstrumentationConfig.get()
|
||||||
.getBoolean("otel.instrumentation.kafka.experimental-span-attributes", false))
|
.getBoolean("otel.instrumentation.kafka.experimental-span-attributes", false))
|
||||||
.setPropagationEnabled(PROPAGATION_ENABLED);
|
.setPropagationEnabled(PROPAGATION_ENABLED)
|
||||||
|
.setMessagingReceiveInstrumentationEnabled(
|
||||||
|
ExperimentalConfig.get().messagingReceiveInstrumentationEnabled());
|
||||||
PRODUCER_INSTRUMENTER = instrumenterFactory.createProducerInstrumenter();
|
PRODUCER_INSTRUMENTER = instrumenterFactory.createProducerInstrumenter();
|
||||||
CONSUMER_RECEIVE_INSTRUMENTER = instrumenterFactory.createConsumerReceiveInstrumenter();
|
CONSUMER_RECEIVE_INSTRUMENTER = instrumenterFactory.createConsumerReceiveInstrumenter();
|
||||||
CONSUMER_PROCESS_INSTRUMENTER = instrumenterFactory.createConsumerProcessInstrumenter();
|
CONSUMER_PROCESS_INSTRUMENTER = instrumenterFactory.createConsumerProcessInstrumenter();
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
package io.opentelemetry.instrumentation.kafka.internal;
|
package io.opentelemetry.instrumentation.kafka.internal;
|
||||||
|
|
||||||
import io.opentelemetry.api.OpenTelemetry;
|
import io.opentelemetry.api.OpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.ErrorCauseExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.ErrorCauseExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
@ -32,6 +31,7 @@ public final class KafkaInstrumenterFactory {
|
||||||
private ErrorCauseExtractor errorCauseExtractor = ErrorCauseExtractor.jdk();
|
private ErrorCauseExtractor errorCauseExtractor = ErrorCauseExtractor.jdk();
|
||||||
private boolean captureExperimentalSpanAttributes = false;
|
private boolean captureExperimentalSpanAttributes = false;
|
||||||
private boolean propagationEnabled = true;
|
private boolean propagationEnabled = true;
|
||||||
|
private boolean messagingReceiveInstrumentationEnabled = false;
|
||||||
|
|
||||||
public KafkaInstrumenterFactory(OpenTelemetry openTelemetry, String instrumentationName) {
|
public KafkaInstrumenterFactory(OpenTelemetry openTelemetry, String instrumentationName) {
|
||||||
this.openTelemetry = openTelemetry;
|
this.openTelemetry = openTelemetry;
|
||||||
|
@ -54,6 +54,12 @@ public final class KafkaInstrumenterFactory {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public KafkaInstrumenterFactory setMessagingReceiveInstrumentationEnabled(
|
||||||
|
boolean messagingReceiveInstrumentationEnabled) {
|
||||||
|
this.messagingReceiveInstrumentationEnabled = messagingReceiveInstrumentationEnabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Instrumenter<ProducerRecord<?, ?>, Void> createProducerInstrumenter() {
|
public Instrumenter<ProducerRecord<?, ?>, Void> createProducerInstrumenter() {
|
||||||
return createProducerInstrumenter(Collections.emptyList());
|
return createProducerInstrumenter(Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
@ -85,7 +91,7 @@ public final class KafkaInstrumenterFactory {
|
||||||
MessagingSpanNameExtractor.create(getter, operation))
|
MessagingSpanNameExtractor.create(getter, operation))
|
||||||
.addAttributesExtractor(MessagingAttributesExtractor.create(getter, operation))
|
.addAttributesExtractor(MessagingAttributesExtractor.create(getter, operation))
|
||||||
.setErrorCauseExtractor(errorCauseExtractor)
|
.setErrorCauseExtractor(errorCauseExtractor)
|
||||||
.setEnabled(ExperimentalConfig.get().messagingReceiveInstrumentationEnabled())
|
.setEnabled(messagingReceiveInstrumentationEnabled)
|
||||||
.newInstrumenter(SpanKindExtractor.alwaysConsumer());
|
.newInstrumenter(SpanKindExtractor.alwaysConsumer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +120,7 @@ public final class KafkaInstrumenterFactory {
|
||||||
|
|
||||||
if (!propagationEnabled) {
|
if (!propagationEnabled) {
|
||||||
return builder.newInstrumenter(SpanKindExtractor.alwaysConsumer());
|
return builder.newInstrumenter(SpanKindExtractor.alwaysConsumer());
|
||||||
} else if (ExperimentalConfig.get().messagingReceiveInstrumentationEnabled()) {
|
} else if (messagingReceiveInstrumentationEnabled) {
|
||||||
builder.addSpanLinksExtractor(
|
builder.addSpanLinksExtractor(
|
||||||
SpanLinksExtractor.extractFromRequest(
|
SpanLinksExtractor.extractFromRequest(
|
||||||
openTelemetry.getPropagators().getTextMapPropagator(),
|
openTelemetry.getPropagators().getTextMapPropagator(),
|
||||||
|
|
|
@ -8,6 +8,7 @@ package io.opentelemetry.javaagent.instrumentation.kafkastreams;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||||
|
|
||||||
|
@ -23,6 +24,8 @@ public final class KafkaStreamsSingletons {
|
||||||
.setPropagationEnabled(
|
.setPropagationEnabled(
|
||||||
InstrumentationConfig.get()
|
InstrumentationConfig.get()
|
||||||
.getBoolean("otel.instrumentation.kafka.client-propagation.enabled", true))
|
.getBoolean("otel.instrumentation.kafka.client-propagation.enabled", true))
|
||||||
|
.setMessagingReceiveInstrumentationEnabled(
|
||||||
|
ExperimentalConfig.get().messagingReceiveInstrumentationEnabled())
|
||||||
.createConsumerProcessInstrumenter();
|
.createConsumerProcessInstrumenter();
|
||||||
|
|
||||||
public static Instrumenter<ConsumerRecord<?, ?>, Void> instrumenter() {
|
public static Instrumenter<ConsumerRecord<?, ?>, Void> instrumenter() {
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.netty.v4_0.client;
|
package io.opentelemetry.javaagent.instrumentation.netty.v4_0.client;
|
||||||
|
|
||||||
import io.netty.handler.codec.http.HttpResponse;
|
import io.netty.handler.codec.http.HttpResponse;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.internal.DeprecatedConfigPropertyWarning;
|
import io.opentelemetry.javaagent.bootstrap.internal.DeprecatedConfigPropertyWarning;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.HttpRequestAndChannel;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.HttpRequestAndChannel;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyClientInstrumenterFactory;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyClientInstrumenterFactory;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyConnectionInstrumenter;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyConnectionInstrumenter;
|
||||||
|
@ -20,7 +20,7 @@ public final class NettyClientSingletons {
|
||||||
private static final boolean sslTelemetryEnabled;
|
private static final boolean sslTelemetryEnabled;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Config config = Config.get();
|
InstrumentationConfig config = InstrumentationConfig.get();
|
||||||
DeprecatedConfigPropertyWarning.warnIfUsed(
|
DeprecatedConfigPropertyWarning.warnIfUsed(
|
||||||
config,
|
config,
|
||||||
"otel.instrumentation.netty.always-create-connect-span",
|
"otel.instrumentation.netty.always-create-connect-span",
|
||||||
|
|
|
@ -7,9 +7,9 @@ package io.opentelemetry.javaagent.instrumentation.netty.v4_1.client;
|
||||||
|
|
||||||
import io.netty.handler.codec.http.HttpResponse;
|
import io.netty.handler.codec.http.HttpResponse;
|
||||||
import io.netty.util.AttributeKey;
|
import io.netty.util.AttributeKey;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.internal.DeprecatedConfigPropertyWarning;
|
import io.opentelemetry.javaagent.bootstrap.internal.DeprecatedConfigPropertyWarning;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.HttpRequestAndChannel;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.HttpRequestAndChannel;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyClientInstrumenterFactory;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyClientInstrumenterFactory;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyConnectionInstrumenter;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyConnectionInstrumenter;
|
||||||
|
@ -26,7 +26,7 @@ public final class NettyClientSingletons {
|
||||||
private static final boolean sslTelemetryEnabled;
|
private static final boolean sslTelemetryEnabled;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Config config = Config.get();
|
InstrumentationConfig config = InstrumentationConfig.get();
|
||||||
DeprecatedConfigPropertyWarning.warnIfUsed(
|
DeprecatedConfigPropertyWarning.warnIfUsed(
|
||||||
config,
|
config,
|
||||||
"otel.instrumentation.netty.always-create-connect-span",
|
"otel.instrumentation.netty.always-create-connect-span",
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.reactornetty.v1_0;
|
package io.opentelemetry.javaagent.instrumentation.reactornetty.v1_0;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.PeerServiceAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.PeerServiceAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
||||||
|
@ -15,7 +14,8 @@ import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientMetrics;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanStatusExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanStatusExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.internal.DeprecatedConfigPropertyWarning;
|
import io.opentelemetry.javaagent.bootstrap.internal.DeprecatedConfigPropertyWarning;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyClientInstrumenterFactory;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyClientInstrumenterFactory;
|
||||||
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyConnectionInstrumenter;
|
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.client.NettyConnectionInstrumenter;
|
||||||
import reactor.netty.http.client.HttpClientConfig;
|
import reactor.netty.http.client.HttpClientConfig;
|
||||||
|
@ -28,7 +28,7 @@ public final class ReactorNettySingletons {
|
||||||
private static final boolean connectionTelemetryEnabled;
|
private static final boolean connectionTelemetryEnabled;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Config config = Config.get();
|
InstrumentationConfig config = InstrumentationConfig.get();
|
||||||
DeprecatedConfigPropertyWarning.warnIfUsed(
|
DeprecatedConfigPropertyWarning.warnIfUsed(
|
||||||
config,
|
config,
|
||||||
"otel.instrumentation.reactor-netty.always-create-connect-span",
|
"otel.instrumentation.reactor-netty.always-create-connect-span",
|
||||||
|
|
|
@ -22,7 +22,12 @@ public final class SpringIntegrationSingletons {
|
||||||
singletonList("*"));
|
singletonList("*"));
|
||||||
|
|
||||||
private static final ChannelInterceptor INTERCEPTOR =
|
private static final ChannelInterceptor INTERCEPTOR =
|
||||||
SpringIntegrationTelemetry.create(GlobalOpenTelemetry.get()).newChannelInterceptor();
|
SpringIntegrationTelemetry.builder(GlobalOpenTelemetry.get())
|
||||||
|
.setProducerSpanEnabled(
|
||||||
|
InstrumentationConfig.get()
|
||||||
|
.getBoolean("otel.instrumentation.spring-integration.producer.enabled", false))
|
||||||
|
.build()
|
||||||
|
.newChannelInterceptor();
|
||||||
|
|
||||||
public static String[] patterns() {
|
public static String[] patterns() {
|
||||||
return PATTERNS.toArray(new String[0]);
|
return PATTERNS.toArray(new String[0]);
|
||||||
|
|
|
@ -17,26 +17,8 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
val testWithProducerInstrumentation by registering(Test::class) {
|
|
||||||
filter {
|
|
||||||
includeTestsMatching("SpringCloudStreamProducerTest")
|
|
||||||
}
|
|
||||||
include("**/SpringCloudStreamProducerTest.*")
|
|
||||||
jvmArgs("-Dotel.instrumentation.spring-integration.producer.enabled=true")
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
|
||||||
filter {
|
|
||||||
excludeTestsMatching("SpringCloudStreamProducerTest")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
check {
|
|
||||||
dependsOn(testWithProducerInstrumentation)
|
|
||||||
}
|
|
||||||
|
|
||||||
withType<Test>().configureEach {
|
withType<Test>().configureEach {
|
||||||
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
|
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
|
||||||
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
|
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,14 +34,17 @@ public final class SpringIntegrationTelemetry {
|
||||||
private final ContextPropagators propagators;
|
private final ContextPropagators propagators;
|
||||||
private final Instrumenter<MessageWithChannel, Void> consumerInstrumenter;
|
private final Instrumenter<MessageWithChannel, Void> consumerInstrumenter;
|
||||||
private final Instrumenter<MessageWithChannel, Void> producerInstrumenter;
|
private final Instrumenter<MessageWithChannel, Void> producerInstrumenter;
|
||||||
|
private final boolean producerSpanEnabled;
|
||||||
|
|
||||||
SpringIntegrationTelemetry(
|
SpringIntegrationTelemetry(
|
||||||
ContextPropagators propagators,
|
ContextPropagators propagators,
|
||||||
Instrumenter<MessageWithChannel, Void> consumerInstrumenter,
|
Instrumenter<MessageWithChannel, Void> consumerInstrumenter,
|
||||||
Instrumenter<MessageWithChannel, Void> producerInstrumenter) {
|
Instrumenter<MessageWithChannel, Void> producerInstrumenter,
|
||||||
|
boolean producerSpanEnabled) {
|
||||||
this.propagators = propagators;
|
this.propagators = propagators;
|
||||||
this.consumerInstrumenter = consumerInstrumenter;
|
this.consumerInstrumenter = consumerInstrumenter;
|
||||||
this.producerInstrumenter = producerInstrumenter;
|
this.producerInstrumenter = producerInstrumenter;
|
||||||
|
this.producerSpanEnabled = producerSpanEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,6 +57,7 @@ public final class SpringIntegrationTelemetry {
|
||||||
* @see org.springframework.integration.config.GlobalChannelInterceptor
|
* @see org.springframework.integration.config.GlobalChannelInterceptor
|
||||||
*/
|
*/
|
||||||
public ChannelInterceptor newChannelInterceptor() {
|
public ChannelInterceptor newChannelInterceptor() {
|
||||||
return new TracingChannelInterceptor(propagators, consumerInstrumenter, producerInstrumenter);
|
return new TracingChannelInterceptor(
|
||||||
|
propagators, consumerInstrumenter, producerInstrumenter, producerSpanEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
package io.opentelemetry.instrumentation.spring.integration;
|
package io.opentelemetry.instrumentation.spring.integration;
|
||||||
|
|
||||||
import io.opentelemetry.api.OpenTelemetry;
|
import io.opentelemetry.api.OpenTelemetry;
|
||||||
|
import io.opentelemetry.api.trace.SpanKind;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
|
||||||
|
@ -22,6 +23,8 @@ public final class SpringIntegrationTelemetryBuilder {
|
||||||
private final List<AttributesExtractor<MessageWithChannel, Void>> additionalAttributeExtractors =
|
private final List<AttributesExtractor<MessageWithChannel, Void>> additionalAttributeExtractors =
|
||||||
new ArrayList<>();
|
new ArrayList<>();
|
||||||
|
|
||||||
|
private boolean producerSpanEnabled = false;
|
||||||
|
|
||||||
SpringIntegrationTelemetryBuilder(OpenTelemetry openTelemetry) {
|
SpringIntegrationTelemetryBuilder(OpenTelemetry openTelemetry) {
|
||||||
this.openTelemetry = openTelemetry;
|
this.openTelemetry = openTelemetry;
|
||||||
}
|
}
|
||||||
|
@ -36,6 +39,15 @@ public final class SpringIntegrationTelemetryBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether additional {@link SpanKind#PRODUCER PRODUCER} span should be emitted by this
|
||||||
|
* instrumentation.
|
||||||
|
*/
|
||||||
|
public SpringIntegrationTelemetryBuilder setProducerSpanEnabled(boolean producerSpanEnabled) {
|
||||||
|
this.producerSpanEnabled = producerSpanEnabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private static String consumerSpanName(MessageWithChannel messageWithChannel) {
|
private static String consumerSpanName(MessageWithChannel messageWithChannel) {
|
||||||
return messageWithChannel.getChannelName() + " process";
|
return messageWithChannel.getChannelName() + " process";
|
||||||
}
|
}
|
||||||
|
@ -71,6 +83,9 @@ public final class SpringIntegrationTelemetryBuilder {
|
||||||
SpringMessagingAttributesGetter.INSTANCE, MessageOperation.SEND))
|
SpringMessagingAttributesGetter.INSTANCE, MessageOperation.SEND))
|
||||||
.newInstrumenter(SpanKindExtractor.alwaysProducer());
|
.newInstrumenter(SpanKindExtractor.alwaysProducer());
|
||||||
return new SpringIntegrationTelemetry(
|
return new SpringIntegrationTelemetry(
|
||||||
openTelemetry.getPropagators(), consumerInstrumenter, producerInstrumenter);
|
openTelemetry.getPropagators(),
|
||||||
|
consumerInstrumenter,
|
||||||
|
producerInstrumenter,
|
||||||
|
producerSpanEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ package io.opentelemetry.instrumentation.spring.integration;
|
||||||
import io.opentelemetry.api.trace.Span;
|
import io.opentelemetry.api.trace.Span;
|
||||||
import io.opentelemetry.context.Context;
|
import io.opentelemetry.context.Context;
|
||||||
import io.opentelemetry.context.propagation.ContextPropagators;
|
import io.opentelemetry.context.propagation.ContextPropagators;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import java.lang.invoke.MethodHandle;
|
import java.lang.invoke.MethodHandle;
|
||||||
import java.lang.invoke.MethodHandles;
|
import java.lang.invoke.MethodHandles;
|
||||||
|
@ -29,23 +28,23 @@ import org.springframework.util.LinkedMultiValueMap;
|
||||||
|
|
||||||
final class TracingChannelInterceptor implements ExecutorChannelInterceptor {
|
final class TracingChannelInterceptor implements ExecutorChannelInterceptor {
|
||||||
|
|
||||||
private static final boolean PRODUCER_SPAN_ENABLED =
|
|
||||||
Config.get().getBoolean("otel.instrumentation.spring-integration.producer.enabled", false);
|
|
||||||
|
|
||||||
private static final ThreadLocal<Map<MessageChannel, ContextAndScope>> LOCAL_CONTEXT_AND_SCOPE =
|
private static final ThreadLocal<Map<MessageChannel, ContextAndScope>> LOCAL_CONTEXT_AND_SCOPE =
|
||||||
ThreadLocal.withInitial(IdentityHashMap::new);
|
ThreadLocal.withInitial(IdentityHashMap::new);
|
||||||
|
|
||||||
private final ContextPropagators propagators;
|
private final ContextPropagators propagators;
|
||||||
private final Instrumenter<MessageWithChannel, Void> consumerInstrumenter;
|
private final Instrumenter<MessageWithChannel, Void> consumerInstrumenter;
|
||||||
private final Instrumenter<MessageWithChannel, Void> producerInstrumenter;
|
private final Instrumenter<MessageWithChannel, Void> producerInstrumenter;
|
||||||
|
private final boolean producerSpanEnabled;
|
||||||
|
|
||||||
TracingChannelInterceptor(
|
TracingChannelInterceptor(
|
||||||
ContextPropagators propagators,
|
ContextPropagators propagators,
|
||||||
Instrumenter<MessageWithChannel, Void> consumerInstrumenter,
|
Instrumenter<MessageWithChannel, Void> consumerInstrumenter,
|
||||||
Instrumenter<MessageWithChannel, Void> producerInstrumenter) {
|
Instrumenter<MessageWithChannel, Void> producerInstrumenter,
|
||||||
|
boolean producerSpanEnabled) {
|
||||||
this.propagators = propagators;
|
this.propagators = propagators;
|
||||||
this.consumerInstrumenter = consumerInstrumenter;
|
this.consumerInstrumenter = consumerInstrumenter;
|
||||||
this.producerInstrumenter = producerInstrumenter;
|
this.producerInstrumenter = producerInstrumenter;
|
||||||
|
this.producerSpanEnabled = producerSpanEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -230,8 +229,8 @@ final class TracingChannelInterceptor implements ExecutorChannelInterceptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean createProducerSpan(MessageChannel messageChannel) {
|
private boolean createProducerSpan(MessageChannel messageChannel) {
|
||||||
if (!PRODUCER_SPAN_ENABLED) {
|
if (!producerSpanEnabled) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright The OpenTelemetry Authors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
import io.opentelemetry.api.GlobalOpenTelemetry
|
||||||
|
import io.opentelemetry.instrumentation.spring.integration.SpringIntegrationTelemetry
|
||||||
|
import org.springframework.context.annotation.Bean
|
||||||
|
import org.springframework.context.annotation.Configuration
|
||||||
|
import org.springframework.integration.config.GlobalChannelInterceptor
|
||||||
|
import org.springframework.messaging.support.ChannelInterceptor
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
class GlobalInterceptorWithProducerSpanSpringConfig {
|
||||||
|
|
||||||
|
@GlobalChannelInterceptor
|
||||||
|
@Bean
|
||||||
|
ChannelInterceptor otelInterceptor() {
|
||||||
|
SpringIntegrationTelemetry.builder(GlobalOpenTelemetry.get())
|
||||||
|
.setProducerSpanEnabled(true)
|
||||||
|
.build()
|
||||||
|
.newChannelInterceptor()
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,6 @@ import io.opentelemetry.instrumentation.test.LibraryTestTrait
|
||||||
class SpringCloudStreamProducerTest extends AbstractSpringCloudStreamProducerTest implements LibraryTestTrait {
|
class SpringCloudStreamProducerTest extends AbstractSpringCloudStreamProducerTest implements LibraryTestTrait {
|
||||||
@Override
|
@Override
|
||||||
Class<?> additionalContextClass() {
|
Class<?> additionalContextClass() {
|
||||||
GlobalInterceptorSpringConfig
|
GlobalInterceptorWithProducerSpanSpringConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ package io.opentelemetry.javaagent.instrumentation.spring.kafka;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||||
|
@ -28,6 +29,8 @@ public final class SpringKafkaSingletons {
|
||||||
.setPropagationEnabled(
|
.setPropagationEnabled(
|
||||||
InstrumentationConfig.get()
|
InstrumentationConfig.get()
|
||||||
.getBoolean("otel.instrumentation.kafka.client-propagation.enabled", true))
|
.getBoolean("otel.instrumentation.kafka.client-propagation.enabled", true))
|
||||||
|
.setMessagingReceiveInstrumentationEnabled(
|
||||||
|
ExperimentalConfig.get().messagingReceiveInstrumentationEnabled())
|
||||||
.setErrorCauseExtractor(SpringKafkaErrorCauseExtractor.INSTANCE);
|
.setErrorCauseExtractor(SpringKafkaErrorCauseExtractor.INSTANCE);
|
||||||
BATCH_PROCESS_INSTRUMENTER = factory.createBatchProcessInstrumenter();
|
BATCH_PROCESS_INSTRUMENTER = factory.createBatchProcessInstrumenter();
|
||||||
PROCESS_INSTRUMENTER = factory.createConsumerProcessInstrumenter();
|
PROCESS_INSTRUMENTER = factory.createConsumerProcessInstrumenter();
|
||||||
|
|
|
@ -7,13 +7,19 @@ package io.opentelemetry.javaagent.instrumentation.spring.webflux.client;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.spring.webflux.client.SpringWebfluxTelemetry;
|
import io.opentelemetry.instrumentation.spring.webflux.client.SpringWebfluxTelemetry;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
|
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
|
||||||
|
|
||||||
public class WebClientHelper {
|
public class WebClientHelper {
|
||||||
|
|
||||||
private static final SpringWebfluxTelemetry INSTRUMENTATION =
|
private static final SpringWebfluxTelemetry INSTRUMENTATION =
|
||||||
SpringWebfluxTelemetry.create(GlobalOpenTelemetry.get());
|
SpringWebfluxTelemetry.builder(GlobalOpenTelemetry.get())
|
||||||
|
.setCaptureExperimentalSpanAttributes(
|
||||||
|
InstrumentationConfig.get()
|
||||||
|
.getBoolean(
|
||||||
|
"otel.instrumentation.spring-webflux.experimental-span-attributes", false))
|
||||||
|
.build();
|
||||||
|
|
||||||
public static void addFilter(List<ExchangeFilterFunction> exchangeFilterFunctions) {
|
public static void addFilter(List<ExchangeFilterFunction> exchangeFilterFunctions) {
|
||||||
INSTRUMENTATION.addClientTracingFilter(exchangeFilterFunctions);
|
INSTRUMENTATION.addClientTracingFilter(exchangeFilterFunctions);
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.spring.webflux.server;
|
package io.opentelemetry.javaagent.instrumentation.spring.webflux.server;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
|
import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpRouteGetter;
|
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpRouteGetter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.instrumentation.spring.webflux.SpringWebfluxConfig;
|
import io.opentelemetry.javaagent.instrumentation.spring.webflux.SpringWebfluxConfig;
|
||||||
import org.springframework.web.reactive.HandlerMapping;
|
import org.springframework.web.reactive.HandlerMapping;
|
||||||
import org.springframework.web.server.ServerWebExchange;
|
import org.springframework.web.server.ServerWebExchange;
|
||||||
|
|
|
@ -10,7 +10,6 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey;
|
||||||
import io.opentelemetry.api.common.AttributeKey;
|
import io.opentelemetry.api.common.AttributeKey;
|
||||||
import io.opentelemetry.api.common.AttributesBuilder;
|
import io.opentelemetry.api.common.AttributesBuilder;
|
||||||
import io.opentelemetry.context.Context;
|
import io.opentelemetry.context.Context;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import org.springframework.web.reactive.function.client.ClientRequest;
|
import org.springframework.web.reactive.function.client.ClientRequest;
|
||||||
|
@ -24,11 +23,6 @@ final class SpringWebfluxExperimentalAttributesExtractor
|
||||||
private static final AttributeKey<String> SPRING_WEBFLUX_MESSAGE =
|
private static final AttributeKey<String> SPRING_WEBFLUX_MESSAGE =
|
||||||
stringKey("spring-webflux.message");
|
stringKey("spring-webflux.message");
|
||||||
|
|
||||||
public static boolean enabled() {
|
|
||||||
return Config.get()
|
|
||||||
.getBoolean("otel.instrumentation.spring-webflux.experimental-span-attributes", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(AttributesBuilder attributes, Context parentContext, ClientRequest request) {}
|
public void onStart(AttributesBuilder attributes, Context parentContext, ClientRequest request) {}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@ public final class SpringWebfluxTelemetryBuilder {
|
||||||
httpAttributesExtractorBuilder =
|
httpAttributesExtractorBuilder =
|
||||||
HttpClientAttributesExtractor.builder(SpringWebfluxHttpAttributesGetter.INSTANCE);
|
HttpClientAttributesExtractor.builder(SpringWebfluxHttpAttributesGetter.INSTANCE);
|
||||||
|
|
||||||
|
private boolean captureExperimentalSpanAttributes = false;
|
||||||
|
|
||||||
SpringWebfluxTelemetryBuilder(OpenTelemetry openTelemetry) {
|
SpringWebfluxTelemetryBuilder(OpenTelemetry openTelemetry) {
|
||||||
this.openTelemetry = openTelemetry;
|
this.openTelemetry = openTelemetry;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +69,17 @@ public final class SpringWebfluxTelemetryBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether experimental attributes should be set to spans. These attributes may be changed or
|
||||||
|
* removed in the future, so only enable this if you know you do not require attributes filled by
|
||||||
|
* this instrumentation to be stable across versions.
|
||||||
|
*/
|
||||||
|
public SpringWebfluxTelemetryBuilder setCaptureExperimentalSpanAttributes(
|
||||||
|
boolean captureExperimentalSpanAttributes) {
|
||||||
|
this.captureExperimentalSpanAttributes = captureExperimentalSpanAttributes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new {@link SpringWebfluxTelemetry} with the settings of this {@link
|
* Returns a new {@link SpringWebfluxTelemetry} with the settings of this {@link
|
||||||
* SpringWebfluxTelemetryBuilder}.
|
* SpringWebfluxTelemetryBuilder}.
|
||||||
|
@ -90,7 +103,7 @@ public final class SpringWebfluxTelemetryBuilder {
|
||||||
.addAttributesExtractors(additionalExtractors)
|
.addAttributesExtractors(additionalExtractors)
|
||||||
.addOperationMetrics(HttpClientMetrics.get());
|
.addOperationMetrics(HttpClientMetrics.get());
|
||||||
|
|
||||||
if (SpringWebfluxExperimentalAttributesExtractor.enabled()) {
|
if (captureExperimentalSpanAttributes) {
|
||||||
builder.addAttributesExtractor(new SpringWebfluxExperimentalAttributesExtractor());
|
builder.addAttributesExtractor(new SpringWebfluxExperimentalAttributesExtractor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.springwebmvc;
|
package io.opentelemetry.javaagent.instrumentation.springwebmvc;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
public final class SpringWebMvcSingletons {
|
public final class SpringWebMvcSingletons {
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.spring.ws;
|
package io.opentelemetry.javaagent.instrumentation.spring.ws;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public class SpringWsSingletons {
|
public class SpringWsSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.spring-ws-2.0";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.spring-ws-2.0";
|
||||||
|
|
|
@ -7,10 +7,10 @@ package io.opentelemetry.javaagent.instrumentation.struts2;
|
||||||
|
|
||||||
import com.opensymphony.xwork2.ActionInvocation;
|
import com.opensymphony.xwork2.ActionInvocation;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public class StrutsSingletons {
|
public class StrutsSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.struts-2.3";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.struts-2.3";
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.tapestry;
|
package io.opentelemetry.javaagent.instrumentation.tapestry;
|
||||||
|
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.ErrorCauseExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.ErrorCauseExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import org.apache.tapestry5.runtime.ComponentEventException;
|
import org.apache.tapestry5.runtime.ComponentEventException;
|
||||||
|
|
||||||
public class TapestrySingletons {
|
public class TapestrySingletons {
|
||||||
|
|
|
@ -8,11 +8,11 @@ package io.opentelemetry.javaagent.instrumentation.vaadin;
|
||||||
import com.vaadin.flow.server.communication.rpc.RpcInvocationHandler;
|
import com.vaadin.flow.server.communication.rpc.RpcInvocationHandler;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.context.ContextKey;
|
import io.opentelemetry.context.ContextKey;
|
||||||
import io.opentelemetry.instrumentation.api.config.ExperimentalConfig;
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeAttributesExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||||
import io.opentelemetry.instrumentation.api.util.SpanNames;
|
import io.opentelemetry.instrumentation.api.util.SpanNames;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
|
|
||||||
public class VaadinSingletons {
|
public class VaadinSingletons {
|
||||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.vaadin-14.2";
|
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.vaadin-14.2";
|
||||||
|
|
|
@ -8,6 +8,7 @@ package io.opentelemetry.javaagent.instrumentation.vertx.kafka.v3_6;
|
||||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||||
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
import io.opentelemetry.instrumentation.kafka.internal.KafkaInstrumenterFactory;
|
||||||
|
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
|
||||||
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||||
|
@ -27,7 +28,9 @@ public final class VertxKafkaSingletons {
|
||||||
.getBoolean("otel.instrumentation.kafka.experimental-span-attributes", false))
|
.getBoolean("otel.instrumentation.kafka.experimental-span-attributes", false))
|
||||||
.setPropagationEnabled(
|
.setPropagationEnabled(
|
||||||
InstrumentationConfig.get()
|
InstrumentationConfig.get()
|
||||||
.getBoolean("otel.instrumentation.kafka.client-propagation.enabled", true));
|
.getBoolean("otel.instrumentation.kafka.client-propagation.enabled", true))
|
||||||
|
.setMessagingReceiveInstrumentationEnabled(
|
||||||
|
ExperimentalConfig.get().messagingReceiveInstrumentationEnabled());
|
||||||
BATCH_PROCESS_INSTRUMENTER = factory.createBatchProcessInstrumenter();
|
BATCH_PROCESS_INSTRUMENTER = factory.createBatchProcessInstrumenter();
|
||||||
PROCESS_INSTRUMENTER = factory.createConsumerProcessInstrumenter();
|
PROCESS_INSTRUMENTER = factory.createConsumerProcessInstrumenter();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,25 +3,23 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.opentelemetry.instrumentation.api.internal;
|
package io.opentelemetry.javaagent.bootstrap.internal;
|
||||||
|
|
||||||
import static java.util.logging.Level.WARNING;
|
import static java.util.logging.Level.WARNING;
|
||||||
|
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
|
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
|
||||||
* any time.
|
* any time.
|
||||||
*/
|
*/
|
||||||
// TODO: move to javaagent-extension-api internal package
|
|
||||||
public final class DeprecatedConfigPropertyWarning {
|
public final class DeprecatedConfigPropertyWarning {
|
||||||
|
|
||||||
private static final Logger logger =
|
private static final Logger logger =
|
||||||
Logger.getLogger(DeprecatedConfigPropertyWarning.class.getName());
|
Logger.getLogger(DeprecatedConfigPropertyWarning.class.getName());
|
||||||
|
|
||||||
public static void warnIfUsed(
|
public static void warnIfUsed(
|
||||||
Config config, String deprecatedPropertyName, String newPropertyName) {
|
InstrumentationConfig config, String deprecatedPropertyName, String newPropertyName) {
|
||||||
if (config.getString(deprecatedPropertyName) != null) {
|
if (config.getString(deprecatedPropertyName) != null) {
|
||||||
logger.log(
|
logger.log(
|
||||||
WARNING,
|
WARNING,
|
|
@ -3,23 +3,25 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.opentelemetry.instrumentation.api.config;
|
package io.opentelemetry.javaagent.bootstrap.internal;
|
||||||
|
|
||||||
import io.opentelemetry.instrumentation.api.internal.DeprecatedConfigPropertyWarning;
|
/**
|
||||||
|
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
|
||||||
// TODO: move to javaagent-extension-api internal package
|
* any time.
|
||||||
|
*/
|
||||||
public final class ExperimentalConfig {
|
public final class ExperimentalConfig {
|
||||||
|
|
||||||
private static final ExperimentalConfig instance = new ExperimentalConfig(Config.get());
|
private static final ExperimentalConfig instance =
|
||||||
|
new ExperimentalConfig(InstrumentationConfig.get());
|
||||||
|
|
||||||
private final Config config;
|
private final InstrumentationConfig config;
|
||||||
|
|
||||||
/** Returns the global agent configuration. */
|
/** Returns the global agent configuration. */
|
||||||
public static ExperimentalConfig get() {
|
public static ExperimentalConfig get() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExperimentalConfig(Config config) {
|
public ExperimentalConfig(InstrumentationConfig config) {
|
||||||
this.config = config;
|
this.config = config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@ include(":instrumentation:elasticsearch:elasticsearch-rest-common:javaagent")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent")
|
include(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-rest-6.4:javaagent")
|
include(":instrumentation:elasticsearch:elasticsearch-rest-6.4:javaagent")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-rest-7.0:javaagent")
|
include(":instrumentation:elasticsearch:elasticsearch-rest-7.0:javaagent")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-transport-common:library")
|
include(":instrumentation:elasticsearch:elasticsearch-transport-common:javaagent")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-transport-common:testing")
|
include(":instrumentation:elasticsearch:elasticsearch-transport-common:testing")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-transport-5.0:javaagent")
|
include(":instrumentation:elasticsearch:elasticsearch-transport-5.0:javaagent")
|
||||||
include(":instrumentation:elasticsearch:elasticsearch-transport-5.3:javaagent")
|
include(":instrumentation:elasticsearch:elasticsearch-transport-5.3:javaagent")
|
||||||
|
@ -273,7 +273,7 @@ include(":instrumentation:jaxws:jaxws-2.0-metro-2.2:javaagent")
|
||||||
include(":instrumentation:jaxws:jaxws-2.0-common-testing")
|
include(":instrumentation:jaxws:jaxws-2.0-common-testing")
|
||||||
include(":instrumentation:jaxws:jaxws-2.0-tomee-testing")
|
include(":instrumentation:jaxws:jaxws-2.0-tomee-testing")
|
||||||
include(":instrumentation:jaxws:jaxws-2.0-wildfly-testing")
|
include(":instrumentation:jaxws:jaxws-2.0-wildfly-testing")
|
||||||
include(":instrumentation:jaxws:jaxws-common:library")
|
include(":instrumentation:jaxws:jaxws-common:javaagent")
|
||||||
include(":instrumentation:jaxws:jaxws-jws-api-1.1:javaagent")
|
include(":instrumentation:jaxws:jaxws-jws-api-1.1:javaagent")
|
||||||
include(":instrumentation:jboss-logmanager:jboss-logmanager-appender-1.1:javaagent")
|
include(":instrumentation:jboss-logmanager:jboss-logmanager-appender-1.1:javaagent")
|
||||||
include(":instrumentation:jboss-logmanager:jboss-logmanager-mdc-1.1:javaagent")
|
include(":instrumentation:jboss-logmanager:jboss-logmanager-mdc-1.1:javaagent")
|
||||||
|
|
Loading…
Reference in New Issue