Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Ability to exclude/filter attributes #110

@dhay

Description

@dhay

In our applications, we use the Codahale/Dropwizard metrics library to publish our metrics to JMX. Rather than configure each metric, I'd like to grab everything under a particular domain. For example, something like this:

<query objectName="MyApplication-metrics:type=*,group=*,name=*"
       resultAlias="app.%type%.%group%.%name%.#attribute#"/>

However, because of the way the metrics are published to JMX, I end up with metrics that aren't really metrics. For example:

myapplication.app.API.ALL_statusSeries_5xx.responseTime.RateUnit events/second 1505500740
myapplication.app.API.ALL_statusSeries_5xx.responseTime.DurationUnit milliseconds 1505500740

What I'd really like to do is specify a set of attributes not to include. The configuration might look something like this:

<query objectName="MyApplication-metrics:type=*,group=*,name=*"
       excludeAttributes="RateUnit,DurationUnit"
       resultAlias="app.%type%.%group%.%name%.#attribute#"/>

I'm guessing that some might want to do something similar when processing CompositeData, though I don't personally have that need at the moment.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions