Skip to content

log_to_metrics counters should support value_field #11343

@Lusitaniae

Description

@Lusitaniae

Is your feature request related to a problem? Please describe.
I'm currently using fluentd prometheus plugins to generate metrics, one of the metrics is a transmited bytes counter/histogram

Fluentd supports specifying a key which will increment the counter with its value

https://github.com/fluent/fluent-plugin-prometheus?tab=readme-ov-file#counter-type

But fluentbit only seems to use value_field for guages/histograms, and counters always append by 1

Relevant code:

https://github.com/fluent/fluent-bit/blob/master/plugins/filter_log_to_metrics/log_to_metrics.c#L915

Describe the solution you'd like
Make value_field work for counters

Describe alternatives you've considered
Keep using fluentd

Additional context
Trying to move fluentd -> fluentbit

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