SumoLogic / fluentd-output-sumologic

Fluentd output plugin to deliver logs or metrics to Sumo Logic.
https://rubygems.org/gems/fluent-plugin-sumologic_output
Apache License 2.0
29 stars 28 forks source link

Fix fields handling to properly batch HTTP request payloads #54

Closed rvmiller89 closed 5 years ago

rvmiller89 commented 5 years ago

Noticed by Paul, after adding the additional fields to _sumo_metadata, we were not properly batching the HTTP request payloads in order to set X-Sumo-Fields.

This PR adds handling for fields from _sumo_metadata and adds test cases for:

  1. Batching without header/field overrides
  2. Batching with header overrides
  3. Batching with field overrides

Some of this may conflict with https://github.com/SumoLogic/fluentd-output-sumologic/pull/53 but we can reconcile the differences.

rvmiller89 commented 5 years ago

Yeah these are all great points, I am thinking start with this for now, and revisit our HTTP batching to account for these edge cases.