When I did Micrometer Tracing/Observation support on my product, I noticed a part that I want to fix on the spring boot side, so I'm throwing a PR. ( I was wondering if I should start an issue first, but since it is a trivial fix, I will throw a PR directly. Sorry.)

Modifications

BraveAutoConfiguration.java

I would like to put CurrentTraceContext.Builder in the bean and use it.

Why: Because the framework(armeria) I am using, requires the use of RequestContextCurrentTraceContext instead of ThereadLocalCurrentTraceContext. This modification will help users who are using something other than the ThreadLocalCurrentTraceContext.

For example, it is also useful when you want to use StrictCurrentTraceContext for debugging purposes. https://github.com/openzipkin/brave/blob/f4a2c7f7d0b8c2725ffef99fb4a5ccca222b6492/brave/src/main/java/brave/propagation/StrictCurrentTraceContext.java

ZipkinConfigurations.ReporterConfiguration

I want to use a Reporter<Span> that I created myself(bean configuration).

For some reason, the current AsyncReporter<Span> is used, so if I configure the bean by myself, two Reporter<Span> are created.

ToDo

  • [ ] If there is no problem with the modification, add the unit test

Comment From: pivotal-cla

@be-hase Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@be-hase Thank you for signing the Contributor License Agreement!