-
Notifications
You must be signed in to change notification settings - Fork 823
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
GrpcExceptionListener handle exceptions outside of observation scope #1088
Comments
I had the same issue with previous lib version: sleuth context was closed before I could log traceId in exception handler. And had to implement own GlobalServerInterceptorRegistry and switch TracingServerInterceptor and GrpcExceptionInterceptor. It's not what I'd like to do manually, so I will upvote and follow the thread. |
We have similar problem in our applications. Logs in @GrpcService are inside observation context but logs in GrpcExceptionHandler are not. This prevents us from correlating error to specific transaction.
I am also uploading a sample application: |
The bug
The GrpcAdviceAutoConfiguration class initialises the global exception handler with higher precedence than the GrpcServerMicrometerTraceAutoConfiguration class, causing the GrpcExceptionListener to handle exceptions outside of observation scope and making it impossible for the exception handlers declared in @GrpcAdvice annotated classes to access the current tracing context.
Stacktrace and logs
The application's environment
Which versions do you use?
Additional context
The text was updated successfully, but these errors were encountered: