Limit instrumentations by tracer #6228
Unanswered
Falco20019
asked this question in
Q&A
Replies: 1 comment
-
@IliaBrahinets Do you have possibly an answer to that? I first tried it with Q&A instead of creating a bug issue. The library just doesn't seem to handle hosting multiple services in one process well right now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an application that hosts multiple services, each one using it's own
Sdk.CreateTracerProviderBuilder()
. When adding.AddGrpcCoreInstrumentation()
to each tracer, the activities will end up on EACH, since all are just listening to the ActivitySource fromGrpcCoreInstrumentation.ActivitySourceName
.Is there any way to make sure the instrumentation ends up on the tracer that generates the activity? I already tried different options like having a Sampler or looking for filter options, but it's not having any information about which tracer it created. As it is right now, there's no real solution to this problem I could find. I also have no way to split my application up into multiple processes to have the ActivityListeners separated.
The only solution that I tried was making the
ActivitySource
used for instrumentation configurable through options and listening to those specific ones. It does the trick but I would have assumed there should be a more general solution to this that I'm just missing...This is how it looks like:

And this is how it should look like:

As you can see, the service names are all messed up. I used a unique
ActivitySource
(as you can see inLibrary Name
not matchingOpenTelemetry.Instrumentation.GrpcCore
anymore) to see if that would solve the issue.Beta Was this translation helpful? Give feedback.
All reactions