Sha256: a54b3f60399e7a70108f63857c9e821759ff8f92ec0513c7c71023315e9c8ef2

Contents?: true

Size: 968 Bytes

Versions: 8

Compression:

Stored size: 968 Bytes

Contents

# Send an incident event for DORA Metrics returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_dora_incident".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new

body = DatadogAPIClient::V2::DORAIncidentRequest.new({
  data: DatadogAPIClient::V2::DORAIncidentRequestData.new({
    attributes: DatadogAPIClient::V2::DORAIncidentRequestAttributes.new({
      finished_at: 1707842944600000000,
      git: DatadogAPIClient::V2::DORAGitInfo.new({
        commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
        repository_url: "https://github.com/organization/example-repository",
      }),
      name: "Webserver is down failing all requests",
      services: [
        "shopist",
      ],
      severity: "High",
      started_at: 1707842944500000000,
      team: "backend",
      version: "v1.12.07",
    }),
  }),
})
p api_instance.create_dora_incident(body)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.27.1 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.26.1 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.26.0 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.25.0 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.24.0 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.22.0 examples/v2/dora-metrics/CreateDORAIncident.rb
datadog_api_client-2.21.0 examples/v2/dora-metrics/CreateDORAIncident.rb