-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cmt_math: fix metric conversions #8762
Conversation
Signed-off-by: Aidan Leuck <[email protected]>
Example Configuration with change
|
Debug output for change:
After:
|
Hi, thanks for fixing this! However, we're tracking down for cmetrics' issues in https://github.com/fluent/cmetrics. |
This PR aims to address some issues presented in Fluent Bit repo: - fluent/fluent-bit#8083 - fluent/fluent-bit#8762 Signed-off-by: Eduardo Silva <[email protected]>
@aidanleuck thanks for triagging and proposing a solution for this issue. Some context: for fixes that lives in lib/, they should be handled in a separate repository and then we sync up the project here in this one. To speed up things, I noticed the code I original wrote uses an union when is not needed since we can do a direct cast, not sure why the code suggested here works but I suspect it can be something around how the compiler is working differently behind the scenes. With the intention to speed up a fix and provide a cleaner version with also limit checks, I have submitted this PR: My hope is that the issue goes away, but if still persist we will need to investigate more. |
This PR aims to address some issues presented in Fluent Bit repo: - fluent/fluent-bit#8083 - fluent/fluent-bit#8762 Signed-off-by: Eduardo Silva <[email protected]>
@edsiper Thank you for opening up that PR in the lib repository, I appreciate it! I will close this pull request. |
This PR aims to address some issues presented in Fluent Bit repo: - fluent/fluent-bit#8083 - fluent/fluent-bit#8762 Signed-off-by: Eduardo Silva <[email protected]>
Fixed issue with metric conversions where garbage values were being returned from a union. This method now implicitly does a cast as seemed to be intended by the original method. This issue was found because I was having an issue where fluent bit was spitting out garbage values for my metric counters when using the opentelemetry_input function.
Fixes #8083
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
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.