Class ReactivePanacheMongoRepositoryTraceInterceptor

java.lang.Object
it.pagopa.swclient.mil.observability.ReactivePanacheMongoRepositoryTraceInterceptor

@Interceptor @Priority(5000) public class ReactivePanacheMongoRepositoryTraceInterceptor extends Object

This class implements the logic to trace with OpenTelemetry standard the invocations to classes which implements io.quarkus.mongodb.panache.reactive.ReactivePanacheMongoRepositoryBase interface.

Author:
Antonio Tarricone
  • Field Details

    • tracer

      private io.opentelemetry.api.trace.Tracer tracer

      OTel tracer.

    • methodsToIgnore

      private List<String> methodsToIgnore

      Methods of io.quarkus.mongodb.panache.reactive.ReactivePanacheMongoRepositoryBase that must not be traced.

  • Constructor Details

    • ReactivePanacheMongoRepositoryTraceInterceptor

      @Inject ReactivePanacheMongoRepositoryTraceInterceptor(io.opentelemetry.api.trace.Tracer tracer)

      Constructor.

      Parameters:
      tracer - OTel tracer.
  • Method Details

    • trace

      Object trace(jakarta.interceptor.InvocationContext context) throws Exception

      This method implements the tracing logic.

      Parameters:
      context - InvocationContext
      Returns:
      Output returned by intercepted method.
      Throws:
      Exception - Exception thrown by intercepted method.