Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Filters #53

Open
bnayae opened this issue Mar 14, 2018 · 1 comment
Open

Filters #53

bnayae opened this issue Mar 14, 2018 · 1 comment

Comments

@bnayae
Copy link
Contributor

bnayae commented Mar 14, 2018

I'm considering to contribute filtering capability backed into the configuration flow.
The idea behind it is to enable better control over the metrics you sending over the wire at runtime.

You may want limited amount of metrics that will give general health indication,
but when you got indication that something may went wrong,
you may want to illuminate specific spot by open other metrics.

In terms of Api I'm considering something similar to Serilog's filtering.
My suggestion is:

Metrics.Collector = new CollectorConfiguration()
.Filter.Tags.Match(tags => tags.ContainsKey("host") && tags["host"] == "BnayaMac")
.Tags.Exists.All(() => new[] { "Dev", "Staging" })
.Tags.Exists.Any(() => new[] { "OperationA", "OperationB" })
.Fields.Match(fileds => fileds.ContainsKey("cpu") && fileds["cpu"] > 80)

What do you think about the Api?

@nblumhardt
Copy link
Contributor

Thanks for the heads-up, Bnaya. This isn't a feature I've personally been looking for, but I can't speak for everyone else - will keep this here so we can collect feedback. Cheers!

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

No branches or pull requests

2 participants