You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
out_splunk: reduce noise and fix hec_token handling (fix#8859)
The following patch perform 2 changes in the code that helps to fix the
problems found with Splunk hec token handling:
1. In the recent PR #8793, when using the record accessor API flb_ra_translate_check()
to validate if the hec_token field exists, leads to noisy log messages since
that function warns the issue if the field is not found. Most of users are not
using hec_token set by Splunk input plugin, so their logging gets noisy.
This patch replaces that call with flb_ra_translate() which fixes the problem.
2. If hec_token was set in the record metadata, it was being store in the main
context of the plugin, however the flush callbacks that formats and deliver the
data runs in separate/parallel threads that could lead to a race condition if
more than onen thread tries to manipulate the value.
This patch adds protection to the context value so it becomes thread safe.
Signed-off-by: Eduardo Silva <[email protected]>
0 commit comments