Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while using with record_transformer #18

Open
ayZagen opened this issue Jan 20, 2021 · 0 comments
Open

Getting error while using with record_transformer #18

ayZagen opened this issue Jan 20, 2021 · 0 comments

Comments

@ayZagen
Copy link

ayZagen commented Jan 20, 2021

Hello, I receive error when using source plugin with record_transformer filter.

Here is fluentd config:

<source>
  @type rabbitmq
  tag test
  host  "#{ENV['RABBITMQ_HOST'] || 'rabbitmq'}"
  user  "#{ENV['RABBITMQ_USER'] || 'user'}"
  pass  "#{ENV['RABBITMQ_PASSWORD'] || 'bitnami'}"
  vhost "#{ENV['RABBITMQ_VHOST'] || '/'}"
  queue "#{ENV['RABBITMQ_QUEUE'] || 'test'}"
  <parse>
    @type json
  </parse>
</source>
<filter "**">
  @type record_transformer
  remove_keys $.context.req.headers.accept, $.context.req.headers.accept-language
</filter>

Here is received error (record minified for simplicity):

error="#<NoMethodError: undefined method `merge!' for #<String:0x00007f0139e14bf0>>" location="/usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/plugin/filter_record_transformer.rb:135:in `reform'" tag=test time=1611144715 record="{\"level\":20,\"time\":1611144714919,\"method\":\"GET\",\"status\":200,\"context\":{\"req\":{\"connection\":\"keep-alive\"}}}"

Without record_transformer filter it works. Also I use same filter with fluent-plugin-kafka it works correctly. So, I assume the error is happening because of this plugin.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant