Sha256: 80f805159de1a885e566a2e240afb91e4831d67ecc7df00bdf457e848d7e0798

Contents?: true

Size: 668 Bytes

Versions: 14

Compression:

Stored size: 668 Bytes

Contents

# Create a log-based metric returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::LogsMetricsAPI.new

body = DatadogAPIClient::V2::LogsMetricCreateRequest.new({
  data: DatadogAPIClient::V2::LogsMetricCreateData.new({
    id: "Example-Create_a_log_based_metric_returns_OK_response",
    type: DatadogAPIClient::V2::LogsMetricType::LOGS_METRICS,
    attributes: DatadogAPIClient::V2::LogsMetricCreateAttributes.new({
      compute: DatadogAPIClient::V2::LogsMetricCompute.new({
        aggregation_type: DatadogAPIClient::V2::LogsMetricComputeAggregationType::COUNT,
      }),
    }),
  }),
})
p api_instance.create_logs_metric(body)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
datadog_api_client-2.4.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-2.3.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-2.2.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-2.1.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-2.0.2 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-2.0.1 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-2.0.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.11.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.10.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.9.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.8.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.7.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.6.0 examples/v2/logs-metrics/CreateLogsMetric.rb
datadog_api_client-1.5.0 examples/v2/logs-metrics/CreateLogsMetric.rb