Change the log_hash to use string keys, not symbol keys. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Disclaimer: My ruby skills are not strong!
When attempting to match this source to the GELF output plugin,
out_gelf
plugin is failing with aTypeError
related to the hash keys being Symbols, not strings. This PR changes the hash structure as recommended in the fluentd plugin, which fixes output to the GELF plugin.The timestamp of the slow operation from Redis is now used as the log timestamp, instead of the time that the slow is read. This allows easier correlation with associated events (otherwise events will be reported as having happened up to
interval
seconds after the log actually occurred)I've also made the logsize optional, as the Redis
SLOWLOG GET
command does not require a number of records. If no number is specified, all entries are returned.