Closed amexboy closed 1 year ago
@amexboy Thanks for reporting. The documentation is outdated, you can use either the OpenTelemetry
or TracerProvider
bean to get the tracer.
@laurit Thanks for the reply,
I figured that the Tracer
bean didn't exist anymore. I will create a PR to update the documentation.
In the meantime. I couldn't also get the OpenTelemetry
bean. After a little bit of investigation, I noticed that Spring Boot 3 removed for support of spring.factories
file which was deprecated in 2.7 (I believe).
I can create a PR to add Spring 3 support. To maintain backward compatibility (which I suppose is desired), I will keep the spring.factories
file as is and create the Spring Boot 3 version of the file (META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
).
What do you think?
I believe the plan was to have separate starters for spring-boot 2 and spring-boot 3 but before that happens doing what @amexboy described feels like a good idea. @mateuszrzeszutek is this ok with you?
I think it's a good idea even if we end up having separate starters for v2 and v3 - in that case it'll allow us to reuse even more code between the two versions.
Fun and fantastic, I will follow up with a PR. I'll also make sure to update the documentation 👍
On Wed, Mar 8, 2023, 15:56 Mateusz Rzeszutek @.***> wrote:
I think it's a good idea even if we end up having separate starters for v2 and v3 - in that case it'll allow us to reuse even more code between the two versions.
— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7957#issuecomment-1460285392, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX63LQQGSINMJMJ4LMYBJLW3CMYRANCNFSM6AAAAAAVNUERSE . You are receiving this because you were mentioned.Message ID: <open-telemetry/opentelemetry-java-instrumentation/issues/7957/1460285392@ github.com>
Describe the bug I am trying to use the spring-boot-starter in my very basic demo project. I am trying to use the
Tracer
bean by auto-wiring it in my controller. My gradle build script is aaSteps to reproduce My gradle build script looks like this
What did you expect to see? I expect a Tracer bean to be available as noted here
What did you see instead? Spring complains that there is no such bean
What version are you using? 1.21.0-alpha
Environment Compiler: (e.g., "Zullu 17") OS: (e.g., "Mac Ventura 13")
** Additional Context
For enabling auto-configuration in spring-boot 3, I had to copy the spring.factories file into my repository as described here