Skip to content
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

Observability service getting empty errors in the callback function #713

Closed
joaopgrassi opened this issue Aug 25, 2021 · 0 comments · Fixed by #715
Closed

Observability service getting empty errors in the callback function #713

joaopgrassi opened this issue Aug 25, 2021 · 0 comments · Fixed by #715

Comments

@joaopgrassi
Copy link
Contributor

joaopgrassi commented Aug 25, 2021

While implementing the ObservabilityService interface to work with OpenTelemetry, I noticed that when errors happen during the several operations in cloudevents (client.go Send method), the callback in the observability service func(errOrResult error) is invoked with an empty error. Depending on the use case, developers would want to maybe mark the span created by the ObservabilityService as failed, but without the error result it's not possible to figure it out.

I started debugging to see why, and I found out that in several places the callback is called in a defer but before the error is actually collected. For example, here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant