Class AppServerBridge.Builder
java.lang.Object
io.opentelemetry.javaagent.bootstrap.servlet.AppServerBridge.Builder
- Enclosing class:
- AppServerBridge
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUse on servers where server instrumentation is not based on servlet instrumentation.io.opentelemetry.context.Contextinit(io.opentelemetry.context.Context context) Attach AppServerBridge to context.Use on servers where exceptions thrown during servlet invocation are not propagated to the method where server span is closed.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 callingAppServerBridge.getException(Context)- Returns:
- this 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.
-