Customizing Individual Metrics
If you need to apply customizations to specific Meter instances, you can use the io.micrometer.core.instrument.config.MeterFilter interface.
For example, if you want to rename the mytag.region tag to mytag.area for all meter IDs beginning with com.example, you can do the following:
- 
Java 
- 
Kotlin 
import io.micrometer.core.instrument.config.MeterFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration(proxyBeanMethods = false)
public class MyMetricsFilterConfiguration {
	@Bean
	public MeterFilter renameRegionTagMeterFilter() {
		return MeterFilter.renameTag("com.example", "mytag.region", "mytag.area");
	}
}import io.micrometer.core.instrument.config.MeterFilter
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@Configuration(proxyBeanMethods = false)
class MyMetricsFilterConfiguration {
	@Bean
	fun renameRegionTagMeterFilter(): MeterFilter {
		return MeterFilter.renameTag("com.example", "mytag.region", "mytag.area")
	}
}| By default, all MeterFilterbeans are automatically bound to the Spring-managedMeterRegistry.
Make sure to register your metrics by using the Spring-managedMeterRegistryand not any of the static methods onMetrics.
These use the global registry that is not Spring-managed. | 
Common Tags
Common tags are generally used for dimensional drill-down on the operating environment, such as host, instance, region, stack, and others. Commons tags are applied to all meters and can be configured, as the following example shows:
- 
Properties 
- 
YAML 
management.metrics.tags.region=us-east-1
management.metrics.tags.stack=prodmanagement:
  metrics:
    tags:
      region: "us-east-1"
      stack: "prod"The preceding example adds region and stack tags to all meters with a value of us-east-1 and prod, respectively.
| The order of common tags is important if you use Graphite.
As the order of common tags cannot be guaranteed by using this approach, Graphite users are advised to define a custom MeterFilterinstead. | 
Per-meter Properties
In addition to MeterFilter beans, you can apply a limited set of customization on a per-meter basis using properties.
Per-meter customizations are applied, using Spring Boot’s PropertiesMeterFilter, to any meter IDs that start with the given name.
The following example filters out any meters that have an ID starting with example.remote.
- 
Properties 
- 
YAML 
management.metrics.enable.example.remote=falsemanagement:
  metrics:
    enable:
      example:
        remote: falseThe following properties allow per-meter customization:
| Property | Description | 
|---|---|
| 
 | Whether to accept meters with certain IDs.
  Meters that are not accepted are filtered from the  | 
| 
 | Whether to publish a histogram suitable for computing aggregable (across dimension) percentile approximations. | 
| 
 | Publish fewer histogram buckets by clamping the range of expected values. | 
| 
 | Publish percentile values computed in your application | 
| 
 | Give greater weight to recent samples by accumulating them in ring buffers which rotate after a configurable expiry, with a configurable buffer length. | 
| 
 | Publish a cumulative histogram with buckets defined by your service-level objectives. | 
For more details on the concepts behind percentiles-histogram, percentiles, and slo, see the “Histograms and percentiles” section of the Micrometer documentation.