Uses of Interface
io.opentelemetry.api.common.Attributes
Packages that use Attributes
Package
Description
This package contains code common across the OpenTelemetry APIs, including
Attributes and classes/utilities for interacting with them.API for writing log appenders.
This package describes the Metrics API that can be used to record application Metrics.
API for distributed tracing.
Marshaling framework for serializing data to protobuf format.
Utilities for working with the OTLP format.
Common utilities used by all SDK components.
Interfaces and implementations that are internal to OpenTelemetry.
The OpenTelemetry SDK implementation of logging.
The data format to model logs for export.
Classes which form the in-memory representation of the OpenTelemetry metrics data model.
Metric aggregators.
The data format to model metrics for export.
Metric exemplar extension points.
View related internal classes.
API for resource information population.
The OpenTelemetry SDK implementation of tracing.
The data format to model traces for export.
This package contains
Samplers for selecting traces
that are recorded and exported.-
Uses of Attributes in io.opentelemetry.api.common
Methods in io.opentelemetry.api.common that return AttributesModifier and TypeMethodDescriptionAttributesBuilder.build()Create theAttributesfrom this.static AttributesAttributes.empty()Returns aAttributesinstance with no attributes.static <T> AttributesAttributes.of(AttributeKey<T> key, T value) Returns aAttributesinstance with a single key-value pair.static <T,U> Attributes Attributes.of(AttributeKey<T> key1, T value1, AttributeKey<U> key2, U value2) Returns aAttributesinstance with two key-value pairs.static <T,U, V> Attributes Attributes.of(AttributeKey<T> key1, T value1, AttributeKey<U> key2, U value2, AttributeKey<V> key3, V value3) Returns aAttributesinstance with three key-value pairs.static <T,U, V, W> Attributes Attributes.of(AttributeKey<T> key1, T value1, AttributeKey<U> key2, U value2, AttributeKey<V> key3, V value3, AttributeKey<W> key4, W value4) Returns aAttributesinstance with four key-value pairs.static <T,U, V, W, X>
AttributesAttributes.of(AttributeKey<T> key1, T value1, AttributeKey<U> key2, U value2, AttributeKey<V> key3, V value3, AttributeKey<W> key4, W value4, AttributeKey<X> key5, X value5) Returns aAttributesinstance with five key-value pairs.static <T,U, V, W, X, Y>
AttributesAttributes.of(AttributeKey<T> key1, T value1, AttributeKey<U> key2, U value2, AttributeKey<V> key3, V value3, AttributeKey<W> key4, W value4, AttributeKey<X> key5, X value5, AttributeKey<Y> key6, Y value6) Returns aAttributesinstance with the given key-value pairs.Methods in io.opentelemetry.api.common with parameters of type AttributesModifier and TypeMethodDescriptionAttributesBuilder.putAll(Attributes attributes) Puts all the provided attributes into this Builder. -
Uses of Attributes in io.opentelemetry.api.incubator.events
Methods in io.opentelemetry.api.incubator.events with parameters of type AttributesModifier and TypeMethodDescriptionEventBuilder.setAttributes(Attributes attributes) Set the attributes. -
Uses of Attributes in io.opentelemetry.api.incubator.trace
Methods in io.opentelemetry.api.incubator.trace with parameters of type AttributesModifier and TypeMethodDescriptionExtendedSpanBuilder.addLink(SpanContext spanContext, Attributes attributes) Adds a link to the newly createdSpan.default ExtendedSpanBuilderExtendedSpanBuilder.setAllAttributes(Attributes attributes) Sets attributes to theSpanBuilder. -
Uses of Attributes in io.opentelemetry.api.logs
Methods in io.opentelemetry.api.logs with parameters of type AttributesModifier and TypeMethodDescriptiondefault LogRecordBuilderLogRecordBuilder.setAllAttributes(Attributes attributes) Sets attributes. -
Uses of Attributes in io.opentelemetry.api.metrics
Methods in io.opentelemetry.api.metrics with parameters of type AttributesModifier and TypeMethodDescriptionvoidDoubleCounter.add(double value, Attributes attributes) Records a value with a set of attributes.voidDoubleCounter.add(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidDoubleUpDownCounter.add(double value, Attributes attributes) 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) 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) Record a value with a set of attributes.voidLongUpDownCounter.add(long value, Attributes attributes, Context context) Records a value with a set of attributes.voidDoubleHistogram.record(double value, Attributes attributes) Records a value with a set of attributes.voidDoubleHistogram.record(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidLongHistogram.record(long value, Attributes attributes) Records a value with a set of attributes.voidLongHistogram.record(long value, Attributes attributes, Context context) Records a value with a set of attributes.voidObservableDoubleMeasurement.record(double value, Attributes attributes) Records a measurement with a set of attributes.voidObservableLongMeasurement.record(long value, Attributes attributes) Records a measurement with a set of attributes.voidDoubleGauge.set(double value, Attributes attributes) Records a value with a set of attributes.voidDoubleGauge.set(double value, Attributes attributes, Context context) Records a value with a set of attributes.voidLongGauge.set(long value, Attributes attributes) 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 Attributes in io.opentelemetry.api.trace
Methods in io.opentelemetry.api.trace with parameters of type AttributesModifier and TypeMethodDescriptionSpan.addEvent(String name, Attributes attributes) Adds an event to theSpanwith the givenAttributes.Span.addEvent(String name, Attributes attributes, long timestamp, TimeUnit unit) default SpanSpan.addEvent(String name, Attributes attributes, Instant timestamp) default SpanSpan.addLink(SpanContext spanContext, Attributes attributes) Adds a link to thisSpan.SpanBuilder.addLink(SpanContext spanContext, Attributes attributes) Adds a link to the newly createdSpan.Span.recordException(Throwable exception, Attributes additionalAttributes) default SpanSpan.setAllAttributes(Attributes attributes) Sets attributes to theSpan.default SpanBuilderSpanBuilder.setAllAttributes(Attributes attributes) Sets attributes to theSpanBuilder. -
Uses of Attributes in io.opentelemetry.exporter.internal.marshal
Methods in io.opentelemetry.exporter.internal.marshal with parameters of type AttributesModifier and TypeMethodDescriptionvoidSerializer.serializeRepeatedMessageWithContext(ProtoFieldInfo field, Attributes attributes, StatelessMarshaler2<AttributeKey<?>, Object> marshaler, MarshalerContext context) Serializesrepeated messagefield.static intStatelessMarshalerUtil.sizeRepeatedMessageWithContext(ProtoFieldInfo field, Attributes attributes, StatelessMarshaler2<AttributeKey<?>, Object> marshaler, MarshalerContext context) Returns the size of a repeated message field. -
Uses of Attributes in io.opentelemetry.exporter.internal.otlp
Methods in io.opentelemetry.exporter.internal.otlp with parameters of type AttributesModifier and TypeMethodDescriptionstatic KeyValueMarshaler[]KeyValueMarshaler.createForAttributes(Attributes attributes) Returns Marshalers for the given Attributes. -
Uses of Attributes in io.opentelemetry.sdk.common
Methods in io.opentelemetry.sdk.common that return AttributesModifier and TypeMethodDescriptionabstract AttributesInstrumentationScopeInfo.getAttributes()Returns the attributes of this instrumentation scope.Methods in io.opentelemetry.sdk.common with parameters of type AttributesModifier and TypeMethodDescriptionInstrumentationScopeInfoBuilder.setAttributes(Attributes attributes) Set the attributes. -
Uses of Attributes in io.opentelemetry.sdk.internal
Classes in io.opentelemetry.sdk.internal that implement AttributesModifier and TypeClassDescriptionfinal classA map with a fixed capacity that drops attributes when the map gets full, and which truncates string and array string attribute values to theAttributesMap.lengthLimit.Methods in io.opentelemetry.sdk.internal that return AttributesModifier and TypeMethodDescriptionstatic AttributesAttributeUtil.applyAttributesLimit(Attributes attributes, int countLimit, int lengthLimit) Apply thecountLimitandlengthLimitto the attributes.AttributesMap.immutableCopy()Create an immutable copy of the attributes in this map.Methods in io.opentelemetry.sdk.internal with parameters of type AttributesModifier and TypeMethodDescriptionstatic AttributesAttributeUtil.applyAttributesLimit(Attributes attributes, int countLimit, int lengthLimit) Apply thecountLimitandlengthLimitto the attributes.ComponentRegistry.get(String name, String version, String schemaUrl, Attributes attributes) Returns the component associated with thename,version, andschemaUrl. -
Uses of Attributes in io.opentelemetry.sdk.logs
Methods in io.opentelemetry.sdk.logs with parameters of type AttributesModifier and TypeMethodDescriptiondefault ReadWriteLogRecordReadWriteLogRecord.setAllAttributes(Attributes attributes) Sets attributes to theReadWriteLogRecord. -
Uses of Attributes in io.opentelemetry.sdk.logs.data
Methods in io.opentelemetry.sdk.logs.data that return AttributesModifier and TypeMethodDescriptionLogRecordData.getAttributes()Returns the attributes for this log, orAttributes.empty()if unset. -
Uses of Attributes in io.opentelemetry.sdk.metrics.data
Methods in io.opentelemetry.sdk.metrics.data that return AttributesModifier and TypeMethodDescriptionPointData.getAttributes()Returns the attributes of the aggregation.ExemplarData.getFilteredAttributes()Returns the attributes that were recorded alongside the original measurement but filtered out by the aggregator. -
Uses of Attributes in io.opentelemetry.sdk.metrics.internal.aggregator
Methods in io.opentelemetry.sdk.metrics.internal.aggregator with parameters of type AttributesModifier and TypeMethodDescriptionfinal TAggregatorHandle.aggregateThenMaybeReset(long startEpochNanos, long epochNanos, Attributes attributes, boolean reset) Returns the current value into asT.protected abstract TAggregatorHandle.doAggregateThenMaybeReset(long startEpochNanos, long epochNanos, Attributes attributes, List<U> exemplars, boolean reset) Implementation of theAggregatorHandle.aggregateThenMaybeReset(long, long, Attributes, boolean).final voidAggregatorHandle.recordDouble(double value, Attributes attributes, Context context) final voidAggregatorHandle.recordLong(long value, Attributes attributes, Context context) -
Uses of Attributes in io.opentelemetry.sdk.metrics.internal.data
Methods in io.opentelemetry.sdk.metrics.internal.data that return AttributesModifier and TypeMethodDescriptionMutableDoublePointData.getAttributes()MutableExponentialHistogramPointData.getAttributes()MutableHistogramPointData.getAttributes()MutableLongPointData.getAttributes()Methods in io.opentelemetry.sdk.metrics.internal.data with parameters of type AttributesModifier and TypeMethodDescriptionstatic DoubleExemplarDataImmutableDoubleExemplarData.create(Attributes filteredAttributes, long recordTimeNanos, SpanContext spanContext, double value) Construct a new exemplar.static DoublePointDataImmutableDoublePointData.create(long startEpochNanos, long epochNanos, Attributes attributes, double value) Creates aImmutableDoublePointData.static DoublePointDataImmutableDoublePointData.create(long startEpochNanos, long epochNanos, Attributes attributes, double value, List<DoubleExemplarData> exemplars) Creates aImmutableDoublePointData.ImmutableExponentialHistogramPointData.create(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) Create a DoubleExponentialHistogramPointData.static ImmutableHistogramPointDataImmutableHistogramPointData.create(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, List<Double> boundaries, List<Long> counts) Creates a HistogramPointData.static ImmutableHistogramPointDataImmutableHistogramPointData.create(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, List<Double> boundaries, List<Long> counts, List<DoubleExemplarData> exemplars) Creates a HistogramPointData.static LongExemplarDataImmutableLongExemplarData.create(Attributes filteredAttributes, long recordTimeNanos, SpanContext spanContext, long value) Construct a new exemplar.static LongPointDataImmutableLongPointData.create(long startEpochNanos, long epochNanos, Attributes attributes, long value) Creates aImmutableLongPointData.static LongPointDataImmutableLongPointData.create(long startEpochNanos, long epochNanos, Attributes attributes, long value, List<LongExemplarData> exemplars) Creates aImmutableLongPointData.static ImmutableSummaryPointDataImmutableSummaryPointData.create(long startEpochNanos, long epochNanos, Attributes attributes, long count, double sum, List<ValueAtQuantile> percentileValues) Creates aSummaryPointData.voidMutableDoublePointData.set(long startEpochNanos, long epochNanos, Attributes attributes, double value) Sets allMutableDoublePointDatavalues , besides exemplars which are set to empty.voidMutableDoublePointData.set(long startEpochNanos, long epochNanos, Attributes attributes, double value, List<DoubleExemplarData> exemplars) Sets allMutableDoublePointDatavalues.MutableExponentialHistogramPointData.set(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) MutableHistogramPointData.set(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, List<Double> boundaries, long[] counts, List<DoubleExemplarData> exemplars) voidMutableLongPointData.set(long startEpochNanos, long epochNanos, Attributes attributes, long value) Sets allMutableDoublePointDatavalues besides exemplars which are set to be empty.voidMutableLongPointData.set(long startEpochNanos, long epochNanos, Attributes attributes, long value, List<LongExemplarData> exemplars) Sets allMutableDoublePointDatavalues. -
Uses of Attributes in io.opentelemetry.sdk.metrics.internal.exemplar
Methods in io.opentelemetry.sdk.metrics.internal.exemplar with parameters of type AttributesModifier and TypeMethodDescriptionExemplarReservoir.collectAndReset(Attributes pointAttributes) Returns an immutable list of Exemplars for exporting from the current reservoir.voidExemplarReservoir.offerDoubleMeasurement(double value, Attributes attributes, Context context) Offers adoublemeasurement to be sampled.voidExemplarReservoir.offerLongMeasurement(long value, Attributes attributes, Context context) Offers alongmeasurement to be sampled.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 Attributes in io.opentelemetry.sdk.metrics.internal.state
Fields in io.opentelemetry.sdk.metrics.internal.state declared as AttributesModifier and TypeFieldDescriptionstatic final AttributesMetricStorage.CARDINALITY_OVERFLOWAttributes capturing overflow measurements recorded when cardinality limit is exceeded.Methods in io.opentelemetry.sdk.metrics.internal.state that return AttributesMethods in io.opentelemetry.sdk.metrics.internal.state with parameters of type AttributesModifier and TypeMethodDescriptionvoidSdkObservableMeasurement.record(double value, Attributes attributes) voidSdkObservableMeasurement.record(long value, Attributes attributes) voidDefaultSynchronousMetricStorage.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) voidWriteableMetricStorage.recordLong(long value, Attributes attributes, Context context) Records a measurement.ImmutableMeasurement.withAttributes(Attributes attributes) Measurement.withAttributes(Attributes attributes) Updates the attributes.MutableMeasurement.withAttributes(Attributes attributes) -
Uses of Attributes in io.opentelemetry.sdk.metrics.internal.view
Methods in io.opentelemetry.sdk.metrics.internal.view that return AttributesModifier and TypeMethodDescriptionabstract AttributesAttributesProcessor.process(Attributes incoming, Context context) Manipulates a set of attributes, returning the desired set.Methods in io.opentelemetry.sdk.metrics.internal.view with parameters of type AttributesModifier and TypeMethodDescriptionstatic AttributesProcessorAttributesProcessor.append(Attributes attributes) Creates a processor which appends (exactly) the given attributes.abstract AttributesAttributesProcessor.process(Attributes incoming, Context context) Manipulates a set of attributes, returning the desired set. -
Uses of Attributes in io.opentelemetry.sdk.resources
Methods in io.opentelemetry.sdk.resources that return AttributesModifier and TypeMethodDescriptionabstract AttributesResource.getAttributes()Returns a map of attributes that describe the resource.Methods in io.opentelemetry.sdk.resources with parameters of type AttributesModifier and TypeMethodDescriptionstatic ResourceResource.create(Attributes attributes) Returns aResource.static ResourceResource.create(Attributes attributes, String schemaUrl) Returns aResource.ResourceBuilder.putAll(Attributes attributes) Puts allAttributesinto this. -
Uses of Attributes in io.opentelemetry.sdk.trace
Methods in io.opentelemetry.sdk.trace that return AttributesModifier and TypeMethodDescriptiondefault AttributesReadableSpan.getAttributes()Returns the Span attributes. -
Uses of Attributes in io.opentelemetry.sdk.trace.data
Methods in io.opentelemetry.sdk.trace.data that return AttributesModifier and TypeMethodDescriptionDelegatingSpanData.getAttributes()EventData.getAttributes()Return the attributes of theEventData.LinkData.getAttributes()Returns the set of attributes.SpanData.getAttributes()Returns the attributes recorded for thisSpan.Methods in io.opentelemetry.sdk.trace.data with parameters of type AttributesModifier and TypeMethodDescriptionstatic EventDataEventData.create(long epochNanos, String name, Attributes attributes) Returns a new immutableEventData.static EventDataEventData.create(long epochNanos, String name, Attributes attributes, int totalAttributeCount) Returns a new immutableEventData.static ExceptionEventDataExceptionEventData.create(long epochNanos, Throwable exception, Attributes attributes, int totalAttributeCount) Returns a new immutableExceptionEventData.static LinkDataLinkData.create(SpanContext spanContext, Attributes attributes) Returns a new immutableLinkData.static LinkDataLinkData.create(SpanContext spanContext, Attributes attributes, int totalAttributeCount) Returns a new immutableLinkData. -
Uses of Attributes in io.opentelemetry.sdk.trace.samplers
Methods in io.opentelemetry.sdk.trace.samplers that return AttributesModifier and TypeMethodDescriptionSamplingResult.getAttributes()Return tags which will be attached to the span.Methods in io.opentelemetry.sdk.trace.samplers with parameters of type AttributesModifier and TypeMethodDescriptionstatic SamplingResultSamplingResult.create(SamplingDecision decision, Attributes attributes) Returns aSamplingResultwith the givenattributesandSamplingResult.getDecision()returningdecision.Sampler.shouldSample(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List<LinkData> parentLinks) Called duringSpancreation to make a sampling samplingResult.