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

Don't include protocol as message data #79

Open
philomory opened this issue Mar 2, 2019 · 0 comments
Open

Don't include protocol as message data #79

philomory opened this issue Mar 2, 2019 · 0 comments

Comments

@philomory
Copy link

philomory commented Mar 2, 2019

Gelf::Notifier#extract_hash merges the default options hash into the message data hash, so your messages end up including all of the default options as if they were fields. May of them are fields, but protocol isn't; indeed if you wanted to include a field named protocol, you should be required to supply it as _protocol. A simple protocol field should be silently ignored by Graylog, but I end up with protocol => 0 in my received messages regardless.

This is a bit of a problem, since in my Elasticsearch indices protocol is supposed to be a string field, and when gelf-rb establishes it as a long field instead, future messages with actual data in the protocol field can't be indexed properly (and of course if one of the 'good' messages gets there first then no message submitted by gelf-rb can be indexed properly).

The whole things is unnecessary anyway, since the the result of the merge is never even checked for the protocol; the protocol is read straight out of default_options regardless.

@philomory philomory changed the title Don't include options as message data Don't include protocol as message data Mar 2, 2019
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