Replies: 1 comment 3 replies
-
You don't need to use the spring starter and the agent together to solve this. Although our spring starter does not define such a bean (it did a long time ago), you can easily define it yourself with something like @Bean
Tracer tracer(OpenTelemetry openTelemetry) {
return openTelemetry.getTracer("test");
} Similarly with the agent you'd include opentelemetry-api in your application and use @Bean
Tracer tracer() {
return GlobalOpenTelemetry.get().getTracer("test");
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 👋
Disclaimer : I've seen this discussion that have a title quite related to the current one.
But in the end, the answers made in it didn't really answered my existential dread about using both agent and starter at the same time 😋 ... so here it is :
Is using both at the same time is supported by one, the other, or both ?
If it is, are they tricky things to know to avoid some potential clashes or troubles ?
Why am I asking this question ? :
I have a Spring software that is currently monitored thanks the OT agent.
Doing it that way is great because #ZeroCode 😄
But at the same time, this software is relying on Spring friendly tool, which itself is able to produce spans thanks Open Telemetry.
The trouble is that it's producing those span only if it finds a bean implementing
io.opentelemetry.api.trace.Tracer
interface in the Spring context :@ConditionalOnBean( io.opentelemetry.api.trace.Tracer.class )
And unfortunately, this tool creator don't have much extra time to spend creating an agent extension ...
So in the end if I want the best of both worlds, the most straightforward option would be , if it's possible, to use both technics at the same time :
Thanks in advance for your enlightenment on that matter ! 🙏
Beta Was this translation helpful? Give feedback.
All reactions