Top Description Fields Methods
io.micrometer.tracing

public Interface BaggageInScope

extends BaggageView, Closeable
Imports
java.io.Closeable

Inspired by OpenZipkin Brave's BaggageField. Since some tracer implementations require a scope to be wrapped around baggage, baggage must be closed so that the scope does not leak. Some tracer implementations make baggage immutable (e.g. OpenTelemetry), so when the value gets updated they might create new scope (others will return the same one - e.g. OpenZipkin Brave).

Represents a single baggage entry.

Authors
Marcin Grzejszczak, Jonatan Ivanov
Since
1.0.0

Field Summary

Modifier and TypeField and Description
public static final BaggageInScope
NOOP

Hides io.micrometer.tracing.BaggageView.NOOP.

A noop implementation.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
Inherited from io.micrometer.tracing.BaggageView:
getgetname

Field Detail

NOOPback to summary
public static final BaggageInScope NOOP

Hides io.micrometer.tracing.BaggageView.NOOP.

A noop implementation.

Method Detail

closeback to summary
public void close()

Redeclares java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override