-
Notifications
You must be signed in to change notification settings - Fork 499
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
Unify Errors #286
Comments
Would it be appropriate to use |
@cpcloud yeah I think that probably makes the most sense |
@cpcloud it could also be useful to re-evalutate the proper level of granularity, i.e. as a consumer of these APIs, what level of error information is worth responding to? Could for example go down to effectively two enum values, |
The way I would want to handle errors from this library (and related workspace crates) is:
That way, I can easily choose (as long as my crate is using |
I'd be happy to review a PR to that effect, are there good example crates that define errors well with respect to granularity that you've found? |
#263 would likely be a part of this |
Perhaps at the risk of piling on here, I'm finding |
Hm, that doesn't compile for me because |
close via #371 |
Currently the metrics module uses a
MetricsError
type while the trace module was created before the spec allowed for error results and therefore does not have any result types. Exporters are using variations ofstd::error::Error
. We should consider introducing anopentelemetry::Error
type and update the exporters to use it.global::handle_error
should also accept this type, and the tracing module should call this function internally instead of dropping errors.The text was updated successfully, but these errors were encountered: