-
Notifications
You must be signed in to change notification settings - Fork 451
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
Update ExportResult: use std::result::Result type #331
Comments
Is this type actually necessary anymore if there are only two possibilities? or would a result type of some kind be more idiomatic? |
I think we can define a |
Yeah, that's a good point. Let's use a I wonder if we should keep the name |
Seems like the only purpose here may be calling an error handler as both success and failure will drop the span data. If that is the case then #263 may be the only code path that would use this type? |
Yeah, that's how I understand this as well. In theory someone could implement a custom span processor to control when spans are exported. This would mean they would also be exposed to the export result. I'd say something like this should be good enough: type ExportResult = Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> |
Update
ExportResult
to match the latest version in the spec:https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#exportbatch
Since this only defines 2 states now (error and success), we should probably go the idiomatic Rust route and use a
std::result::Result
.The text was updated successfully, but these errors were encountered: