diff options
Diffstat (limited to 'app/models/integrations/datadog.rb')
-rw-r--r-- | app/models/integrations/datadog.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/integrations/datadog.rb b/app/models/integrations/datadog.rb index 27bed5d3f76..80eecc14d0f 100644 --- a/app/models/integrations/datadog.rb +++ b/app/models/integrations/datadog.rb @@ -9,7 +9,7 @@ module Integrations URL_API_KEYS_DOCS = "https://docs.#{DEFAULT_DOMAIN}/account_management/api-app-keys/" SUPPORTED_EVENTS = %w[ - pipeline job archive_trace + pipeline build archive_trace ].freeze TAG_KEY_VALUE_RE = %r{\A [\w-]+ : .*\S.* \z}x.freeze @@ -48,8 +48,8 @@ module Integrations field :archive_trace_events, storage: :attribute, type: 'checkbox', - title: -> { s_('Logs') }, - checkbox_label: -> { s_('Enable logs collection') }, + title: -> { _('Logs') }, + checkbox_label: -> { _('Enable logs collection') }, help: -> { s_('When enabled, job logs are collected by Datadog and displayed along with pipeline execution traces.') } field :datadog_service, @@ -156,10 +156,10 @@ module Integrations end def execute(data) + return unless supported_events.include?(data[:object_kind]) + object_kind = data[:object_kind] object_kind = 'job' if object_kind == 'build' - return unless supported_events.include?(object_kind) - data = hook_data(data, object_kind) execute_web_hook!(data, "#{object_kind} hook") end |