Tracing endpoints
List action edges
POST
/
api
/
v2
/
tracing
/
action_edges
List action edges
curl --request POST \
--url https://appsignal.com/api/v2/tracing/action_edges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_id": "abc123",
"namespace": "PublicApi/web",
"action": "UsersController#show",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z"
}
'import requests
url = "https://appsignal.com/api/v2/tracing/action_edges"
payload = {
"site_id": "abc123",
"namespace": "PublicApi/web",
"action": "UsersController#show",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z"
}
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_id: 'abc123',
namespace: 'PublicApi/web',
action: 'UsersController#show',
from: '2024-01-01T00:00:00Z',
to: '2024-01-01T01:00:00Z'
})
};
fetch('https://appsignal.com/api/v2/tracing/action_edges', 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/action_edges",
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_id' => 'abc123',
'namespace' => 'PublicApi/web',
'action' => 'UsersController#show',
'from' => '2024-01-01T00:00:00Z',
'to' => '2024-01-01T01:00:00Z'
]),
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/action_edges"
payload := strings.NewReader("{\n \"site_id\": \"abc123\",\n \"namespace\": \"PublicApi/web\",\n \"action\": \"UsersController#show\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\"\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/action_edges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"abc123\",\n \"namespace\": \"PublicApi/web\",\n \"action\": \"UsersController#show\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/action_edges")
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_id\": \"abc123\",\n \"namespace\": \"PublicApi/web\",\n \"action\": \"UsersController#show\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"upstream": [
{
"site_id": "def456",
"site_name": "Frontend",
"site_environment": "production",
"service": "Frontend",
"namespace": "web",
"action": "HomeController#index",
"caller_kind": "CLIENT",
"callee_kind": "SERVER",
"edge_type": "SYNC",
"count": 1200,
"error_count": 3,
"mean": 42.5,
"p_90": 80.1,
"p_95": 110.7
}
],
"downstream": []
}{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}For how action and site edges differ, see Querying traces.
Authorizations
bearer_authtoken_query
Authorization: Bearer <token>
Body
application/json
Query parameters for listing upstream and downstream action edges.
Site ID that anchors the query (the focused action's site).
Focused action's "<service>/<namespace>" (e.g. "PublicApi/web"), split on the first /
(later / stay in the namespace). Both halves must be non-empty, else 400.
Action name of the focused action.
Start of the time range (inclusive).
End of the time range (exclusive).
Response
The focused action's upstream and downstream edges.
Was this page helpful?
⌘I
List action edges
curl --request POST \
--url https://appsignal.com/api/v2/tracing/action_edges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_id": "abc123",
"namespace": "PublicApi/web",
"action": "UsersController#show",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z"
}
'import requests
url = "https://appsignal.com/api/v2/tracing/action_edges"
payload = {
"site_id": "abc123",
"namespace": "PublicApi/web",
"action": "UsersController#show",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z"
}
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_id: 'abc123',
namespace: 'PublicApi/web',
action: 'UsersController#show',
from: '2024-01-01T00:00:00Z',
to: '2024-01-01T01:00:00Z'
})
};
fetch('https://appsignal.com/api/v2/tracing/action_edges', 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/action_edges",
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_id' => 'abc123',
'namespace' => 'PublicApi/web',
'action' => 'UsersController#show',
'from' => '2024-01-01T00:00:00Z',
'to' => '2024-01-01T01:00:00Z'
]),
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/action_edges"
payload := strings.NewReader("{\n \"site_id\": \"abc123\",\n \"namespace\": \"PublicApi/web\",\n \"action\": \"UsersController#show\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\"\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/action_edges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"abc123\",\n \"namespace\": \"PublicApi/web\",\n \"action\": \"UsersController#show\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/action_edges")
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_id\": \"abc123\",\n \"namespace\": \"PublicApi/web\",\n \"action\": \"UsersController#show\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"upstream": [
{
"site_id": "def456",
"site_name": "Frontend",
"site_environment": "production",
"service": "Frontend",
"namespace": "web",
"action": "HomeController#index",
"caller_kind": "CLIENT",
"callee_kind": "SERVER",
"edge_type": "SYNC",
"count": 1200,
"error_count": 3,
"mean": 42.5,
"p_90": 80.1,
"p_95": 110.7
}
],
"downstream": []
}{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}