Package codes.grow.packages.datadogapm
Class DatadogTracingHandle
java.lang.Object
codes.grow.packages.datadogapm.DatadogTracingHandle
- All Implemented Interfaces:
AutoCloseable
A running Datadog tracing setup returned by
DatadogTracing.initTracing(). It wraps the
generic TracingHandle (handle()) and adds the resolved OTLP endpoint().-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Same asshutdown().config()The effective tracing config (endpoint, propagators and resource attributes resolved).endpoint()The OTLP traces URL spans are exported to.voidExports all finished spans, waiting at most the export timeout.voidforceFlush(Duration timeout) Exports all finished spans.forceFlushAsync(Duration timeout) AsynchronousforceFlush(Duration).handle()The generic tracing handle (for example for the conformanceTracingTarget).booleanWhethershutdown()was called.io.opentelemetry.sdk.OpenTelemetrySdkThe OpenTelemetry SDK instance.io.opentelemetry.context.propagation.ContextPropagatorsThe configured propagators (tracecontext,datadog,baggageby default).voidshutdown()Flushes and shuts the tracer provider down; idempotent.Asynchronousshutdown().toString()io.opentelemetry.api.trace.TracerReturns a tracer.io.opentelemetry.api.trace.TracerReturns a tracer with a scope version.io.opentelemetry.sdk.trace.SdkTracerProviderThe tracer provider.
-
Method Details
-
handle
The generic tracing handle (for example for the conformanceTracingTarget).- Returns:
- handle
-
endpoint
The OTLP traces URL spans are exported to.- Returns:
- endpoint URL
-
openTelemetry
public io.opentelemetry.sdk.OpenTelemetrySdk openTelemetry()The OpenTelemetry SDK instance.- Returns:
- SDK
-
tracerProvider
public io.opentelemetry.sdk.trace.SdkTracerProvider tracerProvider()The tracer provider.- Returns:
- tracer provider
-
propagators
public io.opentelemetry.context.propagation.ContextPropagators propagators()The configured propagators (tracecontext,datadog,baggageby default).- Returns:
- propagators
-
config
The effective tracing config (endpoint, propagators and resource attributes resolved).- Returns:
- config
-
tracer
Returns a tracer.- Parameters:
name- instrumentation scope name- Returns:
- tracer
-
tracer
Returns a tracer with a scope version.- Parameters:
name- instrumentation scope nameversion- instrumentation scope version- Returns:
- tracer
-
forceFlush
public void forceFlush()Exports all finished spans, waiting at most the export timeout. -
forceFlush
Exports all finished spans.- Parameters:
timeout- maximum wait
-
forceFlushAsync
AsynchronousforceFlush(Duration).- Parameters:
timeout- maximum wait- Returns:
- completes when flushed
-
shutdown
public void shutdown()Flushes and shuts the tracer provider down; idempotent. -
shutdownAsync
Asynchronousshutdown().- Returns:
- completes when shut down
-
isShutdown
public boolean isShutdown()Whethershutdown()was called.- Returns:
- shutdown flag
-
close
public void close()Same asshutdown().- Specified by:
closein interfaceAutoCloseable
-
toString
-