curl --request POST \
--url https://flow.seekr.com/v1/observability/spans \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
'import requests
url = "https://flow.seekr.com/v1/observability/spans"
payload = {
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
min_start_datetime: '2023-11-07T05:31:56Z',
max_start_datetime: '2023-11-07T05:31:56Z',
agent_id: '<string>',
run_id: '<string>',
trace_id: '<string>',
thread_id: '<string>',
group: '<string>',
metadata: {},
limit: 100,
order: 'desc',
offset: 0
})
};
fetch('https://flow.seekr.com/v1/observability/spans', 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://flow.seekr.com/v1/observability/spans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'min_start_datetime' => '2023-11-07T05:31:56Z',
'max_start_datetime' => '2023-11-07T05:31:56Z',
'agent_id' => '<string>',
'run_id' => '<string>',
'trace_id' => '<string>',
'thread_id' => '<string>',
'group' => '<string>',
'metadata' => [
],
'limit' => 100,
'order' => 'desc',
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/observability/spans"
payload := strings.NewReader("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/observability/spans")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/observability/spans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body[
{
"run_id": "<string>",
"thread_id": "<string>",
"agent_id": "<string>",
"trace_id": "<string>",
"span_id": "<string>",
"span_name": "<string>",
"level": 123,
"service_name": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"end_timestamp": "2023-11-07T05:31:56Z",
"kind": "span",
"message": "<string>",
"group": "<string>",
"parent_span_id": "<string>",
"otel_scope_name": "<string>",
"is_exception": true,
"exception_type": "<string>",
"gen_ai_operation_name": "<string>",
"gen_ai_request_model": "<string>",
"gen_ai_response_model": "<string>",
"gen_ai_system": "<string>",
"gen_ai_usage_input_tokens": "<string>",
"gen_ai_usage_output_token": "<string>",
"seekr_metadata": {}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Query spans
Query observability spans filtered by user and other criteria.
curl --request POST \
--url https://flow.seekr.com/v1/observability/spans \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
'import requests
url = "https://flow.seekr.com/v1/observability/spans"
payload = {
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
min_start_datetime: '2023-11-07T05:31:56Z',
max_start_datetime: '2023-11-07T05:31:56Z',
agent_id: '<string>',
run_id: '<string>',
trace_id: '<string>',
thread_id: '<string>',
group: '<string>',
metadata: {},
limit: 100,
order: 'desc',
offset: 0
})
};
fetch('https://flow.seekr.com/v1/observability/spans', 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://flow.seekr.com/v1/observability/spans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'min_start_datetime' => '2023-11-07T05:31:56Z',
'max_start_datetime' => '2023-11-07T05:31:56Z',
'agent_id' => '<string>',
'run_id' => '<string>',
'trace_id' => '<string>',
'thread_id' => '<string>',
'group' => '<string>',
'metadata' => [
],
'limit' => 100,
'order' => 'desc',
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/observability/spans"
payload := strings.NewReader("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/observability/spans")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/observability/spans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body[
{
"run_id": "<string>",
"thread_id": "<string>",
"agent_id": "<string>",
"trace_id": "<string>",
"span_id": "<string>",
"span_name": "<string>",
"level": 123,
"service_name": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"end_timestamp": "2023-11-07T05:31:56Z",
"kind": "span",
"message": "<string>",
"group": "<string>",
"parent_span_id": "<string>",
"otel_scope_name": "<string>",
"is_exception": true,
"exception_type": "<string>",
"gen_ai_operation_name": "<string>",
"gen_ai_request_model": "<string>",
"gen_ai_response_model": "<string>",
"gen_ai_system": "<string>",
"gen_ai_usage_input_tokens": "<string>",
"gen_ai_usage_output_token": "<string>",
"seekr_metadata": {}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}min_start_datetime is not provided, the query defaults to the last 15 minutes. Start with run_id when investigating a specific agent run. Use limit and offset to paginate results and order to sort by start time.
To retrieve the full record for a specific span, use the retrieve span endpoint.Authorizations
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Headers
ID of the team to use for the request. If omitted, the request uses your personal workspace.
Body
Object to contain request data for retrieving spans in bulk.
Inclusive lower bound for span start times, in ISO 8601 format. Defaults to 15 minutes before the query when omitted.
Inclusive upper bound for span start times, in ISO 8601 format. Omit to leave the upper bound open.
ID of the agent.
ID of the run.
Return only spans belonging to this trace.
ID of the thread.
Return only spans with this run group label.
1 - 32768Match all supplied run metadata key-value pairs. Keys must contain only letters, digits, or underscores and must exist on an accessible span.
Show child attributes
Show child attributes
Maximum number of results to return.
x >= 0Options for order query param in list endpoints.
asc, desc Number of results to skip.
x >= 0Response
Success
ID of the run.
ID of the thread.
ID of the agent.
ID of the distributed trace containing the span.
ID of this span within the trace.
Name of the operation represented by the span.
Numeric severity level recorded for the span.
Name of the service that emitted the span.
Time the span started, in ISO 8601 format.
Time the span ended, in ISO 8601 format.
Indicates the type of record for a logfire record.
span, pending_span, log, span_event Human-readable message recorded for the span.
Group label attached to the run that produced the span.
ID of the parent span, or null for a span without a recorded parent.
Name of the OpenTelemetry instrumentation scope that emitted the span.
Whether an exception was recorded on the span.
Type of the exception recorded on the span, when available.
Name of the generative AI operation recorded on the span.
Model identifier recorded in the generative AI request.
Model identifier recorded in the generative AI response.
Generative AI provider or system recorded on the span.
Input token count recorded on the span, represented as a string when available.
Reserved output-token count. The span-summary query does not populate this field, so it returns null.
Run metadata key-value pairs recorded on the span.
Show child attributes
Show child attributes