Skip to content

Commit 441dd2b

Browse files
committed
Move endpoints.trace.filter to management.trace.filter
Closes gh-10007
1 parent 54781c7 commit 441dd2b

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

Diff for: spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/trace/TraceWebFilterAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
@Configuration
4646
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class, ServletRegistration.class })
4747
@AutoConfigureAfter(TraceRepositoryAutoConfiguration.class)
48-
@ConditionalOnProperty(prefix = "endpoints.trace.filter", name = "enabled", matchIfMissing = true)
48+
@ConditionalOnProperty(prefix = "management.trace.filter", name = "enabled", matchIfMissing = true)
4949
@EnableConfigurationProperties(TraceProperties.class)
5050
public class TraceWebFilterAutoConfiguration {
5151

Diff for: spring-boot-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json

+14-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,14 @@
7373
}
7474
},
7575
{
76-
"name": "endpoints.trace.filter.enabled",
77-
"type": "java.lang.Boolean",
78-
"description": "Enable the trace servlet filter.",
79-
"defaultValue": true
76+
"name": "endpoints.trace.filter.enabled",
77+
"type": "java.lang.Boolean",
78+
"description": "Enable the trace servlet filter.",
79+
"defaultValue": true,
80+
"deprecation": {
81+
"replacement": "management.trace.filter.enabled",
82+
"level": "error"
83+
}
8084
},
8185
{
8286
"name": "info",
@@ -217,6 +221,12 @@
217221
"name": "management.security.sessions",
218222
"defaultValue": "stateless"
219223
},
224+
{
225+
"name": "management.trace.filter.enabled",
226+
"type": "java.lang.Boolean",
227+
"description": "Enable the trace servlet filter.",
228+
"defaultValue": true
229+
},
220230
{
221231
"name": "spring.git.properties",
222232
"type": "java.lang.String",

Diff for: spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/trace/TraceWebFilterAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void overrideTraceFilter() throws Exception {
6464

6565
@Test
6666
public void skipsFilterIfPropertyDisabled() throws Exception {
67-
load("endpoints.trace.filter.enabled:false");
67+
load("management.trace.filter.enabled:false");
6868
assertThat(this.context.getBeansOfType(WebRequestTraceFilter.class).size())
6969
.isEqualTo(0);
7070
}

Diff for: spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,6 @@ content into your application; rather pick only the properties that you need.
11951195
# TRACE ENDPOINT ({sc-spring-boot-actuator}/endpoint/TraceEndpoint.{sc-ext}[TraceEndpoint])
11961196
endpoints.trace.cache.time-to-live=0 # Maximum time in milliseconds that a response can be cached.
11971197
endpoints.trace.enabled=true # Enable the trace endpoint.
1198-
endpoints.trace.filter.enabled=true # Enable the trace servlet filter.
11991198
endpoints.trace.jmx.enabled=true # Expose the trace endpoint as a JMX MBean.
12001199
endpoints.trace.web.enabled=false # Expose the trace endpoint as a Web endpoint.
12011200
@@ -1280,6 +1279,7 @@ content into your application; rather pick only the properties that you need.
12801279
management.metrics.filter.gauge-submissions= # Submissions that should be made to the gauge.
12811280
12821281
# TRACING ({sc-spring-boot-actuator}/trace/TraceProperties.{sc-ext}[TraceProperties])
1282+
management.trace.filter.enabled=true # Enable the trace servlet filter.
12831283
management.trace.include=request-headers,response-headers,cookies,errors # Items to be included in the trace.
12841284
12851285
# METRICS EXPORT ({sc-spring-boot-actuator}/metrics/export/MetricExportProperties.{sc-ext}[MetricExportProperties])

0 commit comments

Comments
 (0)