0

I have some http request parameters which i need to add as propagation keys in spring-sleuth.

Note : I know spring-sleuth add headers by default. I need to inject http request patameters too.

Any help will be apprecieted.

Zeeshan
  • 1,173
  • 5
  • 19
  • 26

1 Answers1

0

You can register a filter that will be executed after the Sleuth's TraceFilter and there you will retrieve the value of a parameter and set it as a baggage field using the BaggageField api. Remember to ensure that the remote field is set in the properties. You can read more about this in the documentation https://docs.spring.io/spring-cloud-sleuth/docs/current-SNAPSHOT/reference/html/#baggage

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32