Class JfrSpanProcessor
java.lang.Object
org.infinispan.server.core.telemetry.jfr.JfrSpanProcessor
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.SpanProcessor,Closeable,AutoCloseable
public final class JfrSpanProcessor
extends Object
implements io.opentelemetry.sdk.trace.SpanProcessor
Hook to generate
Events based on Span.
This implementation hooks into OpenTelemetry to generate internal events to record with JFR. This approach enables us to keep track of telemetry and tracing with a lower overhead and easy-to-configure alternative.
Although the exporter is active, the JVM must be properly configured to record events with JFR. Otherwise, no event
is recorded. The application starts with the `-XX:StartFlightRecording=...` option or during runtime with
the `jcmd ` command line tool.
- Since:
- 15.1.0
-
Constructor Details
-
JfrSpanProcessor
public JfrSpanProcessor()
-
-
Method Details
-
onStart
public void onStart(io.opentelemetry.context.Context parentContext, io.opentelemetry.sdk.trace.ReadWriteSpan span) - Specified by:
onStartin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
isStartRequired
public boolean isStartRequired()- Specified by:
isStartRequiredin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
onEnd
public void onEnd(io.opentelemetry.sdk.trace.ReadableSpan span) - Specified by:
onEndin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
isEndRequired
public boolean isEndRequired()- Specified by:
isEndRequiredin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
shutdown
public io.opentelemetry.sdk.common.CompletableResultCode shutdown()- Specified by:
shutdownin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-