Skip to content
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

filter_log_to_metric: Add emitter alias and mem buf limit #8659

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

drbugfinder-work
Copy link
Contributor

@drbugfinder-work drbugfinder-work commented Apr 2, 2024

This PR will add functionality to set emitter alias and mem buf limit. The default mem buf limit is 10MB.

Needs #8473 to be applied before taking effect.
(EDIT PR is merged)


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:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

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.

@drbugfinder-work
Copy link
Contributor Author

cc @agup006

This commit will add functionality to set emitter alias and mem buf limit. The default mem buf limit is 10MB

Signed-off-by: Richard Treu <richard.treu@sap.com>
Signed-off-by: Richard Treu <richard.treu@sap.com>
@drbugfinder-work
Copy link
Contributor Author

root@flb:~/fluent-bit-emitter-limit/fluent-bit/build/bin# valgrind ./flb-rt-filter_log_to_metrics 
==302271== Memcheck, a memory error detector
==302271== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==302271== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==302271== Command: ./flb-rt-filter_log_to_metrics
==302271== 
Test counter_k8s...                             [ OK ]
Test counter...                                 [ OK ]
Test counter_k8s_two_tuples...                  [ OK ]
Test gauge...                                   [ OK ]
Test histogram...                               [ OK ]
Test counter_regex...                           [ OK ]
Test regex_empty_label_keys...                  [ OK ]
Test label...                                   [ OK ]
SUCCESS: All unit tests have passed.
==302271== 
==302271== HEAP SUMMARY:
==302271==     in use at exit: 0 bytes in 0 blocks
==302271==   total heap usage: 19,885 allocs, 19,885 frees, 11,297,772 bytes allocated
==302271== 
==302271== All heap blocks were freed -- no leaks are possible
==302271== 
==302271== For lists of detected and suppressed errors, rerun with: -s
==302271== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

@edsiper edsiper added this to the Fluent Bit v3.1.2 milestone Jul 12, 2024
@edsiper edsiper merged commit bf8c9a2 into fluent:master Jul 12, 2024
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants