diff --git a/app/assets/javascripts/discourse/services/logs-notice.js.es6 b/app/assets/javascripts/discourse/services/logs-notice.js.es6 index 10d4b01ec48..21283797d95 100644 --- a/app/assets/javascripts/discourse/services/logs-notice.js.es6 +++ b/app/assets/javascripts/discourse/services/logs-notice.js.es6 @@ -28,8 +28,7 @@ const LogsNotice = Ember.Object.extend({ this.set('text', I18n.t(`logs_error_rate_notice.${translationKey}`, { - relativeAge: autoUpdatingRelativeAge(new Date), - timestamp: moment().format("YYYY-MM-DD H:mm:ss"), + relativeAge: autoUpdatingRelativeAge(new Date(data.publish_at * 1000)), siteSettingRate: I18n.t('logs_error_rate_notice.rate', { count: siteSettingLimit, duration: duration }), rate: I18n.t('logs_error_rate_notice.rate', { count: rate, duration: duration }), url: Discourse.getURL('/logs') diff --git a/config/initializers/100-logster.rb b/config/initializers/100-logster.rb index be4191583c3..58da5e46865 100644 --- a/config/initializers/100-logster.rb +++ b/config/initializers/100-logster.rb @@ -74,7 +74,7 @@ RailsMultisite::ConnectionManagement.each_connection do if (error_rate_per_minute || 0) > 0 store.register_rate_limit_per_minute(severities, error_rate_per_minute) do |rate| - MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'minute' }) + MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'minute', publish_at: Time.current.to_i }) end end @@ -82,7 +82,7 @@ RailsMultisite::ConnectionManagement.each_connection do if (error_rate_per_hour || 0) > 0 store.register_rate_limit_per_hour(severities, error_rate_per_hour) do |rate| - MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'hour' }) + MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'hour', publish_at: Time.current.to_i }) end end end