Package akka.javasdk
Interface Tracing
@DoNotInherit
public interface Tracing
Factory for manually creating open telemetry spans in addition to those automatically provided by
the runtime and SDK.
Not for user extension. Injectable into endpoint constructors or available through component command contexts.
-
Method Summary
Modifier and TypeMethodDescriptionOptional
<io.opentelemetry.api.trace.Span> If tracing is enabled, this returns the current parent span, to use for propagating trace parent through third party integrations.Optional
<io.opentelemetry.api.trace.Span> If tracing is enabled, create and start a new custom span with the given name, setting a parent for the span is done automatically so that the span is a child of the incoming request or component call.
-
Method Details
-
startSpan
If tracing is enabled, create and start a new custom span with the given name, setting a parent for the span is done automatically so that the span is a child of the incoming request or component call.- Returns:
- Optional of the span if tracing is enabled, empty option if tracing is not enabled.
-
parentSpan
Optional<io.opentelemetry.api.trace.Span> parentSpan()If tracing is enabled, this returns the current parent span, to use for propagating trace parent through third party integrations. This span should only be used for observing, ending it or marking it as failed etc. is managed by the SDK and the runtime.
-