DataDog / fluent-plugin-datadog

Fluentd output plugin for Datadog: https://www.datadog.com
Apache License 2.0
39 stars 26 forks source link

Don't override hostname and other properties if they are already set in the incoming record #32

Closed zuk closed 4 years ago

zuk commented 5 years ago

What does this PR do?

This pull request fixes a regression introduced in https://github.com/DataDog/fluent-plugin-datadog/pull/28 that causes hostname and other attributes to be overridden. The behaviour introduced in that previous PR breaks expected behaviour in certain situations, such as in a fluentd aggregator configuration where log entries originate from different fluentd instances and are funnelled to datadog through an aggregator.

The proposed change aims to restore the original behaviour while retaining the ability to set a hostname and other attributes through @dd_hostname, @service, etc.

Motivation

PR#28 broke our fluentd aggregator configuration, making it impossible to determine the actual originating hostname of a log entry funnelled to datadog.

Additional Notes

We tested this in our aggregator setup and it worked fine 👍

adrien-f commented 4 years ago

We are also impacted by this. Looking forward to this being merged.

adrien-f commented 4 years ago

@FlorianVeaux could we get a status update on this PR? We're currently running a self-compiled gem in the meantime...

zuk commented 4 years ago

Same here. A bit disappointed that the previous PR with the regression got merged quickly with little scrutiny and this one is sitting open for over two weeks now.

remeh commented 4 years ago

Hey @zuk, Sorry for the late answer. Thank you for your contribution, I'm merging this and I'll release the gem!