jax-rs: replace common singleton with factory (#5961)
This commit is contained in:
parent
d5b935a92c
commit
4bd8956dd3
|
@ -53,7 +53,7 @@ public class ContainerRequestFilterInstrumentation implements TypeInstrumentatio
|
|||
public static void setFilterClass(
|
||||
@Advice.This ContainerRequestFilter filter,
|
||||
@Advice.Argument(0) ContainerRequestContext context) {
|
||||
context.setProperty(JaxrsSingletons.ABORT_FILTER_CLASS, filter.getClass());
|
||||
context.setProperty(JaxrsConstants.ABORT_FILTER_CLASS, filter.getClass());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsAnnotationsSingletons.instrumenter;
|
||||
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.Scope;
|
||||
|
@ -41,12 +41,12 @@ public class DefaultRequestContextInstrumentation extends AbstractRequestContext
|
|||
@Local("otelHandlerData") HandlerData handlerData,
|
||||
@Local("otelContext") Context context,
|
||||
@Local("otelScope") Scope scope) {
|
||||
if (requestContext.getProperty(JaxrsSingletons.ABORT_HANDLED) != null) {
|
||||
if (requestContext.getProperty(JaxrsConstants.ABORT_HANDLED) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Class<?> filterClass =
|
||||
(Class<?>) requestContext.getProperty(JaxrsSingletons.ABORT_FILTER_CLASS);
|
||||
(Class<?>) requestContext.getProperty(JaxrsConstants.ABORT_FILTER_CLASS);
|
||||
Method method = null;
|
||||
try {
|
||||
method = filterClass.getMethod("filter", ContainerRequestContext.class);
|
||||
|
|
|
@ -8,7 +8,7 @@ package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
|||
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
|
||||
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasSuperMethod;
|
||||
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasSuperType;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsAnnotationsSingletons.instrumenter;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.declaresMethod;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.isAnnotatedWith;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
|
||||
|
@ -156,7 +156,8 @@ public class JaxrsAnnotationsInstrumentation implements TypeInstrumentation {
|
|||
if (asyncReturnValue != null) {
|
||||
// span finished by CompletionStageFinishCallback
|
||||
asyncReturnValue =
|
||||
asyncReturnValue.handle(new CompletionStageFinishCallback<>(context, handlerData));
|
||||
asyncReturnValue.handle(
|
||||
new CompletionStageFinishCallback<>(instrumenter(), context, handlerData));
|
||||
}
|
||||
if ((asyncResponse == null || !asyncResponse.isSuspended()) && asyncReturnValue == null) {
|
||||
instrumenter().end(context, handlerData, null, null);
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
|
||||
public final class JaxrsAnnotationsSingletons {
|
||||
|
||||
private static final Instrumenter<HandlerData, Void> INSTANCE =
|
||||
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxrs-annotations-2.0");
|
||||
|
||||
public static Instrumenter<HandlerData, Void> instrumenter() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private JaxrsAnnotationsSingletons() {}
|
||||
}
|
|
@ -7,7 +7,7 @@ package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
|||
|
||||
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
|
||||
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.implementsInterface;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsAnnotationsSingletons.instrumenter;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
|
||||
|
|
|
@ -5,23 +5,25 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
public class CompletionStageFinishCallback<T> implements BiFunction<T, Throwable, T> {
|
||||
private final Instrumenter<HandlerData, Void> instrumenter;
|
||||
private final Context context;
|
||||
private final HandlerData handlerData;
|
||||
|
||||
public CompletionStageFinishCallback(Context context, HandlerData handlerData) {
|
||||
public CompletionStageFinishCallback(
|
||||
Instrumenter<HandlerData, Void> instrumenter, Context context, HandlerData handlerData) {
|
||||
this.instrumenter = instrumenter;
|
||||
this.context = context;
|
||||
this.handlerData = handlerData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T apply(T result, Throwable throwable) {
|
||||
instrumenter().end(context, handlerData, null, throwable);
|
||||
instrumenter.end(context, handlerData, null, throwable);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
final class JaxrsConstants {
|
||||
public static final String ABORT_FILTER_CLASS =
|
||||
"io.opentelemetry.javaagent.instrumentation.jaxrs2.filter.abort.class";
|
||||
public static final String ABORT_HANDLED =
|
||||
"io.opentelemetry.javaagent.instrumentation.jaxrs2.filter.abort.handled";
|
||||
|
||||
private JaxrsConstants() {}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
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.code.CodeAttributesExtractor;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||
|
||||
final class JaxrsInstrumenterFactory {
|
||||
|
||||
public static Instrumenter<HandlerData, Void> createInstrumenter(String instrumentationName) {
|
||||
JaxrsCodeAttributesGetter codeAttributesGetter = new JaxrsCodeAttributesGetter();
|
||||
|
||||
return Instrumenter.<HandlerData, Void>builder(
|
||||
GlobalOpenTelemetry.get(),
|
||||
instrumentationName,
|
||||
CodeSpanNameExtractor.create(codeAttributesGetter))
|
||||
.addAttributesExtractor(CodeAttributesExtractor.create(codeAttributesGetter))
|
||||
.setEnabled(ExperimentalConfig.get().controllerTelemetryEnabled())
|
||||
.newInstrumenter();
|
||||
}
|
||||
|
||||
private JaxrsInstrumenterFactory() {}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
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.code.CodeAttributesExtractor;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.code.CodeSpanNameExtractor;
|
||||
|
||||
public final class JaxrsSingletons {
|
||||
|
||||
public static final String ABORT_FILTER_CLASS =
|
||||
"io.opentelemetry.javaagent.instrumentation.jaxrs2.filter.abort.class";
|
||||
public static final String ABORT_HANDLED =
|
||||
"io.opentelemetry.javaagent.instrumentation.jaxrs2.filter.abort.handled";
|
||||
|
||||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxrs-2.0-common";
|
||||
|
||||
private static final Instrumenter<HandlerData, Void> INSTRUMENTER;
|
||||
|
||||
static {
|
||||
JaxrsCodeAttributesGetter codeAttributesGetter = new JaxrsCodeAttributesGetter();
|
||||
|
||||
INSTRUMENTER =
|
||||
Instrumenter.<HandlerData, Void>builder(
|
||||
GlobalOpenTelemetry.get(),
|
||||
INSTRUMENTATION_NAME,
|
||||
CodeSpanNameExtractor.create(codeAttributesGetter))
|
||||
.addAttributesExtractor(CodeAttributesExtractor.create(codeAttributesGetter))
|
||||
.setEnabled(ExperimentalConfig.get().controllerTelemetryEnabled())
|
||||
.newInstrumenter();
|
||||
}
|
||||
|
||||
public static Instrumenter<HandlerData, Void> instrumenter() {
|
||||
return INSTRUMENTER;
|
||||
}
|
||||
|
||||
private JaxrsSingletons() {}
|
||||
}
|
|
@ -5,10 +5,9 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
|
||||
import io.opentelemetry.api.trace.Span;
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.LocalRootSpan;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpRouteHolder;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpRouteSource;
|
||||
|
@ -17,13 +16,15 @@ import javax.ws.rs.container.ContainerRequestContext;
|
|||
|
||||
public final class RequestContextHelper {
|
||||
public static Context createOrUpdateAbortSpan(
|
||||
ContainerRequestContext requestContext, HandlerData handlerData) {
|
||||
Instrumenter<HandlerData, Void> instrumenter,
|
||||
ContainerRequestContext requestContext,
|
||||
HandlerData handlerData) {
|
||||
|
||||
if (handlerData == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
requestContext.setProperty(JaxrsSingletons.ABORT_HANDLED, true);
|
||||
requestContext.setProperty(JaxrsConstants.ABORT_HANDLED, true);
|
||||
Context parentContext = Java8BytecodeBridge.currentContext();
|
||||
Span serverSpan = LocalRootSpan.fromContextOrNull(parentContext);
|
||||
Span currentSpan = Java8BytecodeBridge.spanFromContext(parentContext);
|
||||
|
@ -40,11 +41,11 @@ public final class RequestContextHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!instrumenter().shouldStart(parentContext, handlerData)) {
|
||||
if (!instrumenter.shouldStart(parentContext, handlerData)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return instrumenter().start(parentContext, handlerData);
|
||||
return instrumenter.start(parentContext, handlerData);
|
||||
}
|
||||
|
||||
private RequestContextHelper() {}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.CxfSingletons.instrumenter;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
|
||||
|
@ -63,7 +63,7 @@ public class CxfRequestContextInstrumentation implements TypeInstrumentation {
|
|||
@Local("otelContext") Context context,
|
||||
@Local("otelScope") Scope scope) {
|
||||
|
||||
if (requestContext.getProperty(JaxrsSingletons.ABORT_HANDLED) != null
|
||||
if (requestContext.getProperty(JaxrsConstants.ABORT_HANDLED) != null
|
||||
|| !(requestContext instanceof ContainerRequestContext)) {
|
||||
return;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class CxfRequestContextInstrumentation implements TypeInstrumentation {
|
|||
handlerData = new HandlerData(resourceClass, method);
|
||||
context =
|
||||
RequestContextHelper.createOrUpdateAbortSpan(
|
||||
(ContainerRequestContext) requestContext, handlerData);
|
||||
instrumenter(), (ContainerRequestContext) requestContext, handlerData);
|
||||
if (context != null) {
|
||||
scope = context.makeCurrent();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
|
||||
public final class CxfSingletons {
|
||||
|
||||
private static final Instrumenter<HandlerData, Void> INSTANCE =
|
||||
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.cxf-jaxrs-3.2");
|
||||
|
||||
public static Instrumenter<HandlerData, Void> instrumenter() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private CxfSingletons() {}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JerseySingletons.instrumenter;
|
||||
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.Scope;
|
||||
|
@ -42,7 +42,7 @@ public class JerseyRequestContextInstrumentation extends AbstractRequestContextI
|
|||
@Local("otelScope") Scope scope) {
|
||||
UriInfo uriInfo = requestContext.getUriInfo();
|
||||
|
||||
if (requestContext.getProperty(JaxrsSingletons.ABORT_HANDLED) != null
|
||||
if (requestContext.getProperty(JaxrsConstants.ABORT_HANDLED) != null
|
||||
|| !(uriInfo instanceof ResourceInfo)) {
|
||||
return;
|
||||
}
|
||||
|
@ -56,7 +56,8 @@ public class JerseyRequestContextInstrumentation extends AbstractRequestContextI
|
|||
}
|
||||
|
||||
handlerData = new HandlerData(resourceClass, method);
|
||||
context = RequestContextHelper.createOrUpdateAbortSpan(requestContext, handlerData);
|
||||
context =
|
||||
RequestContextHelper.createOrUpdateAbortSpan(instrumenter(), requestContext, handlerData);
|
||||
if (context != null) {
|
||||
scope = context.makeCurrent();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
|
||||
public final class JerseySingletons {
|
||||
|
||||
private static final Instrumenter<HandlerData, Void> INSTANCE =
|
||||
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.jersey-2.0");
|
||||
|
||||
public static Instrumenter<HandlerData, Void> instrumenter() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private JerseySingletons() {}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.Resteasy30Singletons.instrumenter;
|
||||
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.Scope;
|
||||
|
@ -41,7 +41,7 @@ public class Resteasy30RequestContextInstrumentation extends AbstractRequestCont
|
|||
@Local("otelHandlerData") HandlerData handlerData,
|
||||
@Local("otelContext") Context context,
|
||||
@Local("otelScope") Scope scope) {
|
||||
if (requestContext.getProperty(JaxrsSingletons.ABORT_HANDLED) != null
|
||||
if (requestContext.getProperty(JaxrsConstants.ABORT_HANDLED) != null
|
||||
|| !(requestContext instanceof PostMatchContainerRequestContext)) {
|
||||
return;
|
||||
}
|
||||
|
@ -52,7 +52,8 @@ public class Resteasy30RequestContextInstrumentation extends AbstractRequestCont
|
|||
Class<?> resourceClass = resourceMethodInvoker.getResourceClass();
|
||||
|
||||
handlerData = new HandlerData(resourceClass, method);
|
||||
context = RequestContextHelper.createOrUpdateAbortSpan(requestContext, handlerData);
|
||||
context =
|
||||
RequestContextHelper.createOrUpdateAbortSpan(instrumenter(), requestContext, handlerData);
|
||||
if (context != null) {
|
||||
scope = context.makeCurrent();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
|
||||
public final class Resteasy30Singletons {
|
||||
|
||||
private static final Instrumenter<HandlerData, Void> INSTANCE =
|
||||
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.resteasy-3.0");
|
||||
|
||||
public static Instrumenter<HandlerData, Void> instrumenter() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private Resteasy30Singletons() {}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.JaxrsSingletons.instrumenter;
|
||||
import static io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0.Resteasy31Singletons.instrumenter;
|
||||
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.Scope;
|
||||
|
@ -41,7 +41,7 @@ public class Resteasy31RequestContextInstrumentation extends AbstractRequestCont
|
|||
@Local("otelHandlerData") HandlerData handlerData,
|
||||
@Local("otelContext") Context context,
|
||||
@Local("otelScope") Scope scope) {
|
||||
if (requestContext.getProperty(JaxrsSingletons.ABORT_HANDLED) != null
|
||||
if (requestContext.getProperty(JaxrsConstants.ABORT_HANDLED) != null
|
||||
|| !(requestContext instanceof PostMatchContainerRequestContext)) {
|
||||
return;
|
||||
}
|
||||
|
@ -52,7 +52,8 @@ public class Resteasy31RequestContextInstrumentation extends AbstractRequestCont
|
|||
Class<?> resourceClass = resourceMethodInvoker.getResourceClass();
|
||||
|
||||
handlerData = new HandlerData(resourceClass, method);
|
||||
context = RequestContextHelper.createOrUpdateAbortSpan(requestContext, handlerData);
|
||||
context =
|
||||
RequestContextHelper.createOrUpdateAbortSpan(instrumenter(), requestContext, handlerData);
|
||||
if (context != null) {
|
||||
scope = context.makeCurrent();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxrs.v2_0;
|
||||
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
|
||||
public final class Resteasy31Singletons {
|
||||
|
||||
private static final Instrumenter<HandlerData, Void> INSTANCE =
|
||||
JaxrsInstrumenterFactory.createInstrumenter("io.opentelemetry.resteasy-3.1");
|
||||
|
||||
public static Instrumenter<HandlerData, Void> instrumenter() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private Resteasy31Singletons() {}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.instrumentation.jaxws.v2_0;
|
||||
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
import io.opentelemetry.javaagent.instrumentation.jaxws.common.JaxWsInstrumenterFactory;
|
||||
import io.opentelemetry.javaagent.instrumentation.jaxws.common.JaxWsRequest;
|
||||
|
||||
public final class WebServiceProviderSingletons {
|
||||
|
||||
private static final Instrumenter<JaxWsRequest, Void> INSTANCE =
|
||||
JaxWsInstrumenterFactory.createInstrumenter("io.opentelemetry.jaxws-2.0");
|
||||
|
||||
public static Instrumenter<JaxWsRequest, Void> instrumenter() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private WebServiceProviderSingletons() {}
|
||||
}
|
Loading…
Reference in New Issue