Uses of Interface
io.opentelemetry.context.Context
Packages that use Context
Package
Description
API for associating entries with scoped operations.
Default OpenTelemetry remote baggage propagators.
Interfaces and implementations that are internal to OpenTelemetry.
API for writing log appenders.
This package describes the Metrics API that can be used to record application Metrics.
API for distributed tracing.
Default OpenTelemetry remote trace propagators.
A context propagation mechanism which can carry scoped-values across API boundaries and between
threads.
Interfaces for defining
ContextPropagators
for
allowing context propagation across process boundaries, for example when sending context to a
remote server.Internal utilities for exporters.
The OpenTelemetry SDK implementation of logging.
Log exporters.
The SDK implementation of metrics.
Metric aggregators.
Metric exemplar extension points.
View related internal classes.
The OpenTelemetry SDK implementation of tracing.
Utilities that allow tracing services to export data for sampled spans, as well as providing
in-process span processing APIs.
This package contains
Sampler
s for selecting traces
that are recorded and exported.-
Uses of Context in io.opentelemetry.api.baggage
Methods in io.opentelemetry.api.baggage that return ContextMethods in io.opentelemetry.api.baggage with parameters of type ContextModifier and TypeMethodDescriptionstatic Baggage
Baggage.fromContext
(Context context) static Baggage
Baggage.fromContextOrNull
(Context context) default Context
Baggage.storeInContext
(Context context) -
Uses of Context in io.opentelemetry.api.baggage.propagation
Methods in io.opentelemetry.api.baggage.propagation that return ContextModifier and TypeMethodDescription<C> Context
W3CBaggagePropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) Methods in io.opentelemetry.api.baggage.propagation with parameters of type ContextModifier and TypeMethodDescription<C> Context
W3CBaggagePropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> void
W3CBaggagePropagator.inject
(Context context, C carrier, TextMapSetter<C> setter) -
Uses of Context in io.opentelemetry.api.incubator.events
Methods in io.opentelemetry.api.incubator.events with parameters of type ContextModifier and TypeMethodDescriptionDefaultEventLogger.NoOpEventBuilder.setContext
(Context context) EventBuilder.setContext
(Context context) Set the context. -
Uses of Context in io.opentelemetry.api.incubator.logs
Methods in io.opentelemetry.api.incubator.logs with parameters of type ContextModifier and TypeMethodDescriptionExtendedDefaultLogger.NoopLogRecordBuilder.setContext
(Context context) -
Uses of Context in io.opentelemetry.api.incubator.metrics
Methods in io.opentelemetry.api.incubator.metrics with parameters of type ContextModifier and TypeMethodDescriptionvoid
ExtendedDefaultMeter.NoopDoubleCounter.add
(double value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopDoubleUpDownCounter.add
(double value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopLongCounter.add
(long value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopLongUpDownCounter.add
(long value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopDoubleHistogram.record
(double value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopLongHistogram.record
(long value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopDoubleGauge.set
(double value, Attributes attributes, Context context) void
ExtendedDefaultMeter.NoopLongGauge.set
(long value, Attributes attributes, Context context) -
Uses of Context in io.opentelemetry.api.incubator.propagation
Methods in io.opentelemetry.api.incubator.propagation that return ContextModifier and TypeMethodDescription<C> Context
PassThroughPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) static Context
ExtendedContextPropagators.extractTextMapPropagationContext
(Map<String, String> carrier, ContextPropagators propagators) Extract the context from a string map, which you get from HTTP headers of the metadata of a message you're processing.Methods in io.opentelemetry.api.incubator.propagation with parameters of type ContextModifier and TypeMethodDescription<C> Context
PassThroughPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> void
PassThroughPropagator.inject
(Context context, C carrier, TextMapSetter<C> setter) -
Uses of Context in io.opentelemetry.api.incubator.trace
Methods in io.opentelemetry.api.incubator.trace with parameters of type ContextModifier and TypeMethodDescriptionSets the parent to use from the specifiedContext
. -
Uses of Context in io.opentelemetry.api.internal
Methods in io.opentelemetry.api.internal with parameters of type ContextModifier and TypeMethodDescriptionstatic boolean
InstrumentationUtil.shouldSuppressInstrumentation
(Context context) Checks if an automatic instrumentation should be suppressed with the provided Context. -
Uses of Context in io.opentelemetry.api.logs
Methods in io.opentelemetry.api.logs with parameters of type ContextModifier and TypeMethodDescriptionDefaultLogger.NoopLogRecordBuilder.setContext
(Context context) LogRecordBuilder.setContext
(Context context) Set the context. -
Uses of Context in io.opentelemetry.api.metrics
Methods in io.opentelemetry.api.metrics with parameters of type ContextModifier and TypeMethodDescriptionvoid
DefaultMeter.NoopDoubleCounter.add
(double value, Attributes attributes, Context context) void
DefaultMeter.NoopDoubleUpDownCounter.add
(double value, Attributes attributes, Context context) void
DefaultMeter.NoopLongCounter.add
(long value, Attributes attributes, Context context) void
DefaultMeter.NoopLongUpDownCounter.add
(long value, Attributes attributes, Context context) void
DoubleCounter.add
(double value, Attributes attributes, Context context) Records a value with a set of attributes.void
DoubleUpDownCounter.add
(double value, Attributes attributes, Context context) Records a value with a set of attributes.void
LongCounter.add
(long value, Attributes attributes, Context context) Records a value with a set of attributes.void
LongUpDownCounter.add
(long value, Attributes attributes, Context context) Records a value with a set of attributes.void
DefaultMeter.NoopDoubleHistogram.record
(double value, Attributes attributes, Context context) void
DefaultMeter.NoopLongHistogram.record
(long value, Attributes attributes, Context context) void
DoubleHistogram.record
(double value, Attributes attributes, Context context) Records a value with a set of attributes.void
LongHistogram.record
(long value, Attributes attributes, Context context) Records a value with a set of attributes.void
DefaultMeter.NoopDoubleGauge.set
(double value, Attributes attributes, Context context) void
DefaultMeter.NoopLongGauge.set
(long value, Attributes attributes, Context context) void
DoubleGauge.set
(double value, Attributes attributes, Context context) Records a value with a set of attributes.void
LongGauge.set
(long value, Attributes attributes, Context context) Records a value with a set of attributes. -
Uses of Context in io.opentelemetry.api.trace
Methods in io.opentelemetry.api.trace that return ContextMethods in io.opentelemetry.api.trace with parameters of type ContextModifier and TypeMethodDescriptionstatic Span
Span.fromContext
(Context context) static Span
Span.fromContextOrNull
(Context context) Sets the parent to use from the specifiedContext
.default Context
Span.storeInContext
(Context context) -
Uses of Context in io.opentelemetry.api.trace.propagation
Methods in io.opentelemetry.api.trace.propagation that return ContextModifier and TypeMethodDescription<C> Context
W3CTraceContextPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) Methods in io.opentelemetry.api.trace.propagation with parameters of type ContextModifier and TypeMethodDescription<C> Context
W3CTraceContextPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> void
W3CTraceContextPropagator.inject
(Context context, C carrier, TextMapSetter<C> setter) -
Uses of Context in io.opentelemetry.context
Classes in io.opentelemetry.context that implement ContextFields in io.opentelemetry.context declared as ContextModifier and TypeFieldDescriptionprivate final Context
ThreadLocalContextStorage.ScopeImpl.beforeAttach
private final Context
ContextExecutorService.context
(package private) final Context
StrictContextStorage.CallerStackTrace.context
private static final Context
ArrayBasedContext.ROOT
private final Context
ThreadLocalContextStorage.ScopeImpl.toAttach
Fields in io.opentelemetry.context with type parameters of type ContextModifier and TypeFieldDescriptionprivate static final ThreadLocal
<Context> ThreadLocalContextStorage.THREAD_LOCAL_STORAGE
Methods in io.opentelemetry.context that return ContextModifier and TypeMethodDescription(package private) final Context
ContextExecutorService.context()
static Context
Context.current()
Return the context associated with the currentScope
.ContextStorage.current()
Returns the currentContext
.StrictContextStorage.current()
ThreadLocalContextStorage.current()
(package private) static Context
ArrayBasedContext.root()
static Context
Context.root()
default Context
ContextStorage.root()
ImplicitContextKeyed.storeInContext
(Context context) <V> Context
ArrayBasedContext.with
(ContextKey<V> key, V value) <V> Context
Context.with
(ContextKey<V> k1, V v1) Returns a new context with the given key value set.default Context
Context.with
(ImplicitContextKeyed value) Returns a newContext
with the givenImplicitContextKeyed
set.Methods in io.opentelemetry.context with parameters of type ContextModifier and TypeMethodDescriptionImplicitContextKeyed.storeInContext
(Context context) protected static <T> Collection
<? extends Callable<T>> ForwardingExecutorService.wrap
(Context context, Collection<? extends Callable<T>> tasks) Constructors in io.opentelemetry.context with parameters of type ContextModifierConstructorDescription(package private)
CallerStackTrace
(Context context) (package private)
ContextExecutorService
(Context context, ExecutorService delegate) (package private)
ContextScheduledExecutorService
(Context context, ScheduledExecutorService delegate) private
-
Uses of Context in io.opentelemetry.context.propagation
Methods in io.opentelemetry.context.propagation that return ContextModifier and TypeMethodDescription<C> Context
MultiTextMapPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> Context
NoopTextMapPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> Context
TextMapPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) Extracts data from upstream.Methods in io.opentelemetry.context.propagation with parameters of type ContextModifier and TypeMethodDescription<C> Context
MultiTextMapPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> Context
NoopTextMapPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) <C> Context
TextMapPropagator.extract
(Context context, C carrier, TextMapGetter<C> getter) Extracts data from upstream.<C> void
MultiTextMapPropagator.inject
(Context context, C carrier, TextMapSetter<C> setter) <C> void
NoopTextMapPropagator.inject
(Context context, C carrier, TextMapSetter<C> setter) <C> void
TextMapPropagator.inject
(Context context, C carrier, TextMapSetter<C> setter) Injects data for downstream consumers, for example as HTTP headers. -
Uses of Context in io.opentelemetry.exporter.internal
Methods in io.opentelemetry.exporter.internal with parameters of type ContextModifier and TypeMethodDescriptionstatic boolean
InstrumentationUtil.shouldSuppressInstrumentation
(Context context) Deprecated.Checks if an automatic instrumentation should be suppressed with the provided Context. -
Uses of Context in io.opentelemetry.sdk.logs
Fields in io.opentelemetry.sdk.logs declared as ContextMethods in io.opentelemetry.sdk.logs with parameters of type ContextModifier and TypeMethodDescriptionvoid
LogRecordProcessor.onEmit
(Context context, ReadWriteLogRecord logRecord) Called when aLogger
LogRecordBuilder.emit()
s a log record.void
MultiLogRecordProcessor.onEmit
(Context context, ReadWriteLogRecord logRecord) void
NoopLogRecordProcessor.onEmit
(Context context, ReadWriteLogRecord logRecord) SdkLogRecordBuilder.setContext
(Context context) -
Uses of Context in io.opentelemetry.sdk.logs.export
Methods in io.opentelemetry.sdk.logs.export with parameters of type ContextModifier and TypeMethodDescriptionvoid
BatchLogRecordProcessor.onEmit
(Context context, ReadWriteLogRecord logRecord) void
SimpleLogRecordProcessor.onEmit
(Context context, ReadWriteLogRecord logRecord) -
Uses of Context in io.opentelemetry.sdk.logs.internal
Methods in io.opentelemetry.sdk.logs.internal with parameters of type Context -
Uses of Context in io.opentelemetry.sdk.metrics
Methods in io.opentelemetry.sdk.metrics with parameters of type ContextModifier and TypeMethodDescriptionvoid
SdkDoubleCounter.add
(double increment, Attributes attributes, Context context) void
SdkDoubleUpDownCounter.add
(double increment, Attributes attributes, Context context) void
SdkLongCounter.add
(long increment, Attributes attributes, Context context) void
SdkLongUpDownCounter.add
(long increment, Attributes attributes, Context context) void
SdkDoubleHistogram.record
(double value, Attributes attributes, Context context) void
SdkLongHistogram.record
(long value, Attributes attributes, Context context) void
SdkMeter.MultiWritableMetricStorage.recordDouble
(double value, Attributes attributes, Context context) void
SdkMeter.MultiWritableMetricStorage.recordLong
(long value, Attributes attributes, Context context) void
SdkDoubleGauge.set
(double value, Attributes attributes, Context context) void
SdkLongGauge.set
(long value, Attributes attributes, Context context) -
Uses of Context in io.opentelemetry.sdk.metrics.internal.aggregator
Methods in io.opentelemetry.sdk.metrics.internal.aggregator with parameters of type ContextModifier and TypeMethodDescriptionfinal void
AggregatorHandle.recordDouble
(double value, Attributes attributes, Context context) final void
AggregatorHandle.recordLong
(long value, Attributes attributes, Context context) -
Uses of Context in io.opentelemetry.sdk.metrics.internal.exemplar
Methods in io.opentelemetry.sdk.metrics.internal.exemplar with parameters of type ContextModifier and TypeMethodDescriptionprivate static boolean
TraceBasedExemplarFilter.hasSampledTrace
(Context context) void
ExemplarReservoir.offerDoubleMeasurement
(double value, Attributes attributes, Context context) Offers adouble
measurement to be sampled.void
FilteredExemplarReservoir.offerDoubleMeasurement
(double value, Attributes attributes, Context context) void
FixedSizeExemplarReservoir.offerDoubleMeasurement
(double value, Attributes attributes, Context context) void
LongToDoubleExemplarReservoir.offerDoubleMeasurement
(double value, Attributes attributes, Context context) void
NoopExemplarReservoir.offerDoubleMeasurement
(double value, Attributes attributes, Context context) void
ExemplarReservoir.offerLongMeasurement
(long value, Attributes attributes, Context context) Offers along
measurement to be sampled.void
FilteredExemplarReservoir.offerLongMeasurement
(long value, Attributes attributes, Context context) void
FixedSizeExemplarReservoir.offerLongMeasurement
(long value, Attributes attributes, Context context) void
HistogramExemplarReservoir.offerLongMeasurement
(long value, Attributes attributes, Context context) void
LongToDoubleExemplarReservoir.offerLongMeasurement
(long value, Attributes attributes, Context context) void
NoopExemplarReservoir.offerLongMeasurement
(long value, Attributes attributes, Context context) private void
ReservoirCell.offerMeasurement
(Attributes attributes, Context context) (package private) void
ReservoirCell.recordDoubleMeasurement
(double value, Attributes attributes, Context context) Record the long measurement to the cell.(package private) void
ReservoirCell.recordLongMeasurement
(long value, Attributes attributes, Context context) Record the long measurement to the cell.int
HistogramExemplarReservoir.HistogramCellSelector.reservoirCellIndexFor
(ReservoirCell[] cells, double value, Attributes attributes, Context context) int
HistogramExemplarReservoir.HistogramCellSelector.reservoirCellIndexFor
(ReservoirCell[] cells, long value, Attributes attributes, Context context) int
RandomFixedSizeExemplarReservoir.RandomCellSelector.reservoirCellIndexFor
(ReservoirCell[] cells, double value, Attributes attributes, Context context) int
RandomFixedSizeExemplarReservoir.RandomCellSelector.reservoirCellIndexFor
(ReservoirCell[] cells, long value, Attributes attributes, Context context) int
ReservoirCellSelector.reservoirCellIndexFor
(ReservoirCell[] cells, double value, Attributes attributes, Context context) Determine the index of thecells
to record the measurement to.int
ReservoirCellSelector.reservoirCellIndexFor
(ReservoirCell[] cells, long value, Attributes attributes, Context context) Determine the index of thecells
to record the measurement to.boolean
AlwaysOffFilter.shouldSampleMeasurement
(double value, Attributes attributes, Context context) boolean
AlwaysOffFilter.shouldSampleMeasurement
(long value, Attributes attributes, Context context) boolean
AlwaysOnFilter.shouldSampleMeasurement
(double value, Attributes attributes, Context context) boolean
AlwaysOnFilter.shouldSampleMeasurement
(long value, Attributes attributes, Context context) boolean
ExemplarFilter.shouldSampleMeasurement
(double value, Attributes attributes, Context context) Returns whether or not a reservoir should attempt to filter a measurement.boolean
ExemplarFilter.shouldSampleMeasurement
(long value, Attributes attributes, Context context) Returns whether or not a reservoir should attempt to filter a measurement.boolean
TraceBasedExemplarFilter.shouldSampleMeasurement
(double value, Attributes attributes, Context context) boolean
TraceBasedExemplarFilter.shouldSampleMeasurement
(long value, Attributes attributes, Context context) -
Uses of Context in io.opentelemetry.sdk.metrics.internal.state
Methods in io.opentelemetry.sdk.metrics.internal.state with parameters of type ContextModifier and TypeMethodDescriptionprivate AggregatorHandle
<T, U> DefaultSynchronousMetricStorage.getAggregatorHandle
(ConcurrentHashMap<Attributes, AggregatorHandle<T, U>> aggregatorHandles, Attributes attributes, Context context) void
DefaultSynchronousMetricStorage.recordDouble
(double value, Attributes attributes, Context context) void
EmptyMetricStorage.recordDouble
(double value, Attributes attributes, Context context) void
WriteableMetricStorage.recordDouble
(double value, Attributes attributes, Context context) Records a measurement.void
DefaultSynchronousMetricStorage.recordLong
(long value, Attributes attributes, Context context) void
EmptyMetricStorage.recordLong
(long value, Attributes attributes, Context context) void
WriteableMetricStorage.recordLong
(long value, Attributes attributes, Context context) Records a measurement. -
Uses of Context in io.opentelemetry.sdk.metrics.internal.view
Methods in io.opentelemetry.sdk.metrics.internal.view with parameters of type ContextModifier and TypeMethodDescriptionAdviceAttributesProcessor.process
(Attributes incoming, Context context) AttributesProcessor.AppendingAttributesProcessor.process
(Attributes incoming, Context context) AttributesProcessor.AttributeKeyFilteringProcessor.process
(Attributes incoming, Context context) AttributesProcessor.BaggageAppendingAttributesProcessor.process
(Attributes incoming, Context context) AttributesProcessor.JoinedAttributesProcessor.process
(Attributes incoming, Context context) abstract Attributes
AttributesProcessor.process
(Attributes incoming, Context context) Manipulates a set of attributes, returning the desired set.NoopAttributesProcessor.process
(Attributes incoming, Context context) -
Uses of Context in io.opentelemetry.sdk.trace
Fields in io.opentelemetry.sdk.trace declared as ContextMethods in io.opentelemetry.sdk.trace with parameters of type ContextModifier and TypeMethodDescriptionvoid
MultiSpanProcessor.onStart
(Context parentContext, ReadWriteSpan readWriteSpan) void
NoopSpanProcessor.onStart
(Context parentContext, ReadWriteSpan span) void
SpanProcessor.onStart
(Context parentContext, ReadWriteSpan span) Called when aSpan
is started, if theSpan.isRecording()
returns true.(package private) static SdkSpan
SdkSpan.startSpan
(SpanContext context, String name, InstrumentationScopeInfo instrumentationScopeInfo, SpanKind kind, Span parentSpan, Context parentContext, SpanLimits spanLimits, SpanProcessor spanProcessor, Clock tracerClock, Resource resource, AttributesMap attributes, List<LinkData> links, int totalRecordedLinks, long userStartEpochNanos) Creates and starts a span with the given configuration. -
Uses of Context in io.opentelemetry.sdk.trace.export
Methods in io.opentelemetry.sdk.trace.export with parameters of type ContextModifier and TypeMethodDescriptionvoid
BatchSpanProcessor.onStart
(Context parentContext, ReadWriteSpan span) void
SimpleSpanProcessor.onStart
(Context parentContext, ReadWriteSpan span) -
Uses of Context in io.opentelemetry.sdk.trace.samplers
Methods in io.opentelemetry.sdk.trace.samplers with parameters of type ContextModifier and TypeMethodDescriptionAlwaysOffSampler.shouldSample
(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) AlwaysOnSampler.shouldSample
(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) ParentBasedSampler.shouldSample
(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) Sampler.shouldSample
(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) Called duringSpan
creation to make a sampling samplingResult.TraceIdRatioBasedSampler.shouldSample
(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks)