Skip to content

fix: Server exception handler interceptor order#1192

Open
jonwillard wants to merge 2 commits into
grpc-ecosystem:masterfrom
jonwillard:server-exception-handler-order
Open

fix: Server exception handler interceptor order#1192
jonwillard wants to merge 2 commits into
grpc-ecosystem:masterfrom
jonwillard:server-exception-handler-order

Conversation

@jonwillard
Copy link
Copy Markdown

@jonwillard jonwillard commented Jan 28, 2026

This PR adds the GrpcExceptionInterceptor bean after the ObservationGrpcServerInterceptor and the MetricCollectingServerInterceptor and before the ExceptionTranslatingServerInterceptor.

This builds off #1134 by adding tests requested by @ST-DDT

This resolves an issue where metrics emitted always report UNKNOWN status code when @GrpcAdvice is used to handle exceptions. I have tested and deployed a gRPC server application that uses this library with the fix from this branch and the metrics correctly report status as expected. 

Fixes: #789 #1088

@jonwillard jonwillard changed the title Server exception handler order fix: Server exception handler interceptor order Jan 28, 2026
@jonwillard
Copy link
Copy Markdown
Author

Can you please review @ST-DDT?

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 this pull request may close these issues.

Server metrics are tagged with the wrong status codes

1 participant