Commit 441dd2bc authored by Stephane Nicoll's avatar Stephane Nicoll

Move endpoints.trace.filter to management.trace.filter

Closes gh-10007
parent 54781c73
...@@ -45,7 +45,7 @@ import org.springframework.web.servlet.DispatcherServlet; ...@@ -45,7 +45,7 @@ import org.springframework.web.servlet.DispatcherServlet;
@Configuration @Configuration
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class, ServletRegistration.class }) @ConditionalOnClass({ Servlet.class, DispatcherServlet.class, ServletRegistration.class })
@AutoConfigureAfter(TraceRepositoryAutoConfiguration.class) @AutoConfigureAfter(TraceRepositoryAutoConfiguration.class)
@ConditionalOnProperty(prefix = "endpoints.trace.filter", name = "enabled", matchIfMissing = true) @ConditionalOnProperty(prefix = "management.trace.filter", name = "enabled", matchIfMissing = true)
@EnableConfigurationProperties(TraceProperties.class) @EnableConfigurationProperties(TraceProperties.class)
public class TraceWebFilterAutoConfiguration { public class TraceWebFilterAutoConfiguration {
......
...@@ -73,10 +73,14 @@ ...@@ -73,10 +73,14 @@
} }
}, },
{ {
"name": "endpoints.trace.filter.enabled", "name": "endpoints.trace.filter.enabled",
"type": "java.lang.Boolean", "type": "java.lang.Boolean",
"description": "Enable the trace servlet filter.", "description": "Enable the trace servlet filter.",
"defaultValue": true "defaultValue": true,
"deprecation": {
"replacement": "management.trace.filter.enabled",
"level": "error"
}
}, },
{ {
"name": "info", "name": "info",
...@@ -217,6 +221,12 @@ ...@@ -217,6 +221,12 @@
"name": "management.security.sessions", "name": "management.security.sessions",
"defaultValue": "stateless" "defaultValue": "stateless"
}, },
{
"name": "management.trace.filter.enabled",
"type": "java.lang.Boolean",
"description": "Enable the trace servlet filter.",
"defaultValue": true
},
{ {
"name": "spring.git.properties", "name": "spring.git.properties",
"type": "java.lang.String", "type": "java.lang.String",
......
...@@ -64,7 +64,7 @@ public class TraceWebFilterAutoConfigurationTests { ...@@ -64,7 +64,7 @@ public class TraceWebFilterAutoConfigurationTests {
@Test @Test
public void skipsFilterIfPropertyDisabled() throws Exception { public void skipsFilterIfPropertyDisabled() throws Exception {
load("endpoints.trace.filter.enabled:false"); load("management.trace.filter.enabled:false");
assertThat(this.context.getBeansOfType(WebRequestTraceFilter.class).size()) assertThat(this.context.getBeansOfType(WebRequestTraceFilter.class).size())
.isEqualTo(0); .isEqualTo(0);
} }
......
...@@ -1195,7 +1195,6 @@ content into your application; rather pick only the properties that you need. ...@@ -1195,7 +1195,6 @@ content into your application; rather pick only the properties that you need.
# TRACE ENDPOINT ({sc-spring-boot-actuator}/endpoint/TraceEndpoint.{sc-ext}[TraceEndpoint]) # TRACE ENDPOINT ({sc-spring-boot-actuator}/endpoint/TraceEndpoint.{sc-ext}[TraceEndpoint])
endpoints.trace.cache.time-to-live=0 # Maximum time in milliseconds that a response can be cached. endpoints.trace.cache.time-to-live=0 # Maximum time in milliseconds that a response can be cached.
endpoints.trace.enabled=true # Enable the trace endpoint. endpoints.trace.enabled=true # Enable the trace endpoint.
endpoints.trace.filter.enabled=true # Enable the trace servlet filter.
endpoints.trace.jmx.enabled=true # Expose the trace endpoint as a JMX MBean. endpoints.trace.jmx.enabled=true # Expose the trace endpoint as a JMX MBean.
endpoints.trace.web.enabled=false # Expose the trace endpoint as a Web endpoint. endpoints.trace.web.enabled=false # Expose the trace endpoint as a Web endpoint.
...@@ -1280,6 +1279,7 @@ content into your application; rather pick only the properties that you need. ...@@ -1280,6 +1279,7 @@ content into your application; rather pick only the properties that you need.
management.metrics.filter.gauge-submissions= # Submissions that should be made to the gauge. management.metrics.filter.gauge-submissions= # Submissions that should be made to the gauge.
# TRACING ({sc-spring-boot-actuator}/trace/TraceProperties.{sc-ext}[TraceProperties]) # TRACING ({sc-spring-boot-actuator}/trace/TraceProperties.{sc-ext}[TraceProperties])
management.trace.filter.enabled=true # Enable the trace servlet filter.
management.trace.include=request-headers,response-headers,cookies,errors # Items to be included in the trace. management.trace.include=request-headers,response-headers,cookies,errors # Items to be included in the trace.
# METRICS EXPORT ({sc-spring-boot-actuator}/metrics/export/MetricExportProperties.{sc-ext}[MetricExportProperties]) # METRICS EXPORT ({sc-spring-boot-actuator}/metrics/export/MetricExportProperties.{sc-ext}[MetricExportProperties])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment