Skip to content

GrpcServerObservationAutoConfiguration Bean should use custom GrpcServerObservationConvention #49827

@rafal-dudek

Description

@rafal-dudek

GrpcServerObservationAutoConfiguration should use ObjectProvider<GrpcServerObservationConvention> to create ObservationGrpcServerInterceptor bean.
Additionally, @ConditionalOnMissingBean annotation would be appreciated.

Currently, we need to exclude GrpcServerObservationAutoConfiguration and create bean by ourselves, to use custom GrpcServerObservationConvention.

Similar behaviour is already done for the client interceptor: https://github.com/spring-projects/spring-grpc/blob/main/spring-grpc-client-spring-boot-autoconfigure/src/main/java/org/springframework/boot/grpc/client/autoconfigure/GrpcClientObservationAutoConfiguration.java
But for server interceptor it is using hardcoded default convention: https://github.com/spring-projects/spring-grpc/blob/main/spring-grpc-server-spring-boot-autoconfigure/src/main/java/org/springframework/boot/grpc/server/autoconfigure/GrpcServerObservationAutoConfiguration.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions