List error traces
curl --request POST \
--url https://appsignal.com/api/v2/tracing/traces/errors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_ids": [
"abc123"
],
"digests": [
"1234567890"
],
"pagination": {
"per_page": 50,
"order": "DESC",
"cursor": {
"time": null
}
}
}
'import requests
url = "https://appsignal.com/api/v2/tracing/traces/errors"
payload = {
"site_ids": ["abc123"],
"digests": ["1234567890"],
"pagination": {
"per_page": 50,
"order": "DESC",
"cursor": { "time": None }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site_ids: ['abc123'],
digests: ['1234567890'],
pagination: {per_page: 50, order: 'DESC', cursor: {time: null}}
})
};
fetch('https://appsignal.com/api/v2/tracing/traces/errors', 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://appsignal.com/api/v2/tracing/traces/errors",
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([
'site_ids' => [
'abc123'
],
'digests' => [
'1234567890'
],
'pagination' => [
'per_page' => 50,
'order' => 'DESC',
'cursor' => [
'time' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://appsignal.com/api/v2/tracing/traces/errors"
payload := strings.NewReader("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"digests\": [\n \"1234567890\"\n ],\n \"pagination\": {\n \"per_page\": 50,\n \"order\": \"DESC\",\n \"cursor\": {\n \"time\": null\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://appsignal.com/api/v2/tracing/traces/errors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"digests\": [\n \"1234567890\"\n ],\n \"pagination\": {\n \"per_page\": 50,\n \"order\": \"DESC\",\n \"cursor\": {\n \"time\": null\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/traces/errors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site_ids\": [\n \"abc123\"\n ],\n \"digests\": [\n \"1234567890\"\n ],\n \"pagination\": {\n \"per_page\": 50,\n \"order\": \"DESC\",\n \"cursor\": {\n \"time\": null\n }\n }\n}"
response = http.request(request)
puts response.read_body[
{
"span_id": "<string>",
"trace_id": "<string>",
"site_id": "<string>",
"time": "2023-11-07T05:31:56Z",
"duration": 123,
"tags": {},
"has_npo": true,
"namespace": "<string>",
"revision": "<string>",
"action_name": "<string>"
}
]{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}Authorizations
Authorization: Bearer <token>
Body
Filters and pagination for listing the traces of error incidents.
Sites to search; the caller must have access to all of them.
Digests of the error incidents to list traces for.
Page size (capped at 100), order and cursor.
Show child attributes
Show child attributes
Filter query; supports revision and tag filters.
Response
The matching trace summaries.
Unique identifier for the root span.
Unique identifier for the entire trace.
Site identifier this trace belongs to.
Timestamp when the trace started.
Total duration of the trace in milliseconds.
User-defined tags extracted from span attributes.
Show child attributes
Show child attributes
Whether this trace contains N+1 query detection results.
Namespace the trace belongs to (e.g. "web", "background").
Git revision or deployment identifier active when the trace was recorded.
Action name for the trace (e.g. "POST /api/users").
Was this page helpful?
curl --request POST \
--url https://appsignal.com/api/v2/tracing/traces/errors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_ids": [
"abc123"
],
"digests": [
"1234567890"
],
"pagination": {
"per_page": 50,
"order": "DESC",
"cursor": {
"time": null
}
}
}
'import requests
url = "https://appsignal.com/api/v2/tracing/traces/errors"
payload = {
"site_ids": ["abc123"],
"digests": ["1234567890"],
"pagination": {
"per_page": 50,
"order": "DESC",
"cursor": { "time": None }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site_ids: ['abc123'],
digests: ['1234567890'],
pagination: {per_page: 50, order: 'DESC', cursor: {time: null}}
})
};
fetch('https://appsignal.com/api/v2/tracing/traces/errors', 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://appsignal.com/api/v2/tracing/traces/errors",
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([
'site_ids' => [
'abc123'
],
'digests' => [
'1234567890'
],
'pagination' => [
'per_page' => 50,
'order' => 'DESC',
'cursor' => [
'time' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://appsignal.com/api/v2/tracing/traces/errors"
payload := strings.NewReader("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"digests\": [\n \"1234567890\"\n ],\n \"pagination\": {\n \"per_page\": 50,\n \"order\": \"DESC\",\n \"cursor\": {\n \"time\": null\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://appsignal.com/api/v2/tracing/traces/errors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"digests\": [\n \"1234567890\"\n ],\n \"pagination\": {\n \"per_page\": 50,\n \"order\": \"DESC\",\n \"cursor\": {\n \"time\": null\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/traces/errors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site_ids\": [\n \"abc123\"\n ],\n \"digests\": [\n \"1234567890\"\n ],\n \"pagination\": {\n \"per_page\": 50,\n \"order\": \"DESC\",\n \"cursor\": {\n \"time\": null\n }\n }\n}"
response = http.request(request)
puts response.read_body[
{
"span_id": "<string>",
"trace_id": "<string>",
"site_id": "<string>",
"time": "2023-11-07T05:31:56Z",
"duration": 123,
"tags": {},
"has_npo": true,
"namespace": "<string>",
"revision": "<string>",
"action_name": "<string>"
}
]{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}