Sha256: cda42179abae09f7f955f2ee69ae1bf2f33915dcca76929934c79f7ed8e43660

Contents?: true

Size: 906 Bytes

Versions: 34

Compression:

Stored size: 906 Bytes

Contents

# Aggregate RUM events returns "OK" response

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

body = DatadogAPIClient::V2::RUMAggregateRequest.new({
  compute: [
    DatadogAPIClient::V2::RUMCompute.new({
      aggregation: DatadogAPIClient::V2::RUMAggregationFunction::PERCENTILE_90,
      metric: "@view.time_spent",
      type: DatadogAPIClient::V2::RUMComputeType::TOTAL,
    }),
  ],
  filter: DatadogAPIClient::V2::RUMQueryFilter.new({
    from: "now-15m",
    query: "@type:view AND @session.type:user",
    to: "now",
  }),
  group_by: [
    DatadogAPIClient::V2::RUMGroupBy.new({
      facet: "@view.time_spent",
      limit: 10,
      total: false,
    }),
  ],
  options: DatadogAPIClient::V2::RUMQueryOptions.new({
    timezone: "GMT",
  }),
  page: DatadogAPIClient::V2::RUMQueryPageOptions.new({
    limit: 25,
  }),
})
p api_instance.aggregate_rum_events(body)

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.27.1 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.26.1 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.26.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.25.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.24.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.22.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.21.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.20.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.19.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.18.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.17.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.16.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.15.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.14.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.13.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.12.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.11.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.10.0 examples/v2/rum/AggregateRUMEvents.rb
datadog_api_client-2.9.0 examples/v2/rum/AggregateRUMEvents.rb