-
Notifications
You must be signed in to change notification settings - Fork 1.9k
plugin_proxy: allow metrics type for output plugin proxy #9735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I have a PR for the fluent-bit-go repo fluent/fluent-bit-go#79 that decodes and uses the metric type. It depends on the PR in this repo for metrics to be allowed to flow to the output plugin. |
Previously, the output plugin proxy supported only logs types as this is the default if no event_type is specified. This allows the metrics type to also be routed to output proxy plugins such as the golang proxy plugin. Signed-off-by: Grace Wehner <grace.wehner@microsoft.com>
|
Hi @edsiper @leonardo-albertovich @fujimotos @koleini would I be able to get a review on this? |
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
|
Hi @edsiper @leonardo-albertovich @fujimotos @koleini would you be able to review this still? |
|
@gracewehner not that there are errors on the tests that need to be addressed. |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0cf7c7a8f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /* Plugin registration */ | ||
| out->type = FLB_OUTPUT_PLUGIN_PROXY; | ||
| out->event_type = FLB_OUTPUT_LOGS | FLB_OUTPUT_METRICS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid routing metrics to log-only proxy outputs
By unconditionally setting out->event_type to FLB_OUTPUT_LOGS | FLB_OUTPUT_METRICS for all proxy outputs, any proxy output configured for logs will now also accept metrics when a metrics input matches the same output. Because the proxy definition has no way to declare supported event types, log-only proxy plugins (e.g., Go outputs that only implement log decoding) will start receiving metrics chunks they cannot parse, leading to dropped data or flush errors when metrics inputs are present alongside log inputs. This is a behavioral regression for existing deployments that used proxy outputs for logs only and now have metrics enabled; consider making the event type configurable or derived from the proxy/plugin registration instead of forcing metrics support for every proxy output.
Useful? React with 👍 / 👎.
This change allows the fluent-bit metrics type to be routed to output proxy plugins such as the golang proxy plugin.
Currently the
proxy output pluginregistration does not include theout->event_typesetting for what types it accepts:fluent-bit/src/flb_plugin_proxy.c
Lines 364 to 370 in faf7da1
For output plugins that have no value for
event_type, those plugins default to supporting only the logs datatype:fluent-bit/src/flb_output.c
Lines 605 to 607 in faf7da1
The
fluent-bit routerwill enforce datatypes between input and output plugins and drop any data that has the type mismatch:fluent-bit/src/flb_task.c
Lines 435 to 438 in faf7da1
Addresses fluent/fluent-bit-go#75, fluent/fluent-bit-go#77
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
fluent/fluent-bit-docs#1531
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.