Flare by Spatie
    • Error Tracking
    • Performance Monitoring
  • Pricing
  • Docs
  • Insights
  • Changelog
  • Back to Flare
  • Sign in
  • Try Flare for free
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Docs
  • Insights
  • Changelog
    • Back to Flare
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript Protocol Protocol
  • General
  • Introduction
  • Resources
  • Events
  • Errors
  • Payload
  • Attributes
  • Sourcemaps
  • Traces
  • Payload
  • Lifecycle
  • Aggregations

Payload

Endpoint

POST https://ingress.flareapp.io/v1/errors

Headers

Header Value Description
Content-Type application/json Required
Accept application/json Required
x-api-token {apiToken} API token
X-Report-Browser-Extension-Errors true Optional, omit this header to filter out errors caused by browser extensions

Authentication

Authenticate using your project's API key in the x-api-token header. Both the private and public API key can be used for this endpoint.

Payload

Field Type Validation Description
exceptionClass string/null nullable Exception class name
seenAtUnixNano int required Unix timestamp in nanoseconds
message string/null nullable Error message
code string/null nullable, max 64 Exception code
applicationPath string/null nullable App root path
openFrameIndex int/null nullable Index of the stack frame to focus on
sourcemapVersionId string/null nullable Source map version ID for JS source map resolution
solutions array required Array of solution objects
attributes object required Flat key-value context data (see Attributes)
events array required Spans and span events
stacktrace array required Array of stack frame objects
trackingUuid string/null nullable, uuid Unique report identifier
handled bool/null nullable Whether the exception was caught
overriddenGrouping enum/null nullable Custom grouping strategy (overrides the default)

overriddenGrouping Values

By default, Flare groups errors by exception class and the top application frame in the stacktrace. Set overriddenGrouping to override this with a different strategy:

Value Description
exception_class Group by exception class only
exception_message Group by exception message only
exception_message_and_class Group by both message and class
full_stacktrace_and_exception_class_and_code Group by full stacktrace, class, and code

Events

Spans and span events are combined into a single events array on the root payload. Spans represent operations with a duration (e.g. a query or HTTP request) and have both a start and end time. Span events represent point-in-time occurrences (e.g. a log entry or cache hit) and only have a start time, endTimeUnixNano is always null. For the full list of types and their attributes, see Events.

Field Type Description
startTimeUnixNano int Start time in nanoseconds
endTimeUnixNano int/null End time in nanoseconds. null for span events
type string Type identifier
attributes object Flat key-value attributes

Stacktrace Frames

Field Type Validation Description
file string required File path
lineNumber int required Line number
columnNumber int optional Column number (useful for JS)
method string/null nullable Method/function name
class string/null nullable Class name
codeSnippet object<int, string>/null nullable Code lines keyed by line number
arguments array/null nullable Array of argument objects (null if not collected)
isApplicationFrame bool optional Whether this is application code (vs vendor)

Arguments

Each entry in the arguments array:

Field Type Description
name string Parameter name (e.g. $userId, request). Falls back to arg0, arg1, etc. when reflection is unavailable.
value mixed A serializable representation of the argument value (see below)
original_type string The original type name before reduction (e.g. int, array, User)
passed_by_reference bool Whether the parameter is passed by reference
is_variadic bool Whether the parameter is variadic
truncated bool Whether the value was truncated
Argument value Reduction Guidelines

Arguments must be reduced to JSON-serializable values before sending. The exact reduction strategy is up to the implementer, but the following guidelines should be followed:

  • Primitive values (int, float, bool, string, null) should be kept as-is.
  • Large arrays should be truncated to a reasonable size (e.g. 25 items) and truncated set to true.
  • Nested arrays should be recursively reduced.
  • Objects that cannot be safely serialized should be reduced to a string representation, with the original type stored in original_type.
  • Sensitive values (passwords, tokens, secrets) should never be sent. Replace them with a placeholder string.
  • Closures and callbacks should be reduced to their source location if possible.
  • Keep the total payload size in mind. Argument data is one of the first things trimmed when the payload exceeds the size limit.

Solutions

Field Type Description
class string Solution provider class name
title string Solution title
description string Detailed description
links object<string, string> Label to URL map of documentation links
actionDescription string/null Description of the runnable action (null if not runnable)
isRunnable bool Whether the solution can be executed
aiGenerated bool Whether this solution was AI-generated

Responses

All responses include CORS headers (Access-Control-Allow-Origin: *) and return application/json.

Status Description
200 Error report accepted
403 Invalid API key
405 HTTP method not allowed (only POST is accepted)
422 Missing API key
429 Rate limit or error quota exceeded

All error responses follow this structure:

{
    "message": "Description of the error",
    "errors": {}
}

Example

{
    "exceptionClass": "App\\Exceptions\\PaymentFailedException",
    "seenAtUnixNano": 1710252000000000000,
    "message": "Payment declined by gateway",
    "code": "402",
    "applicationPath": "/var/www/app",
    "openFrameIndex": 0,
    "sourcemapVersionId": null,
    "trackingUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "handled": false,
    "overriddenGrouping": null,
    "attributes": {
        "service.name": "My Application",
        "service.version": "1.0.0",
        "service.stage": "production",
        "telemetry.sdk.language": "PHP",
        "telemetry.sdk.name": "spatie/flare-client-php",
        "telemetry.sdk.version": "1.0.0",
        "flare.language.name": "PHP",
        "flare.language.version": "8.4.0",
        "flare.framework.name": "Laravel",
        "flare.framework.version": "12.0.0",
        "host.name": "web-01",
        "host.arch": "arm64",
        "os.type": "linux",
        "os.name": "Ubuntu",
        "git.hash": "abc123",
        "git.branch": "main",
        "flare.entry_point.type": "web",
        "flare.entry_point.value": "https://example.com/checkout",
        "flare.entry_point.class": "App\\Http\\Controllers\\CheckoutController",
        "url.full": "https://example.com/checkout",
        "url.scheme": "https",
        "url.path": "/checkout",
        "http.request.method": "POST",
        "http.route": "checkout",
        "http.request.body.size": 256,
        "client.address": "192.168.1.1",
        "user_agent.original": "Mozilla/5.0",
        "laravel.route.name": "checkout.store",
        "laravel.route.action": "App\\Http\\Controllers\\CheckoutController@store"
    },
    "events": [
        {
            "type": "php_query",
            "startTimeUnixNano": 1710251999500000000,
            "endTimeUnixNano": 1710251999800000000,
            "attributes": {
                "db.system": "mysql",
                "db.statement": "select * from `orders` where `id` = ?",
                "db.sql.bindings": [42]
            }
        },
        {
            "type": "php_log",
            "startTimeUnixNano": 1710251999900000000,
            "endTimeUnixNano": null,
            "attributes": {
                "log.message": "Processing payment for order 42",
                "log.level": "info"
            }
        }
    ],
    "stacktrace": [
        {
            "file": "/var/www/app/Services/PaymentService.php",
            "lineNumber": 45,
            "method": "charge",
            "class": "App\\Services\\PaymentService",
            "isApplicationFrame": true,
            "codeSnippet": {
                "43": "    $response = $gateway->charge($amount);",
                "44": "    if (! $response->successful()) {",
                "45": "        throw new PaymentFailedException($response->message());",
                "46": "    }",
                "47": ""
            },
            "arguments": [
                {
                    "name": "$amount",
                    "value": 2999,
                    "original_type": "int",
                    "passed_by_reference": false,
                    "is_variadic": false,
                    "truncated": false
                }
            ]
        },
        {
            "file": "/var/www/app/Http/Controllers/CheckoutController.php",
            "lineNumber": 32,
            "method": "store",
            "class": "App\\Http\\Controllers\\CheckoutController",
            "isApplicationFrame": true,
            "codeSnippet": null,
            "arguments": null
        }
    ],
    "solutions": [
        {
            "class": "App\\Solutions\\RetryPaymentSolution",
            "title": "Retry the payment",
            "description": "The payment gateway returned a temporary error. Try again.",
            "links": {},
            "actionDescription": null,
            "isRunnable": false,
            "aiGenerated": false
        }
    ]
}
Events Attributes
  • On this page
  • Endpoint
  • Authentication
  • Payload
  • Responses
  • Example

Catch errors and fix slowdowns with Flare, the full-stack application monitoring platform for Laravel, PHP & JavaScript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Insights
  • Newsletter
  • Changelog
  • Documentation
  • Affiliate program
  • uptime status badge Service status
  • Terms of use
  • DPA
  • Privacy & cookie Policy
Flare