-
public class _TraceInternalProxyFor library usage only. Provides implementation for specific interfaces to dependent modules
-
-
Field Summary
Fields Modifier and Type Field Description public final OpenObserveSpanIdConverterspanIdConverterprivate OpenObservePropagationHelperpropagationHelperpublic final static _TraceInternalProxyINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitsetTracingSamplingPriorityIfNecessary(OpenObserveSpanContext context)Sets the tracing sampling priority if it is necessary. final OpenObserveTracerBuildersetTraceId128BitGenerationEnabled(OpenObserveTracerBuilder builder)Enables 128-bit trace ID generation for the provided OpenObserve tracer builder. final OpenObserveTracerBuildersetSdkV2Compatible(OpenObserveTracerBuilder builder)Enables compatibility mode with SDK v2 for sampling factory strategy. final static UnitaddThrowable(OpenObserveSpan span, Throwable throwable, Byte errorPriority)Associates a throwable with the current span, marking it as an error. final static OpenObserveScopeactivateSpan(OpenObserveTracer tracer, OpenObserveSpan span, Boolean asyncPropagating)Activates the provided span within the current context of the tracer. final StringmergeBaggage(String oldHeader, String newHeader)Merges two baggage headers into a single string representation. final ApmNetworkInstrumentationcreateApmNetworkInstrumentation(String name, ApmNetworkInstrumentationConfiguration configuration)Creates an ApmNetworkInstrumentation instance from the provided configuration. final OpenObserveSpanIdConvertergetSpanIdConverter()Provides a mechanism for converting OpenObserve span IDs between decimal and hexadecimal representations. final OpenObservePropagationHelpergetPropagationHelper()Providing helper function to extract OpenObserveSpanContext from tracing context added by addParentSpan method. final UnitsetPropagationHelper(OpenObservePropagationHelper propagationHelper)-
-
Method Detail
-
setTracingSamplingPriorityIfNecessary
final Unit setTracingSamplingPriorityIfNecessary(OpenObserveSpanContext context)
Sets the tracing sampling priority if it is necessary.
-
setTraceId128BitGenerationEnabled
final OpenObserveTracerBuilder setTraceId128BitGenerationEnabled(OpenObserveTracerBuilder builder)
Enables 128-bit trace ID generation for the provided OpenObserve tracer builder.
-
setSdkV2Compatible
final OpenObserveTracerBuilder setSdkV2Compatible(OpenObserveTracerBuilder builder)
Enables compatibility mode with SDK v2 for sampling factory strategy.
-
addThrowable
final static Unit addThrowable(OpenObserveSpan span, Throwable throwable, Byte errorPriority)
Associates a throwable with the current span, marking it as an error. Note that error flag will be set only if priority is higher than the current one.
- Parameters:
span- The span to associate the throwable with.throwable- The throwable to associate with the current span.errorPriority- The priority level of the error, represented as a byte.
-
activateSpan
final static OpenObserveScope activateSpan(OpenObserveTracer tracer, OpenObserveSpan span, Boolean asyncPropagating)
Activates the provided span within the current context of the tracer. If
asyncPropagatingis set to true, the span is propagated asynchronously. Once activated, the span becomes the currently active span until it is explicitly deactivated.- Parameters:
tracer- The tracer instance to be used for activation.span- The span to be activated.asyncPropagating- If true, this context will propagate across async boundaries.
-
mergeBaggage
final String mergeBaggage(String oldHeader, String newHeader)
Merges two baggage headers into a single string representation. The oldHeader represents the previously existing baggage header, and the newHeader represents the new baggage information to be merged with the old one.
- Parameters:
oldHeader- The existing baggage header, which may be null.newHeader- The new baggage header to be merged, must not be null.
-
createApmNetworkInstrumentation
final ApmNetworkInstrumentation createApmNetworkInstrumentation(String name, ApmNetworkInstrumentationConfiguration configuration)
Creates an ApmNetworkInstrumentation instance from the provided configuration.
- Parameters:
name- the name identifying the network instrumentation (e.g., "OkHttp", "Cronet").configuration- the configuration containing tracing settings such as traced hosts, sample rate, trace context injection behavior, and tracing scope.
-
getSpanIdConverter
final OpenObserveSpanIdConverter getSpanIdConverter()
Provides a mechanism for converting OpenObserve span IDs between decimal and hexadecimal representations.
This converter is utilized to ensure span ID consistency and proper formatting for distributed tracing when working with the OpenObserve SDK.
-
getPropagationHelper
final OpenObservePropagationHelper getPropagationHelper()
Providing helper function to extract OpenObserveSpanContext from tracing context added by addParentSpan method.
This property is intended for internal usage only and should not be altered externally.
-
setPropagationHelper
final Unit setPropagationHelper(OpenObservePropagationHelper propagationHelper)
-
-
-
-