-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different Exporter::shutdown() interface across signals #2262
Comments
Hey @lalitb , happy to clean this one up, but first some questions:
Feel free to assign it to me 💪 |
Following chat on CNCF slack, I'll pick this one up! |
I vote for returning the status, so tracing and logs to be consistent with metrics. Also, good to see what specs says and other language implementation does.
We are still good with doing breaking changes with SDK. If it can be deprecated first while introducing new API that will be ideal. |
@lalitb , thanks for the input 💪
I agree; there's a couple situations where actual errors pop up in each of these cases that are being swallowed in the trace and logs impls. This is mainly to do with the acquisition of locks:
In the metrics case, we have e.g. this, where we are propagating the error: opentelemetry-rust/opentelemetry-otlp/src/exporter/http/metrics.rs Lines 44 to 48 in b35c0d6
One trace variant has the potential to hit a similar error, but this is swallowed: opentelemetry-rust/opentelemetry-otlp/src/exporter/http/trace.rs Lines 66 to 68 in b35c0d6
... and the same for logs: opentelemetry-rust/opentelemetry-otlp/src/exporter/http/logs.rs Lines 50 to 52 in b35c0d6
These are admittedly unlikely errors, but if they do come up something must be fairly wrong, and at least logging these would be helpful! |
We could do this, but it would have to be a whole new method, and it'd be quite a sprawl through the code base, as we'd have to handle the variants down through the tree of clients too. You can get a feel for the scope of this on the PR I linked above. As it's "only" a lint for users - "You should do something with this return value" - my gut feeling is that it'd be better to include a note about this in release notes, and pull the bandaid off. What do you think @lalitb ? |
It'll be hard to do that, as there is only one release (0.28) planned before stable, and we should not have breaking changes after 0.28... I am okay with breaking change for 0.28. |
Metrics:
opentelemetry-rust/opentelemetry-sdk/src/metrics/exporter.rs
Line 30 in a5e2061
Trace:
opentelemetry-rust/opentelemetry-sdk/src/export/trace.rs
Line 46 in a5e2061
Logs:
opentelemetry-rust/opentelemetry-sdk/src/export/logs/mod.rs
Line 87 in a5e2061
Logs and Trace are similar, Metrics return the status. Specs doesn't mandates returning status.
This should not be a big deal, just opening the issue to track.
The text was updated successfully, but these errors were encountered: