Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meter filters are applied once per registry, resulting in duplication #345

Open
williampowellTW opened this issue Feb 2, 2022 · 0 comments

Comments

@williampowellTW
Copy link

Expected Behavior

When using a meter filter to transform a meter ID, the transformation should only apply once.

Actual Behaviour

The transformation is applied once per registry. For example if you have a meter filter to apply a prefix to your meter ID and you have two registries, then the prefix is applied two times. For example the following code:

public class PrefixMetricsFilter implements MeterFilter {

    public PrefixMetricsFilter() {}

    @Override
    public Meter.Id map(Meter.Id id) {
            return id.withName(prefix." + id.getName())
        }
    }

When you use two registries the filter is applied twice. This results in prefix.prefix.${meterID}.

The logic was changed in this commit: 2a1a7b8

Steps To Reproduce

  1. Configure two registries
  2. Configure one message filter
  3. See filter is applied twice

Environment Information

No response

Example Application

No response

Version

4.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant