@ -18,6 +18,8 @@ package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
@@ -18,6 +18,8 @@ package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
import java.util.Map ;
import io.micrometer.registry.otlp.AggregationTemporality ;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties ;
import org.springframework.boot.context.properties.ConfigurationProperties ;
@ -26,6 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -26,6 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* export .
*
* @author Eddú Meléndez
* @author Jonatan Ivanov
* @since 3 . 0 . 0
* /
@ConfigurationProperties ( prefix = "management.otlp.metrics.export" )
@ -36,6 +39,12 @@ public class OtlpProperties extends StepRegistryProperties {
@@ -36,6 +39,12 @@ public class OtlpProperties extends StepRegistryProperties {
* /
private String url = "http://localhost:4318/v1/metrics" ;
/ * *
* Aggregation temporality of sums . It defines the way additive values are expressed .
* This setting depends on the backend you use , some only support one temporality .
* /
private AggregationTemporality aggregationTemporality = AggregationTemporality . CUMULATIVE ;
/ * *
* Monitored resource ' s attributes .
* /
@ -54,6 +63,14 @@ public class OtlpProperties extends StepRegistryProperties {
@@ -54,6 +63,14 @@ public class OtlpProperties extends StepRegistryProperties {
this . url = url ;
}
public AggregationTemporality getAggregationTemporality ( ) {
return this . aggregationTemporality ;
}
public void setAggregationTemporality ( AggregationTemporality aggregationTemporality ) {
this . aggregationTemporality = aggregationTemporality ;
}
public Map < String , String > getResourceAttributes ( ) {
return this . resourceAttributes ;
}