chore: Enable netty metrics based on env var (#36108)
This commit is contained in:
parent
4a8fb690ed
commit
f68f325a53
|
|
@ -67,6 +67,9 @@ public class CommonConfig {
|
|||
@Value("${appsmith.micrometer.tracing.detail.enabled:false}")
|
||||
private boolean tracingDetail;
|
||||
|
||||
@Value("${appsmith.micrometer.metrics.detail.enabled:false}")
|
||||
private boolean metricsDetail;
|
||||
|
||||
private List<String> allowedDomains;
|
||||
|
||||
private String mongoDBVersion;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,22 @@
|
|||
package com.appsmith.server.configurations;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
public class ReactorNettyConfiguration implements WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
|
||||
|
||||
private final CommonConfig commonConfig;
|
||||
|
||||
@Override
|
||||
public void customize(NettyReactiveWebServerFactory factory) {
|
||||
factory.addServerCustomizers(httpServer -> httpServer.metrics(true, Function.identity()));
|
||||
if (commonConfig.isMetricsDetail()) {
|
||||
factory.addServerCustomizers(httpServer -> httpServer.metrics(true, Function.identity()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ appsmith.newrelic.micrometer.metrics.application.name=${APPSMITH_NEWRELIC_MICROM
|
|||
spring.application.name=${OTEL_SERVICE_NAME:appsmith-anonymous}
|
||||
appsmith.micrometer.metrics.enabled=${APPSMITH_MICROMETER_METRICS_ENABLED:false}
|
||||
appsmith.micrometer.tracing.detail.enabled=${APPSMITH_ENABLE_TRACING_DETAIL:false}
|
||||
appsmith.micrometer.metrics.detail.enabled=${APPSMITH_ENABLE_METRICS_DETAIL:false}
|
||||
|
||||
springdoc.api-docs.path=/v3/docs
|
||||
springdoc.swagger-ui.path=/v3/swagger
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user