Skip to main content
GET
/
v1
/
projects
/
{project_identifier}
/
spans
/
otlpv1
Search spans with simple filters (no DSL)
curl --request GET \
  --url https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1
import requests

url = "https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/projects/{project_identifier}/spans/otlpv1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "attributes": [
        {
          "key": "<string>",
          "value": {
            "array_value": {
              "values": [
                "<unknown>"
              ]
            },
            "bool_value": true,
            "bytes_value": "<string>",
            "double_value": 123,
            "int_value": 0,
            "kvlist_value": null,
            "string_value": "<string>"
          }
        }
      ],
      "dropped_attributes_count": 2147483647,
      "dropped_events_count": 2147483647,
      "dropped_links_count": 2147483647,
      "end_time_unix_nano": 9223372036854776000,
      "events": [
        {
          "attributes": [
            {
              "key": "<string>",
              "value": {
                "array_value": {
                  "values": [
                    "<unknown>"
                  ]
                },
                "bool_value": true,
                "bytes_value": "<string>",
                "double_value": 123,
                "int_value": 0,
                "kvlist_value": null,
                "string_value": "<string>"
              }
            }
          ],
          "dropped_attributes_count": 2147483647,
          "name": "<string>",
          "time_unix_nano": 9223372036854776000
        }
      ],
      "flags": 2147483647,
      "kind": "SPAN_KIND_INTERNAL",
      "links": null,
      "name": "<string>",
      "parent_span_id": "<string>",
      "span_id": "<string>",
      "start_time_unix_nano": 9223372036854776000,
      "status": {
        "code": -1,
        "message": "<string>"
      },
      "trace_id": "<string>",
      "trace_state": "<string>"
    }
  ],
  "next_cursor": "<string>"
}
"<string>"
"<string>"
"<string>"

Path Parameters

project_identifier
string
required

The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.

Query Parameters

cursor
string | null

Pagination cursor (Span Global ID)

limit
integer
default:100

Maximum number of spans to return

Required range: x <= 1000
start_time
string<date-time> | null

Inclusive lower bound time

end_time
string<date-time> | null

Exclusive upper bound time

trace_id
string[] | null

Filter by one or more trace IDs

parent_id
string | null

Filter by parent span ID. Use "null" to get root spans only.

name
string[] | null

Filter by span name(s)

status_code
string[] | null

Filter by status code(s). Values: OK, ERROR, UNSET

attribute
string[] | null

Filter spans by key:value. Key is a dot-path (e.g. user.id, metadata.tier). Value is JSON-parsed: k:12345 is int, k:true is bool, otherwise string (k:user-42). To match a numeric- or boolean-looking STRING, JSON-quote it: user.id:"12345" (URL-encoded %2212345%22). Split is on the first : only, so values may contain colons (session.id:sess:abc:123, ISO timestamps). Repeat the param to AND filters. List-valued attributes (e.g. tag.tags) cannot be matched here. Returns 422 on malformed input (missing colon, empty key/value, or list/dict/null value).

Response

Successful Response

Paginated response where each span follows OTLP JSON structure.

data
OtlpSpan · object[]
required
next_cursor
string | null
required