lib/fluent/plugin/in_redis_slowlog.rb in gitlab-fluent-plugin-redis-slowlog-0.1.0 vs lib/fluent/plugin/in_redis_slowlog.rb in gitlab-fluent-plugin-redis-slowlog-0.1.1
- old
+ new
@@ -83,9 +83,10 @@
slowlogs.reverse_each do |log|
# Don't emit logs for entries we've already logged
next if log.id <= last_id
log_hash = { "id" => log.id,
+ "time" => Time.at(log.timestamp.to_i).utc.iso8601(3),
"exec_time" => log.exec_time_us,
"command" => log.command }
router.emit(tag, Fluent::EventTime.new(log.timestamp.to_i), log_hash)
end
end