lib/fluent/plugin/out_newrelic.rb in fluent-plugin-newrelic-1.0.0 vs lib/fluent/plugin/out_newrelic.rb in fluent-plugin-newrelic-1.0.1

- old
+ new

@@ -71,9 +71,17 @@ # intrinsic attributes go at the top level if record.has_key?('message') packaged['message'] = record['message'] packaged['attributes'].delete('message') end + + # Kubernetes logging puts the message field in the 'log' attribute, we'll use that + # as the 'message' field if it exists. We do the same in the Fluent Bit output plugin. + # See https://docs.docker.com/config/containers/logging/fluentd/ + if record.has_key?('log') + packaged['message'] = record['log'] + packaged['attributes'].delete('log') + end packaged end def write(chunk)