Sha256: 456986cb11cfaa897013d6a5c2efe53e76fc75d6e831ad16f33a9f25a7229169

Contents?: true

Size: 833 Bytes

Versions: 16

Compression:

Stored size: 833 Bytes

Contents

# Aggregate spans returns "OK" response

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

body = DatadogAPIClient::V2::SpansAggregateRequest.new({
  data: DatadogAPIClient::V2::SpansAggregateData.new({
    attributes: DatadogAPIClient::V2::SpansAggregateRequestAttributes.new({
      compute: [
        DatadogAPIClient::V2::SpansCompute.new({
          aggregation: DatadogAPIClient::V2::SpansAggregationFunction::COUNT,
          interval: "5m",
          type: DatadogAPIClient::V2::SpansComputeType::TIMESERIES,
        }),
      ],
      filter: DatadogAPIClient::V2::SpansQueryFilter.new({
        from: "now-15m",
        query: "*",
        to: "now",
      }),
    }),
    type: DatadogAPIClient::V2::SpansAggregateRequestType::AGGREGATE_REQUEST,
  }),
})
p api_instance.aggregate_spans(body)

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.27.1 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.26.1 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.26.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.25.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.24.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.22.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.21.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.20.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.19.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.18.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.17.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.16.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.15.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.14.0 examples/v2/spans/AggregateSpans.rb
datadog_api_client-2.13.0 examples/v2/spans/AggregateSpans.rb