Open taer opened 2 years ago
Thank you for letting us know. We should probably take the TagsProvider
approach used elsewhere for the default tags and allowing customization.
I've opened #2807 about the Datadog reserved tag keys.
I made a quick TagProvider version PR. Open to any tweaks. I based it off 1.7, but it looks like it will apply to either.
Isn't customization possible by using the counterCustomizer
and timerCustomizer
?
Please describe the feature request. The AbstractMetricCollectingInterceptor for the Grpc metrics currently hardcodes the tags for service, method, etc. It would be nice to allow this to be overridden on construction. The current tags are here: https://github.com/micrometer-metrics/micrometer/blob/67c41db552cac463e44cd45545e5a7b8f3513f1b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/grpc/AbstractMetricCollectingInterceptor.java#L48
Rationale The
service
tag used to tag the grpc service is a fairly common tag. Some metric sinks even call it "reserved": https://docs.datadoghq.com/getting_started/tagging/Additional context It's possible to do this with a MeterFilter.renameTag call, but the metric code lives in a library. This means all consumers of the library would have to remember and perform this same rename.