Skip to content

out_loki: Add http_buffer_max_size option and handle HTTP 5xx errors#8830

Merged
edsiper merged 1 commit intofluent:masterfrom
drbugfinder-work:loki-upstream-fix
Jul 8, 2024
Merged

out_loki: Add http_buffer_max_size option and handle HTTP 5xx errors#8830
edsiper merged 1 commit intofluent:masterfrom
drbugfinder-work:loki-upstream-fix

Conversation

@drbugfinder-work
Copy link
Contributor

Adds http_buffer_max_size option, default is 512K now. Purges the upstream connection in case of HTTP 5xx errors.


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.

Adds http_buffer_max_size option, default is 512K now.
Purges the upstream connection in case of HTTP 5xx errors.

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

root@fb-loki:~/fluent-bit-loki/fluent-bit/build# valgrind --leak-check=full ./bin/flb-rt-out_loki 
==22521== Memcheck, a memory error detector
==22521== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==22521== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==22521== Command: ./bin/flb-rt-out_loki
==22521== 
Test remove_keys_remove_map...                  [ OK ]
Test labels_ra...                               [ OK ]
Test remove_keys...                             [ OK ]
Test basic...                                   [ OK ]
Test labels...                                  [ OK ]
Test label_keys...                              [ OK ]
Test line_format...                             [ OK ]
Test label_map_path...                          [ OK ]
Test float_value...                             [ OK ]
SUCCESS: All unit tests have passed.
==22521== 
==22521== HEAP SUMMARY:
==22521==     in use at exit: 0 bytes in 0 blocks
==22521==   total heap usage: 14,100 allocs, 14,100 frees, 6,743,280 bytes allocated
==22521== 
==22521== All heap blocks were freed -- no leaks are possible
==22521== 
==22521== For lists of detected and suppressed errors, rerun with: -s
==22521== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

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