Skip to content

Commit c50172d

Browse files
committed
Undeprecate 'management.metrics.tags'
Closes gh-38583
1 parent 35eba69 commit c50172d

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MetricsProperties.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.util.Map;
2626

2727
import org.springframework.boot.context.properties.ConfigurationProperties;
28-
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
2928
import org.springframework.boot.context.properties.NestedConfigurationProperty;
3029

3130
/**
@@ -79,8 +78,6 @@ public Map<String, Boolean> getEnable() {
7978
return this.enable;
8079
}
8180

82-
@Deprecated(since = "3.2.0", forRemoval = true)
83-
@DeprecatedConfigurationProperty(replacement = "management.observations.key-values", since = "3.2.0")
8481
public Map<String, String> getTags() {
8582
return this.tags;
8683
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public class PropertiesMeterFilter implements MeterFilter {
5050

5151
private final MeterFilter mapFilter;
5252

53-
@SuppressWarnings("removal")
5453
public PropertiesMeterFilter(MetricsProperties properties) {
5554
Assert.notNull(properties, "Properties must not be null");
5655
this.properties = properties;

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,8 +1111,19 @@ These use the global registry that is not Spring-managed.
11111111

11121112
[[actuator.metrics.customizing.common-tags]]
11131113
==== Common Tags
1114+
Common tags are generally used for dimensional drill-down on the operating environment, such as host, instance, region, stack, and others.
1115+
Commons tags are applied to all meters and can be configured, as the following example shows:
11141116

1115-
You can configure common tags using the <<actuator#actuator.observability.common-key-values, configprop:management.observations.key-values[] property>>.
1117+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
1118+
----
1119+
management:
1120+
metrics:
1121+
tags:
1122+
region: "us-east-1"
1123+
stack: "prod"
1124+
----
1125+
1126+
The preceding example adds `region` and `stack` tags to all meters with a value of `us-east-1` and `prod`, respectively.
11161127

11171128
NOTE: The order of common tags is important if you use Graphite.
11181129
As the order of common tags cannot be guaranteed by using this approach, Graphite users are advised to define a custom `MeterFilter` instead.

0 commit comments

Comments
 (0)