Sha256: 2a477c460aaa6dd4e9961ec05afa58170c8f3a229b842f1497a36d28e2689e7e
Contents?: true
Size: 784 Bytes
Versions: 1
Compression:
Stored size: 784 Bytes
Contents
require "datadog_api_client" api_instance = DatadogAPIClient::V2::LogsMetricsAPI.new body = DatadogAPIClient::V2::LogsMetricCreateRequest.new({ data: DatadogAPIClient::V2::LogsMetricCreateData.new({ attributes: DatadogAPIClient::V2::LogsMetricCreateAttributes.new({ compute: DatadogAPIClient::V2::LogsMetricCompute.new({ aggregation_type: DatadogAPIClient::V2::LogsMetricComputeAggregationType::COUNT }) }), id: "logs.page.load.count", type: DatadogAPIClient::V2::LogsMetricType::LOGS_METRICS }) }) # LogsMetricCreateRequest | The definition of the new log-based metric. begin # Create a log-based metric result = api_instance.create_logs_metric(body) p result rescue DatadogAPIClient::V2::APIError => e puts "Error when calling LogsMetricsAPI->create_logs_metric: #{e}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.7.0 | examples/generated/v2/logs-metrics/CreateLogsMetric.rb |