diff --git a/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb b/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb index 0cf4e1dba0c3291649af2e9658059e6e57cd5cb1..20cc065595f8506bc62dc67a6de0adb9afe4abcc 100644 --- a/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb +++ b/fluentd/fluent-plugin-loki/lib/fluent/plugin/out_loki.rb @@ -142,7 +142,7 @@ module Fluent # 'labels' => '{worker="0"}', payload.push( 'labels' => labels_to_protocol(k), - 'entries' => v.sort_by { |hsh| hsh[:ts] } + 'entries' => v.sort_by { |hsh| Time.parse(hsh["ts"])} ) end payload