Skip to content

Commit f1178e6

Browse files
committed
Remove management.observations.long-task-timer.enabled
This commit removes the m.observations.long-task-timer.enabled property in favor of the existing m.metrics.observations.ignored-meters property. Closes gh-45725
1 parent 9c792bd commit f1178e6

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

module/spring-boot-micrometer-observation/src/main/java/org/springframework/boot/micrometer/observation/autoconfigure/ObservationProperties.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ public class ObservationProperties {
4545
*/
4646
private Map<String, Boolean> enable = new LinkedHashMap<>();
4747

48-
private final LongTaskTimer longTaskTimer = new LongTaskTimer();
49-
5048
public Map<String, Boolean> getEnable() {
5149
return this.enable;
5250
}
@@ -67,10 +65,6 @@ public void setKeyValues(Map<String, String> keyValues) {
6765
this.keyValues = keyValues;
6866
}
6967

70-
public LongTaskTimer getLongTaskTimer() {
71-
return this.longTaskTimer;
72-
}
73-
7468
public static class Http {
7569

7670
private final Client client = new Client();
@@ -141,21 +135,4 @@ public void setName(String name) {
141135

142136
}
143137

144-
public static class LongTaskTimer {
145-
146-
/**
147-
* Whether to create a LongTaskTimer for every observation.
148-
*/
149-
private boolean enabled = true;
150-
151-
public boolean isEnabled() {
152-
return this.enabled;
153-
}
154-
155-
public void setEnabled(boolean enabled) {
156-
this.enabled = enabled;
157-
}
158-
159-
}
160-
161138
}

module/spring-boot-micrometer-observation/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
"defaultValue": false
99
},
1010
{
11-
"name": "management.observations.annotations.long-lask-timer.enabled",
12-
"type": "java.lang.boolean",
13-
"description": "Whether to create a LongTaskTimer for every observation.",
14-
"defaultValue": true,
11+
"name": "management.observations.long-task-timer.enabled",
12+
"type": "java.lang.Boolean",
1513
"deprecation": {
1614
"level": "error",
1715
"replacement": "management.metrics.observations.ignored-meters"

0 commit comments

Comments
 (0)