mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
ATS-126 : Expose JVM metrics - eg. CPU & Memory (within jvm process / container)
- addressed review comments
This commit is contained in:
parent
6a7bbb3c4e
commit
8e7e775eef
@ -24,11 +24,11 @@ import org.springframework.context.annotation.Bean;
|
||||
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
|
||||
public class Application
|
||||
{
|
||||
@Value("${pod.name}")
|
||||
private String podName;
|
||||
@Value("${container.name}")
|
||||
private String containerName;
|
||||
|
||||
@Bean MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
|
||||
return registry -> registry.config().commonTags("podName", podName);
|
||||
return registry -> registry.config().commonTags("containerName", containerName);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -24,11 +24,11 @@ import org.springframework.context.annotation.Bean;
|
||||
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
|
||||
public class Application
|
||||
{
|
||||
@Value("${pod.name}")
|
||||
private String podName;
|
||||
@Value("${container.name}")
|
||||
private String containerName;
|
||||
|
||||
@Bean MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
|
||||
return registry -> registry.config().commonTags("podName", podName);
|
||||
return registry -> registry.config().commonTags("containerName", containerName);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -24,11 +24,11 @@ import org.springframework.context.annotation.Bean;
|
||||
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
|
||||
public class Application
|
||||
{
|
||||
@Value("${pod.name}")
|
||||
private String podName;
|
||||
@Value("${container.name}")
|
||||
private String containerName;
|
||||
|
||||
@Bean MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
|
||||
return registry -> registry.config().commonTags("podName", podName);
|
||||
return registry -> registry.config().commonTags("containerName", containerName);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -24,11 +24,11 @@ import org.springframework.context.annotation.Bean;
|
||||
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
|
||||
public class Application
|
||||
{
|
||||
@Value("${pod.name}")
|
||||
private String podName;
|
||||
@Value("${container.name}")
|
||||
private String containerName;
|
||||
|
||||
@Bean MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
|
||||
return registry -> registry.config().commonTags("podName", podName);
|
||||
return registry -> registry.config().commonTags("containerName", containerName);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -32,5 +32,5 @@ management:
|
||||
enable[tomcat]: false
|
||||
enable[jvm.classes]: false
|
||||
|
||||
pod:
|
||||
name: ${POD_NAME:t-engine}
|
||||
container:
|
||||
name: ${HOSTNAME:t-engine}
|
Loading…
x
Reference in New Issue
Block a user