Endpoint
Request method:POST
| Endpoint | Description |
|---|---|
| https://appsignal-endpoint.net/errors | Accepts JSON formatted data |
URL parameters
| Parameter | Type | Description |
|---|---|---|
| api_key | String | Front-end or Push API key, can be found in App settings. |
Shell
https://appsignal-endpoint.net/errors?api_key=<api_key>
name and environment for an existing app.
Body parameters
The post body should contain a JSON object, formatted as follows:| Parameter | Type | Description |
|---|---|---|
| timestamp | Integer | (Epoch) timestamp when error occurred |
| action | String | (Optional) Action name where error occurred (e.g. BlogpostController#show or UserInfoLambda#perform) |
| namespace | String | Namespace where error occurred (e.g. frontend or lambda ) |
| error | Error | Error object, see description below |
| revision | String | (Optional) Full (GIT) revision hash of application |
| tags | Object<String, String> | (Optional) Tags to filter the trace on, or to provide additional context. Make sure both key and values are strings (e.g. {"account_id": "abc-123"}) |
| params | Object<String, String> | (Optional) Parameters that were given to the function where the error occurred. Make sure both key and values are strings (e.g. {"id": "abc-123"}) |
| environment | Object<String, String> | (Optional) Environment values that were set when the error occurred. Make sure both keys and values are strings (e.g. {"REGION": "eu-central-1"}) |
| breadcrumbs | Array<Breadcrumb> | (Optional) Array of breadcrumbs, recorded before the error occurred. See below for description of Breadcrumb object |
| language | String | (Optional) Language string, used to format the backtrace. Accepted values are ruby, javascript. Leave empty when using another language |
| Parameter | Type | Description |
|---|---|---|
| name | String | Error name (e.g. StandardError) |
| message | String | (Optional) Error message |
| backtrace | Array<String> | (Optional) Array of backtrace lines, each line should be a string |
| Parameter | Type | Description |
|---|---|---|
| category | String | Category to label the event under (e.g. network or navigation) |
| action | String | Contextual information related to the event |
| message | String | (optional) A log message or other string to send to AppSignal |
| metadata | Object<String, String> | (optional) An object of metadata related to the event |
{
"action": "BlogpostController#show",
"namespace": "frontend",
"timestamp": 1559201249,
"error": {
"name": "StandardError",
"message": "Error message",
"backtrace": ["backtrace/line:1", "backtrace/line:2"]
},
"environment": {
"os": "windows",
"agent": "super secret user agent"
},
"params": {
"foo": "bar"
},
"tags": {
"account_id": "abc-123"
},
"revision": "revision-abc",
"breadcrumbs": [
{
"timestamp": 1559201249,
"category": "request",
"action": "http://google.com",
"message": "request failed",
"metadata": {
"code": "not_found"
}
}
],
"language": "javascript"
}
Example
require "uri"
require "json"
require "net/http"
url = URI("https://appsignal-endpoint.net/errors?api_key=FRONTEND-API-KEY")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"action": "BlogpostController#show",
"namespace": "frontend",
"timestamp": 1640327525,
"error": {
"name": "StandardError",
"message": "Error message",
"backtrace": [
"backtrace/line:1",
"backtrace/line:2"
]
},
"environment": {
"os": "windows",
"agent": "super secret user agent"
},
"params": {
"foo": "bar"
},
"tags": {
"account_id": "abc-123"
},
"revision": "revision-abc-123",
"breadcrumbs": [
{
"timestamp": 1640327525,
"category": "request",
"action": "http://google.com",
"message": "request failed",
"metadata": {
"code": "not_found"
}
}
],
"language": "javascript"
})
response = https.request(request)
puts response.read_body
The endpoint checks the API key and requires a nonempty body of up to 500 KB. A
200 OK response means the request was accepted for processing. It does not confirm that the payload’s data was stored. If data is missing, check the format shown on this page.