|
This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Cloud Config 5.1.0! |
Observability
Observability - Metrics
Below you can find a list of all metrics declared by this project.
Environment Repository
Observation created around an EnvironmentRepository.
Metric name spring.cloud.config.environment.find (defined by convention class org.springframework.cloud.config.server.environment.ObservationEnvironmentRepositoryObservationConvention). Type timer.
Metric name spring.cloud.config.environment.find.active (defined by convention class org.springframework.cloud.config.server.environment.ObservationEnvironmentRepositoryObservationConvention). Type long task timer.
| KeyValues that are added after starting the Observation might be missing from the *.active metrics. |
Micrometer internally uses nanoseconds for the baseunit. However, each backend determines the actual baseunit. (i.e. Prometheus uses seconds)
|
Fully qualified name of the enclosing class org.springframework.cloud.config.server.environment.DocumentedConfigObservation.
Applications can customize the observation metadata for environment repository operations by providing a custom ObservationConvention<ObservationEnvironmentRepositoryContext> bean.
For example:
import io.micrometer.common.KeyValue;
import io.micrometer.common.KeyValues;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationConvention;
import org.springframework.cloud.config.server.environment.ObservationEnvironmentRepositoryContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ObservationConfiguration {
@Bean
ObservationConvention<ObservationEnvironmentRepositoryContext> environmentRepositoryObservationConvention() {
return new ObservationConvention<>() {
@Override
public KeyValues getLowCardinalityKeyValues(ObservationEnvironmentRepositoryContext context) {
return KeyValues.of(
KeyValue.of("spring.cloud.config.environment.repository.type", "custom")
);
}
@Override
public boolean supportsContext(Observation.Context context) {
return context instanceof ObservationEnvironmentRepositoryContext;
}
@Override
public String getName() {
return "spring.cloud.config.environment.find";
}
};
}
}
| A custom convention replaces the default one, rather than adding to it. The example above therefore reports only the tags explicitly defined by the custom convention. |
When a custom convention bean is provided, it is used instead of the default convention. This allows applications to customize observation tags and avoid high-cardinality values.
When no custom convention bean is provided, the default ObservationEnvironmentRepositoryObservationConvention is used. A custom convention replaces the default, so its supportsContext must return true for ObservationEnvironmentRepositoryContext.
All tags must be prefixed with spring.cloud.config.environment prefix!
|
Name |
Description |
|
Application name for which properties are being queried for. |
|
Implementation of the EnvironmentRepository. |
|
Label for which properties are being queried for. |
|
Application name for which properties are being queried for. |
Observability - Spans
Below you can find a list of all spans declared by this project.
Environment Repository Span
Observation created around an EnvironmentRepository.
Span name spring.cloud.config.environment.find (defined by convention class org.springframework.cloud.config.server.environment.ObservationEnvironmentRepositoryObservationConvention).
Fully qualified name of the enclosing class org.springframework.cloud.config.server.environment.DocumentedConfigObservation.
All tags must be prefixed with spring.cloud.config.environment prefix!
|
Name |
Description |
|
Application name for which properties are being queried for. |
|
Implementation of the EnvironmentRepository. |
|
Label for which properties are being queried for. |
|
Application name for which properties are being queried for. |