-
Notifications
You must be signed in to change notification settings - Fork 231
Make it easier for one process to report spans as multiple services #212
Comments
There was a discussion in OT spec repo about introducing a So I think the simplest way to support multiple services per Tracer is to add a preprocessing step to the collectors that will look for a span.process = span.process.copy(service=serviceTag) No changes will be required in the clients in this case. |
Right, but that handles only the case of the "service" tag and there could be other process tags too. UI presents them differently so there would need to be some way to differentiate them from regular ones. |
Sorry, I misunderstood your use case. If the spans are produced by another instrumentation, is it worth going through Jaeger client at all? Jaeger collectors have tchannel and http ports that accept spans in |
Well, now that you suggested it - it sounds like a better approach. I used Jaeger client because it was convenient. Just |
@mabn it's now possible to use your own senders via the Sender API. Would it solve your original problem? You could have one custom Sender that sends each reported Span to multiple locations. |
I tried to upgrade to most recent version and use Senders - but it's problematic. A) I can use B) On the other hand it would be nice to use
So the A) option seems fine, but basically avoids whole opentracing API and requires some extra coding (custom pooling+batching+flushing) |
@mabn sorry, I should have been clearer :-/ I meant a change that has not been released yet, #449. With that, you should be able to just implement your |
I looked at #449 but I don't think it helps here because the problems mentioned in B) remain - But using |
We are currently thinking about having a better public API (#396). If there's anything you'd like to see changed as part of that task, do let me know. |
Is the original request reported by this issue still relevant? Should this issue be closed? |
I think it's the same use case as why the "service" tag is being proposed. But I think the simplest way for us to support service tag is by adding a rewrite rule to the collector which will split the batch and assign different Process objects to spans. |
I have a process which listens on a queue with spans in our internal format and reports them to jaeger. Right now I create N tracers and it's acceptable because N is rather low (~50) - one per service, and I ignore other "process" tags like IP. And that was the simplest way.
I do that because
UDPSender
caches process tags and additionally process tags are taken from Tracer instance which adds them automatically.Here's what could work:
finish
ed - that should work currentlyProcess
insideUDPSender
that would allow to have just oneUDPSender
instance (or one per thread, one per consumer, etc.)UDPSender
which appends a span but takes additionally aProcess
andprocessBytesSize
, something like:What I don't like here is the risk that passed
processBytesSize
won't match the realprocess
size. But maybe it would be possible to create a separate class which contains Process and caches its size.What do you think?
The text was updated successfully, but these errors were encountered: