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

Improve error logging for OTLP gRPC exporter #4393

Open
dashpole opened this issue Jan 22, 2025 · 1 comment
Open

Improve error logging for OTLP gRPC exporter #4393

dashpole opened this issue Jan 22, 2025 · 1 comment

Comments

@dashpole
Copy link
Contributor

Is your feature request related to a problem?

I used the gRPC exporter, and it failed to export to my backend (this was my fault). I got the following error, even when debug logging was enabled:

ERROR:opentelemetry.exporter.otlp.proto.grpc.exporter:Failed to export metrics to <endpoint>, error code: StatusCode.INVALID_ARGUMENT

It looks like the error message is not being logged here:

logger.error(
"Failed to export %s to %s, error code: %s",
self._exporting,
self._endpoint,
error.code(),
exc_info=error.code() == StatusCode.UNKNOWN,
)

Describe the solution you'd like

I would like to log the error's details.

Describe alternatives you've considered

No response

Additional Context

This may also apply to the trace or log grpc exporter. I haven't checked

Would you like to implement a fix?

No

@dashpole
Copy link
Contributor Author

cc @aabmass

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

No branches or pull requests

1 participant