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 GRPC request exception logging #3621

Closed
asifsmohammed opened this issue Nov 9, 2023 · 1 comment · Fixed by #3658
Closed

Improve GRPC request exception logging #3621

asifsmohammed opened this issue Nov 9, 2023 · 1 comment · Fixed by #3658
Assignees
Labels
bug Something isn't working
Milestone

Comments

@asifsmohammed
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Right now it's not easy to debug 500 errors in any otel source, if there is an exception which is not an instance of RequestTimeoutException, TimeoutException, SizeOverflowException, BadRequestException, RequestCancelledException we increment the internalServerError metric. With this metric it's not possible to debug the failures without any logging.

We also return a description with status but looks like the e.getMessage() can be null.

message = e.getMessage() == null ? status.getCode().name() : e.getMessage();

Describe the solution you'd like
Add a log statement when incrementing the internalServerError metric.
Log should include getCause of throwable if getMessage of the exception is null.

@dlvenable
Copy link
Member

I agree with this. With an unknown error like this, we should also log the entire stack trace.

e.g.

log.error("Unexpected exception handling request", e);

@dlvenable dlvenable added bug Something isn't working and removed untriaged labels Nov 9, 2023
@asifsmohammed asifsmohammed self-assigned this Nov 10, 2023
@github-project-automation github-project-automation bot moved this from Unplanned to Done in Data Prepper Tracking Board Nov 15, 2023
@dlvenable dlvenable added this to the v2.6 milestone Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants