Sha256: 2aa23b16e770d0291c0cf2fa5afd643ea6807155bce1d994452a94963581911a

Contents?: true

Size: 866 Bytes

Versions: 16

Compression:

Stored size: 866 Bytes

Contents

# Search spans returns "OK" response with pagination

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

body = DatadogAPIClient::V2::SpansListRequest.new({
  data: DatadogAPIClient::V2::SpansListRequestData.new({
    attributes: DatadogAPIClient::V2::SpansListRequestAttributes.new({
      filter: DatadogAPIClient::V2::SpansQueryFilter.new({
        from: "now-15m",
        query: "service:python*",
        to: "now",
      }),
      options: DatadogAPIClient::V2::SpansQueryOptions.new({
        timezone: "GMT",
      }),
      page: DatadogAPIClient::V2::SpansListRequestPage.new({
        limit: 2,
      }),
      sort: DatadogAPIClient::V2::SpansSort::TIMESTAMP_ASCENDING,
    }),
    type: DatadogAPIClient::V2::SpansListRequestType::SEARCH_REQUEST,
  }),
})
api_instance.list_spans_with_pagination(body) { |item| puts item }

Version data entries

16 entries across 16 versions & 1 rubygems

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