Class NewSpanOpenTelemetryTraceInterceptor

java.lang.Object
io.micronaut.tracing.opentelemetry.interceptor.AbstractOpenTelemetryTraceInterceptor
io.micronaut.tracing.opentelemetry.interceptor.NewSpanOpenTelemetryTraceInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,Object>, io.micronaut.aop.MethodInterceptor<Object,Object>, io.micronaut.core.order.Ordered

@Internal @Singleton @Requires(beans=io.opentelemetry.api.trace.Tracer.class) @InterceptorBean(NewSpan.class) public final class NewSpanOpenTelemetryTraceInterceptor extends AbstractOpenTelemetryTraceInterceptor
Implements tracing logic for ContinueSpan and NewSpan using the Open Telemetry API.
Since:
4.2.0
Author:
Nemanja Mikic
  • Field Summary

    Fields inherited from class io.micronaut.tracing.opentelemetry.interceptor.AbstractOpenTelemetryTraceInterceptor

    instrumenter

    Fields inherited from interface io.micronaut.aop.Interceptor

    ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NewSpanOpenTelemetryTraceInterceptor(io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<io.opentelemetry.instrumentation.api.instrumenter.util.ClassAndMethod,Object> instrumenter, io.micronaut.core.convert.ConversionService conversionService)
    Initialize the interceptor with tracer and conversion service.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
     

    Methods inherited from class io.micronaut.tracing.opentelemetry.interceptor.AbstractOpenTelemetryTraceInterceptor

    getOrder, tagArguments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.aop.MethodInterceptor

    intercept
  • Constructor Details

    • NewSpanOpenTelemetryTraceInterceptor

      public NewSpanOpenTelemetryTraceInterceptor(@Named("micronautCodeTelemetryInstrumenter") io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<io.opentelemetry.instrumentation.api.instrumenter.util.ClassAndMethod,Object> instrumenter, io.micronaut.core.convert.ConversionService conversionService)
      Initialize the interceptor with tracer and conversion service.
      Parameters:
      instrumenter - The ClassAndMethod Instrumenter
      conversionService - The conversion service
  • Method Details

    • intercept

      @Nullable public @Nullable Object intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)