filter
Adds a filter to exclude certain calls from metrics collection. When filters are configured, a call must match at least one filter to be recorded. If no filters are configured, all calls are recorded.
Example:
install(MicrometerMetrics) {
registry = prometheusMeterRegistry
filter { call -> call.request.uri !in setOf("/health", "/metrics") }
}Content copied to clipboard