Conversation
Let applications suppress noisy metrics before event processing using case-insensitive names or full regular expressions. Support external configuration, Android manifest metadata, and Spring Boot properties. Default Spring Boot applications to excluding Logback and Log4j2 counters to prevent logging-driven queue overload. Preserve explicit lists, including empty lists, and allow user callbacks to append, replace, or clear defaults. Keep plain Java and Android defaults unfiltered. Reuse the core matcher in a Sentry-local Micrometer MeterFilter to avoid registration and recording overhead without affecting other registries. Preserve partial exports for meters with multiple possible output names. Cover configuration, matching, name conversion, and filtering behavior with tests. Verify that filtering logging counters prevents queue overflow and preserves business metrics during a 100,000-log-per-second workload. Co-Authored-By: Codex <noreply@openai.com>
Contributor
|
📲 Install BuildsAndroid
|
This was referenced Sep 23, 2026
Merge the Spring Boot registry scopes change from #6116 into #6155. Use the same injected scopes for registration filtering and recording so custom scopes do not accidentally inherit global ignored-metric options. Resolve test imports, supply options in injected-scope fixtures, and cover filtering with distinct global and injected ignore lists. Preserve the existing logging defaults and explicit override behavior. Refs #6116 Refs #6155 Co-Authored-By: Claude <noreply@anthropic.com>
Merge the Boot 3 and Boot 4 sample endpoints and dual-registry system tests from #6116 into the ignored-metrics branch. Keep the top of the stack in sync without rewriting its history. Verify all 18 metrics system tests against Boot 2, 3, and 4 with the ignored-metrics defaults applied. Formatting and API checks also pass. Refs #6116 Refs #6155 Co-Authored-By: Claude <noreply@anthropic.com>
Apply the default logging metric exclusions only when the Micrometer integration is enabled. This keeps manual metrics unchanged for Spring Boot applications that have not opted into Micrometer export. Cover disabled and enabled behavior across all supported Boot versions and align the integration documentation with the scoped defaults. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Micrometer)
📜 Description
Add
options.getMetrics().setIgnoredMetrics(...)andaddIgnoredMetric(...)to filter final metric names using case-insensitive exact matches or full regular-expression matches.MeterFilterto avoid registering ignored meters. Only deny multi-output meters when all possible exported names are ignored; the core filter remains authoritative.metrics.ignored-metricsin external configuration,io.sentry.metrics.ignored-metricsin the Android manifest, andsentry.metrics.ignored-metricsin Spring Boot properties.logback.eventsandlog4j2.eventswhen the list is unset. Apply defaults before user callbacks; explicit lists replace the defaults and empty lists disable filtering. Plain Java and Android remain unfiltered by default.Other Micrometer registries and actual logging are unaffected. Name filters also apply to manually recorded Sentry metrics with the same names. Configure filters before meter registration: clearing a filter later does not reactivate a previously returned no-op meter. Intentional ignores do not produce client reports.
💡 Motivation and Context
Micrometer logging counters forward each log event individually through this registry. A Logback load test at 100,000 logs/sec lost approximately 98% of both logging and independent business increments through the shared metrics queue. Explicit logging-name filters preserved all 2,000 business increments during a 20-second, two-million-log workload, with zero client-reported drops and allocation near the no-Sentry baseline.
The declarative option avoids per-event callback overhead and provides early Micrometer filtering without a Boot-wide filter that would also affect other exporters. Spring Boot defaults protect the common Actuator setup while allowing customers to replace or clear the exclusions.
💚 How did you test it?
./gradlew spotlessApply apiDumpand./gradlew spotlessCheck apiCheckpassed.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Review the public option API and add the filtering/defaults guidance to the generic Java and Spring Boot documentation.