Class AppServerBridge.Builder

java.lang.Object
io.opentelemetry.javaagent.bootstrap.servlet.AppServerBridge.Builder
Enclosing class:
AppServerBridge

public static class AppServerBridge.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • recordException

      @CanIgnoreReturnValue public AppServerBridge.Builder recordException()
      Use on servers where exceptions thrown during servlet invocation are not propagated to the method where server span is closed. Recorded exception can be retrieved by calling AppServerBridge.getException(Context)
      Returns:
      this builder.
    • captureServletAttributes

      @CanIgnoreReturnValue public AppServerBridge.Builder captureServletAttributes()
      Use on servers where server instrumentation is not based on servlet instrumentation. Setting this flag lets servlet instrumentation know that it should augment server span with servlet specific attributes.
      Returns:
      this builder.
    • init

      public io.opentelemetry.context.Context init(io.opentelemetry.context.Context context)
      Attach AppServerBridge to context.
      Parameters:
      context - server context
      Returns:
      new context with AppServerBridge attached.