Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Don't include protocol as message data #79

@philomory

Description

@philomory

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions