micrometer-metrics / tracing

Provides tracing abstractions over tracers and tracing system reporters.
https://micrometer.io
Apache License 2.0
252 stars 46 forks source link

OTel Span is not set to status "ok" when ends successfully #890

Open GFriedrich opened 1 week ago

GFriedrich commented 1 week ago

Hi, I'm not sure if I'm missing something in my implementation, but I would expect that if an OTel span is ended and is yet "unset", it would be set to "ok". Right now I can see it is always "unset" at the end which is somewhat odd. But please let me know in case I've missed anything. Thanks for looking at it in advance.

jonatan-ivanov commented 5 days ago

Thanks for the issue! Are you interested in creating a PR to fix this? OtelSpan has two end methods and the error method is already setting the status so setting in end should be straightforward.

GFriedrich commented 5 days ago

@jonatan-ivanov first of all: Thanks for checking. Sure, I can create a PR with a fix, but it may take until the weekend.

jonatan-ivanov commented 5 days ago

That's totally fine, our next release is in two weeks. I asked since this seems a good issue if one wants to contribute. If you don't or you won't find the time, that's of course 120% fine, just let me know and I'll fix it.

GFriedrich commented 3 days ago

hey @jonatan-ivanov, tried to fix the issue and found a few more issues, but let me start from the beginning:

Additionally I found the following other problems: