Package brave.baggage
Interface BaggagePropagationCustomizer
public interface BaggagePropagationCustomizer
This allows configuration plugins to collaborate on building an instance of
BaggagePropagation.Factory
.
For example, a customizer can add a baggage field
without affecting the trace propagation format
.
This also allows one object to customize both baggage
and correlation integration
, by implementing both customizer
interfaces.
Integration examples
In practice, a dependency injection tool applies a collection of these instances prior to
building the baggage propagation instance
. For
example, an injected List<BaggagePropagationCustomizer>
parameter to a provider of Propagation.Factory
.
Here are some examples, in alphabetical order:
Note: This type is safe to implement as a lambda, or use as a method reference as it
is effectively a FunctionalInterface
. It isn't annotated as such because the project has
a minimum Java language level 6.
- Since:
- 5.11
- See Also:
CorrelationScopeCustomizer
,BaggagePropagationConfig
-
Field Summary
Fields Modifier and Type Field Description static BaggagePropagationCustomizer
NOOP
Use to avoid comparing against null references -
Method Summary
Modifier and Type Method Description void
customize(BaggagePropagation.FactoryBuilder builder)