Skip to content

output: add support for metrics type #79

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gracewehner
Copy link

Fluent-bit supports the CMetrics datatype now that is based on Prometheus metrics.

This change allows the fluent-bit-go output plugin to decode the metrics type in addition to the existing logs type into map[interface{}]interface{}

I have added a golang struct that is the golang version of the CMetrics structure, a String override to print in Prometheus text format, and a function to convert map[interface{}]interface{} returned by the decoder to the CMetrics struct.

This depends on fluent/fluent-bit#9735 for metrics to be able to flow to the output plugin.

I have tested this with a fluent-bit build with the change above and my own golang output plugin.

Signed-off-by: Grace Wehner <grace.wehner@microsoft.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant