Undeprecate 'management.metrics.tags'

Closes gh-38583
This commit is contained in:
Moritz Halbritter
2023-12-13 08:26:11 +01:00
parent 35eba69996
commit c50172d5c7
3 changed files with 12 additions and 5 deletions

View File

@@ -1111,8 +1111,19 @@ These use the global registry that is not Spring-managed.
[[actuator.metrics.customizing.common-tags]]
==== Common Tags
Common tags are generally used for dimensional drill-down on the operating environment, such as host, instance, region, stack, and others.
Commons tags are applied to all meters and can be configured, as the following example shows:
You can configure common tags using the <<actuator#actuator.observability.common-key-values, configprop:management.observations.key-values[] property>>.
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
management:
metrics:
tags:
region: "us-east-1"
stack: "prod"
----
The preceding example adds `region` and `stack` tags to all meters with a value of `us-east-1` and `prod`, respectively.
NOTE: The order of common tags is important if you use Graphite.
As the order of common tags cannot be guaranteed by using this approach, Graphite users are advised to define a custom `MeterFilter` instead.