Skip to content

Enabled filtering of metrics in the LoggingEmitter#19026

Open
nozjkoitop wants to merge 5 commits intoapache:masterfrom
deep-bi:feature-metric-logging-filtering
Open

Enabled filtering of metrics in the LoggingEmitter#19026
nozjkoitop wants to merge 5 commits intoapache:masterfrom
deep-bi:feature-metric-logging-filtering

Conversation

@nozjkoitop
Copy link
Contributor

@nozjkoitop nozjkoitop commented Feb 17, 2026

Fixes #19021.

Description

Added metric filtering support for LoggingEmitter with a default allowlist and optional override path.

Configuration

  • Introduced druid.emitter.logging.filterMetrics (default false) to gate metric filtering
  • Added druid.emitter.logging.metricAllowlistPath to optionally load a custom allowlist file

Default allowlist now lives in defaultLoggingMetricNames.json and is used when no custom path is provided. Format is simplified to a JSON array of metric names. If a custom allowlist path is configured but missing, emitter falls back to the default built-in allowlist.

Release note

LoggingEmitter can now optionally filter metric logs by an allowlist, which helps reduce log volume on busy clusters while keeping non-metric events unchanged. Enable filtering with druid.emitter.logging.filterMetrics=true, and optionally point druid.emitter.logging.metricAllowlistPath to a JSON with metrics to include, if the custom file is missing, Druid automatically falls back to the built-in default allowlist.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@abhishekrb19
Copy link
Contributor

Thanks @nozjkoitop for the contribution! Cross-linking the comment here on a similar implementation - #19030 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow filtering of metrics in the LoggingEmitter

2 participants

Comments