Skip to content

[WFLY-22046] Support fine-grained/individual metric filtering#845

Draft
jasondlee wants to merge 1 commit into
wildfly:mainfrom
jasondlee:WFLY-22046
Draft

[WFLY-22046] Support fine-grained/individual metric filtering#845
jasondlee wants to merge 1 commit into
wildfly:mainfrom
jasondlee:WFLY-22046

Conversation

@jasondlee

@jasondlee jasondlee commented Jun 30, 2026

Copy link
Copy Markdown
Member

https://redhat.atlassian.net/browse/WFLY-22046

Create proposal document

Resolves: #844

@github-actions github-actions Bot added the stability-level/default "Default" stability-level label Jun 30, 2026
@jasondlee jasondlee changed the title WFLY-22046 - Support fine-grained/individual metric filtering [WFLY-22046] Support fine-grained/individual metric filtering Jun 30, 2026
@github-actions github-actions Bot added stability-level/default "Default" stability-level and removed stability-level/default "Default" stability-level labels Jun 30, 2026
@github-actions github-actions Bot added stability-level/default "Default" stability-level and removed stability-level/default "Default" stability-level labels Jun 30, 2026
@github-actions github-actions Bot added stability-level/default "Default" stability-level and removed stability-level/default "Default" stability-level labels Jun 30, 2026
@github-actions github-actions Bot added stability-level/default "Default" stability-level and removed stability-level/default "Default" stability-level labels Jun 30, 2026
@github-actions github-actions Bot added stability-level/default "Default" stability-level and removed stability-level/default "Default" stability-level labels Jun 30, 2026
@github-actions github-actions Bot added stability-level/default "Default" stability-level and removed stability-level/default "Default" stability-level labels Jul 1, 2026
@github-actions github-actions Bot added stability-level/community "Community" stability level and removed stability-level/default "Default" stability-level labels Jul 9, 2026
It may turn out, however, that this flexibility makes for an awkward model/schema that hinders more than helps. We should be sensitive to this as the design matures and be prepared to pivot.
====

If an "accept" filter and a "reject" filter overlap, the accept filter will win, since the inclusion of the meter was explicitly configured.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this worth it? It adds quite a bit of complexity and can be unintuitive.

In a different context I've done quite a bit of work around filters using the JEP 290[1] mechanism, which for the class filtering aspect uses accept/reject semantics, applying a list of filter expressions in the order they are provided. As soon as a given class matches, the accept or reject applies and processing ends. The user is responsible for providing a list that results in the desired behavior. Reading the list the user can readily intuit what will happen using step by step reasoning.

See java.io.ObjectInputFilter.Config.Global.checkInput

[1] https://openjdk.org/jeps/290

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my preliminary experiments, if the accept filters are registered before the reject, then Micrometer just does the right thing. I think it will be a bit more manual on the OpenTelemetry side (via their view (?) API), but I think it should be pretty straightforward all around.

Comment thread observability/WFLY-22046-support-fine-grained-metric-filtering.adoc
Comment thread observability/WFLY-22046-support-fine-grained-metric-filtering.adoc Outdated
Comment thread observability/WFLY-22046-support-fine-grained-metric-filtering.adoc Outdated
Comment thread observability/WFLY-22046-support-fine-grained-metric-filtering.adoc Outdated
** Dropping certain tags
** Replacing tag values
** Limiting the number of tags on a meter
* A unified configuration for both Micrometer and OpenTelemetry, while interesting, given their similarities, is not in scope.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify what "A unified configuration" means.

Reading the above it sounds like the applicability to OpenTelemetry is not nailed down, which is ok at this stage. But it also sounds like there will be thinking about consistency (good!) and conceptually it seems like things can be consistent. So as this progresses if we end up being consistent, this non-requirement will be confusing unless it's explained.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've expanded the wording here. I hope that adequately addresses your concerns.

@github-actions github-actions Bot added stability-level/community "Community" stability level and removed stability-level/community "Community" stability level labels Jul 9, 2026
@jasondlee
jasondlee requested a review from bstansberry July 9, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stability-level/community "Community" stability level

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support fine-grained/individual metric filtering

2 participants