Closed stevapple closed 1 year ago
Hello @stevapple ! I see your issue on the client library. As soon as it is solved, I will implement it in DecaLog.
Thanks for the suggestion.
I checked the source and found that Decalog is not using the Jaeger client, but instead constructing a Thrift payload directly?
Then we shouldn’t need such feature. The only solution is to manually append the tags in Decalog\Handler\ AbstractTracingHandler:jaeger_format
.
Hello @stevapple ! Sorry for this late answer… If I understand well what you're suggesting, the best way to do what you want to achieve is to allow to set custom tags at the logger creation (as key/value pairs) and propagate it for all spans before sending. Am I right?
I think yes:)
OK, understood. I will try to do it for 3.6 version of the plugin which will be ready for WP 6.1 release…
Hello! Version 3.6.0 is released. Could you confirm it fixes your issue? Thanks 😉
Is there a way I can manually trigger / debug a trace to verify that it works? I didn't see reported traces in my APM dashboard, but I'm not sure which part goes wrong (or everything works as intended).
You have to specify it in the logger settings:
I used Jaeger and its log level is fixed to emergency. Is that why I’m not seeing any traces? Any way to change the behavior?
There's no "log level" in traces. Traces are collections of spans with tags. And, as all tracers I know, Jaegger do not manipulate the "concept" of log level (except for its own debugging). So, I do not understand… What do you want to achieve?
🤔So… I can see events being processed by Decalog, but there’s no reports on my APM dashboard, so it’s reasonable to assume there’s something wrong in the middle, right?
Then is there anyway to debug?
Well, I definitely do not understand: at which service do you send events?
Wait, must I add custom events through SDK to get spans? Is there built-in spans injected for WordPress and PHP?
Of course there is 😉 but I think it's not currently the issue. Please, can you confirm what you want to send to your apm: events or traces?
I think there’re only (nested) spans in Jaeger/OpenTelemetry? A trace is a collection of spans with the same trace ID.
Yes, that's why I doesn't understand why you stated about "log level" and emergency - and events processed by DecaLog. I must admit I'm a bit puzzled…
In DecaLog, if you have created a Jaeger logger, with the right parameters (ie. right service URL and right tags with at least the token
tag for your case), you will see traces in Jaeger. Is it not the case for you?
I close this due to inactivity and because, from my side, change is done and working.
Is your feature request related to a problem? Please describe. The Jaeger endpoint I’m given is shared by multiple users, and it will classify different applications by
token
tag. Currentlywp-decalog
cannot specify custom tags, so I’m not able to use the service.Describe the solution you'd like Allow users to set custom Jaeger tags.
Describe alternatives you've considered Can’t think of any alternative yet.
Additional context I’ve opened a PR on the Jaeger client library for supporting client-level tag configuration. Before that work is done, we can workaround by setting the tags on each spans.