grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.46k stars 811 forks source link

Add userAgent property to GrpcChannelProperties #998

Closed onyn closed 8 months ago

onyn commented 8 months ago

ManagedChannelBuilder have userAgent property, which GrpcChannelProperties lacks. This data is useful for metrics by client.

Currently I use workaround:

    @Bean
    GrpcChannelConfigurer configurer(@Value("${spring.application.name}") String appName) {
        return (builder, name) -> {
            builder.userAgent(appName);
        };
    }
ST-DDT commented 8 months ago

Sounds useful. Would you like to create a PR for this?