Expose properties for Metric tag names
Please consider adding properties that users can easily customize for the metric tag names: service, method, method.type, status.code.
Please also report/request that feature there as we will eventually switch to that one. https://github.com/micrometer-metrics/micrometer/tree/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/grpc
A Micrometer PR has been added to enable customization of the classes in Micrometer itself.
For this PR (in this starter repo), I'm hoping we can add configurable Spring Boot properties to configure these. I wonder if something like the following might make sense:
grpc:
server:
metrics:
processing-duration:
meter-id: grpc.server.processing.duration
tags:
service-name: service
method-name: rpc
method-type: rpc.type
status-code: status.code
Since we are going to replace our implementation with the micrometer one in the next version please use the following feature in the meantime: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator.metrics.customizing
@Bean
public MeterFilter renameRegionTagMeterFilter() {
return MeterFilter.renameTag("com.example", "mytag.region", "mytag.area");
}