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
Samplers 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 BaggageBaggage.fromContext(Context context) static BaggageBaggage.fromContextOrNull(Context context) default ContextBaggage.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> ContextW3CBaggagePropagator.extract(Context context, C carrier, TextMapGetter<C> getter) Methods in io.opentelemetry.api.baggage.propagation with parameters of type ContextModifier and TypeMethodDescription<C> ContextW3CBaggagePropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> voidW3CBaggagePropagator.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 TypeMethodDescriptionvoidExtendedDefaultMeter.NoopDoubleCounter.add(double value, Attributes attributes, Context context) voidExtendedDefaultMeter.NoopDoubleUpDownCounter.add(double value, Attributes attributes, Context context) voidExtendedDefaultMeter.NoopLongCounter.add(long value, Attributes attributes, Context context) voidExtendedDefaultMeter.NoopLongUpDownCounter.add(long value, Attributes attributes, Context context) voidExtendedDefaultMeter.NoopDoubleHistogram.record(double value, Attributes attributes, Context context) voidExtendedDefaultMeter.NoopLongHistogram.record(long value, Attributes attributes, Context context) voidExtendedDefaultMeter.NoopDoubleGauge.set(double value, Attributes attributes, Context context) voidExtendedDefaultMeter.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> ContextPassThroughPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) static ContextExtendedContextPropagators.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> ContextPassThroughPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> voidPassThroughPropagator.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 booleanInstrumentationUtil.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 TypeMethodDescriptionvoidDefaultMeter.NoopDoubleCounter.add(double value, Attributes attributes, Context context) voidDefaultMeter.NoopDoubleUpDownCounter.add(double value, Attributes attributes, Context context) voidDefaultMeter.NoopLongCounter.add(long value, Attributes attributes, Context context) voidDefaultMeter.NoopLongUpDownCounter.add(long value, Attributes attributes, Context context) voidDoubleCounter.add(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidDoubleUpDownCounter.add(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidLongCounter.add(long value, Attributes attributes, Context context) Records a value with a set of attributes.voidLongUpDownCounter.add(long value, Attributes attributes, Context context) Records a value with a set of attributes.voidDefaultMeter.NoopDoubleHistogram.record(double value, Attributes attributes, Context context) voidDefaultMeter.NoopLongHistogram.record(long value, Attributes attributes, Context context) voidDoubleHistogram.record(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidLongHistogram.record(long value, Attributes attributes, Context context) Records a value with a set of attributes.voidDefaultMeter.NoopDoubleGauge.set(double value, Attributes attributes, Context context) voidDefaultMeter.NoopLongGauge.set(long value, Attributes attributes, Context context) voidDoubleGauge.set(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidLongGauge.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 SpanSpan.fromContext(Context context) static SpanSpan.fromContextOrNull(Context context) Sets the parent to use from the specifiedContext.default ContextSpan.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> ContextW3CTraceContextPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) Methods in io.opentelemetry.api.trace.propagation with parameters of type ContextModifier and TypeMethodDescription<C> ContextW3CTraceContextPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> voidW3CTraceContextPropagator.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 ContextThreadLocalContextStorage.ScopeImpl.beforeAttachprivate final ContextContextExecutorService.context(package private) final ContextStrictContextStorage.CallerStackTrace.contextprivate static final ContextArrayBasedContext.ROOTprivate final ContextThreadLocalContextStorage.ScopeImpl.toAttachFields in io.opentelemetry.context with type parameters of type ContextModifier and TypeFieldDescriptionprivate static final ThreadLocal<Context> ThreadLocalContextStorage.THREAD_LOCAL_STORAGEMethods in io.opentelemetry.context that return ContextModifier and TypeMethodDescription(package private) final ContextContextExecutorService.context()static ContextContext.current()Return the context associated with the currentScope.ContextStorage.current()Returns the currentContext.StrictContextStorage.current()ThreadLocalContextStorage.current()(package private) static ContextArrayBasedContext.root()static ContextContext.root()default ContextContextStorage.root()ImplicitContextKeyed.storeInContext(Context context) <V> ContextArrayBasedContext.with(ContextKey<V> key, V value) <V> ContextContext.with(ContextKey<V> k1, V v1) Returns a new context with the given key value set.default ContextContext.with(ImplicitContextKeyed value) Returns a newContextwith the givenImplicitContextKeyedset.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> ContextMultiTextMapPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> ContextNoopTextMapPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> ContextTextMapPropagator.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> ContextMultiTextMapPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> ContextNoopTextMapPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) <C> ContextTextMapPropagator.extract(Context context, C carrier, TextMapGetter<C> getter) Extracts data from upstream.<C> voidMultiTextMapPropagator.inject(Context context, C carrier, TextMapSetter<C> setter) <C> voidNoopTextMapPropagator.inject(Context context, C carrier, TextMapSetter<C> setter) <C> voidTextMapPropagator.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 booleanInstrumentationUtil.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 TypeMethodDescriptionvoidLogRecordProcessor.onEmit(Context context, ReadWriteLogRecord logRecord) Called when aLoggerLogRecordBuilder.emit()s a log record.voidMultiLogRecordProcessor.onEmit(Context context, ReadWriteLogRecord logRecord) voidNoopLogRecordProcessor.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 TypeMethodDescriptionvoidBatchLogRecordProcessor.onEmit(Context context, ReadWriteLogRecord logRecord) voidSimpleLogRecordProcessor.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 TypeMethodDescriptionvoidSdkDoubleCounter.add(double increment, Attributes attributes, Context context) voidSdkDoubleUpDownCounter.add(double increment, Attributes attributes, Context context) voidSdkLongCounter.add(long increment, Attributes attributes, Context context) voidSdkLongUpDownCounter.add(long increment, Attributes attributes, Context context) voidSdkDoubleHistogram.record(double value, Attributes attributes, Context context) voidSdkLongHistogram.record(long value, Attributes attributes, Context context) voidSdkMeter.MultiWritableMetricStorage.recordDouble(double value, Attributes attributes, Context context) voidSdkMeter.MultiWritableMetricStorage.recordLong(long value, Attributes attributes, Context context) voidSdkDoubleGauge.set(double value, Attributes attributes, Context context) voidSdkLongGauge.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 voidAggregatorHandle.recordDouble(double value, Attributes attributes, Context context) final voidAggregatorHandle.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 booleanTraceBasedExemplarFilter.hasSampledTrace(Context context) voidExemplarReservoir.offerDoubleMeasurement(double value, Attributes attributes, Context context) Offers adoublemeasurement to be sampled.voidFilteredExemplarReservoir.offerDoubleMeasurement(double value, Attributes attributes, Context context) voidFixedSizeExemplarReservoir.offerDoubleMeasurement(double value, Attributes attributes, Context context) voidLongToDoubleExemplarReservoir.offerDoubleMeasurement(double value, Attributes attributes, Context context) voidNoopExemplarReservoir.offerDoubleMeasurement(double value, Attributes attributes, Context context) voidExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) Offers alongmeasurement to be sampled.voidFilteredExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) voidFixedSizeExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) voidHistogramExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) voidLongToDoubleExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) voidNoopExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) private voidReservoirCell.offerMeasurement(Attributes attributes, Context context) (package private) voidReservoirCell.recordDoubleMeasurement(double value, Attributes attributes, Context context) Record the long measurement to the cell.(package private) voidReservoirCell.recordLongMeasurement(long value, Attributes attributes, Context context) Record the long measurement to the cell.intHistogramExemplarReservoir.HistogramCellSelector.reservoirCellIndexFor(ReservoirCell[] cells, double value, Attributes attributes, Context context) intHistogramExemplarReservoir.HistogramCellSelector.reservoirCellIndexFor(ReservoirCell[] cells, long value, Attributes attributes, Context context) intRandomFixedSizeExemplarReservoir.RandomCellSelector.reservoirCellIndexFor(ReservoirCell[] cells, double value, Attributes attributes, Context context) intRandomFixedSizeExemplarReservoir.RandomCellSelector.reservoirCellIndexFor(ReservoirCell[] cells, long value, Attributes attributes, Context context) intReservoirCellSelector.reservoirCellIndexFor(ReservoirCell[] cells, double value, Attributes attributes, Context context) Determine the index of thecellsto record the measurement to.intReservoirCellSelector.reservoirCellIndexFor(ReservoirCell[] cells, long value, Attributes attributes, Context context) Determine the index of thecellsto record the measurement to.booleanAlwaysOffFilter.shouldSampleMeasurement(double value, Attributes attributes, Context context) booleanAlwaysOffFilter.shouldSampleMeasurement(long value, Attributes attributes, Context context) booleanAlwaysOnFilter.shouldSampleMeasurement(double value, Attributes attributes, Context context) booleanAlwaysOnFilter.shouldSampleMeasurement(long value, Attributes attributes, Context context) booleanExemplarFilter.shouldSampleMeasurement(double value, Attributes attributes, Context context) Returns whether or not a reservoir should attempt to filter a measurement.booleanExemplarFilter.shouldSampleMeasurement(long value, Attributes attributes, Context context) Returns whether or not a reservoir should attempt to filter a measurement.booleanTraceBasedExemplarFilter.shouldSampleMeasurement(double value, Attributes attributes, Context context) booleanTraceBasedExemplarFilter.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) voidDefaultSynchronousMetricStorage.recordDouble(double value, Attributes attributes, Context context) voidEmptyMetricStorage.recordDouble(double value, Attributes attributes, Context context) voidWriteableMetricStorage.recordDouble(double value, Attributes attributes, Context context) Records a measurement.voidDefaultSynchronousMetricStorage.recordLong(long value, Attributes attributes, Context context) voidEmptyMetricStorage.recordLong(long value, Attributes attributes, Context context) voidWriteableMetricStorage.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 AttributesAttributesProcessor.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 TypeMethodDescriptionvoidMultiSpanProcessor.onStart(Context parentContext, ReadWriteSpan readWriteSpan) voidNoopSpanProcessor.onStart(Context parentContext, ReadWriteSpan span) voidSpanProcessor.onStart(Context parentContext, ReadWriteSpan span) Called when aSpanis started, if theSpan.isRecording()returns true.(package private) static SdkSpanSdkSpan.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 TypeMethodDescriptionvoidBatchSpanProcessor.onStart(Context parentContext, ReadWriteSpan span) voidSimpleSpanProcessor.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 duringSpancreation to make a sampling samplingResult.TraceIdRatioBasedSampler.shouldSample(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks)