A distributed system uses Spring Cloud Sleuth. The team wants to add a custom business attribute (e.g., orderId) to all spans for a specific service. How should they do this?
-
A
Add orderId as an HTTP header and let Sleuth auto-propagate it
-
B
Use Tracer.currentSpan().tag("orderId", value) to add a custom tag to the active span
-
C
Configure orderId in bootstrap.yml as a Sleuth property
-
D
Create a new SpanExporter that appends orderId to all exported spans