Tracing endpoints
Locate a trace
POST
/
api
/
v2
/
tracing
/
locator
Locate a trace
curl --request POST \
--url https://appsignal.com/api/v2/tracing/locator \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_ids": [
"abc123"
],
"trace_id": "5baa0559ff2f4d35f3b2cd90d312bac3"
}
'import requests
url = "https://appsignal.com/api/v2/tracing/locator"
payload = {
"site_ids": ["abc123"],
"trace_id": "5baa0559ff2f4d35f3b2cd90d312bac3"
}
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'], trace_id: '5baa0559ff2f4d35f3b2cd90d312bac3'})
};
fetch('https://appsignal.com/api/v2/tracing/locator', 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/locator",
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'
],
'trace_id' => '5baa0559ff2f4d35f3b2cd90d312bac3'
]),
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/locator"
payload := strings.NewReader("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"trace_id\": \"5baa0559ff2f4d35f3b2cd90d312bac3\"\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/locator")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"trace_id\": \"5baa0559ff2f4d35f3b2cd90d312bac3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/locator")
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 \"trace_id\": \"5baa0559ff2f4d35f3b2cd90d312bac3\"\n}"
response = http.request(request)
puts response.read_body{
"performance": [
{
"site_id": "abc123",
"namespace": "web",
"action_name": "POST /api/users"
}
],
"errors": [
{
"site_id": "abc123",
"incident_number": 42,
"exception_name": "RuntimeError",
"incident_digests": [
"1234567890"
]
}
]
}{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}To find a trace and then fetch its spans, see Querying traces.
Authorizations
bearer_authtoken_query
Authorization: Bearer <token>
Body
application/json
Response
The performance actions and error incidents the trace appears in; both lists are empty when it is not found.
Was this page helpful?
⌘I
Locate a trace
curl --request POST \
--url https://appsignal.com/api/v2/tracing/locator \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_ids": [
"abc123"
],
"trace_id": "5baa0559ff2f4d35f3b2cd90d312bac3"
}
'import requests
url = "https://appsignal.com/api/v2/tracing/locator"
payload = {
"site_ids": ["abc123"],
"trace_id": "5baa0559ff2f4d35f3b2cd90d312bac3"
}
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'], trace_id: '5baa0559ff2f4d35f3b2cd90d312bac3'})
};
fetch('https://appsignal.com/api/v2/tracing/locator', 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/locator",
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'
],
'trace_id' => '5baa0559ff2f4d35f3b2cd90d312bac3'
]),
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/locator"
payload := strings.NewReader("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"trace_id\": \"5baa0559ff2f4d35f3b2cd90d312bac3\"\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/locator")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_ids\": [\n \"abc123\"\n ],\n \"trace_id\": \"5baa0559ff2f4d35f3b2cd90d312bac3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/locator")
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 \"trace_id\": \"5baa0559ff2f4d35f3b2cd90d312bac3\"\n}"
response = http.request(request)
puts response.read_body{
"performance": [
{
"site_id": "abc123",
"namespace": "web",
"action_name": "POST /api/users"
}
],
"errors": [
{
"site_id": "abc123",
"incident_number": 42,
"exception_name": "RuntimeError",
"incident_digests": [
"1234567890"
]
}
]
}{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}