fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.55k stars 1.52k forks source link

Metrics input processor documenation #8548

Open jenschude opened 4 months ago

jenschude commented 4 months ago

Is your feature request related to a problem? Please describe.

When scraping metrics I would like to group/tag specific metrics when they have a specific label e.g. tenant. The filter options will not work as they only apply to logs. Atm the processor pipeline seems to be the way to go but going through documentation and sources I don't see how to write a processor able for usage with metrics. I can see that metrics as well as trace processors are supported but there is no documentation and/or tests about it.

Describe the solution you'd like

Describe alternatives you've considered

OpenTelemetry collector comes with an groupsByAttrs processor. Something similar could be added to fluentbit directly.

https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbyattrsprocessor

Additional context

patrick-stephens commented 4 months ago

I think https://github.com/fluent/fluent-bit/pull/8526 was in a similar vein so @cosmo0920 may have some pointers. A docs PR would be appreciated as well @jenschude.