Skip to content

Sentry DSN ingest

If you already have @sentry/node, sentry-sdk, or any other Sentry client in your stack, you can point it at axonpush by changing one environment variable. Errors, transactions, CSP reports, minidumps, check-ins, and session envelopes all flow in as first-class axonpush events.

SENTRY_DSN=https://<key>@api.axonpush.xyz/<channelId>
  • <key> — either an API key (ak_...) or a public ingest token (pt_...). Use pt_* in browser / mobile SDKs so you don’t ship an ak_ key to clients.
  • <channelId> — the numeric axonpush channel ID that ingested events should land in.

The Sentry SDK will post envelopes to POST /api/:channelId/envelope under the hood.

import * as Sentry from "@sentry/node";
Sentry.init({
dsn: "https://pt_live_abc123@api.axonpush.xyz/1",
environment: process.env.NODE_ENV,
tracesSampleRate: 0.2,
});
Sentry.captureException(new Error("boom"));
import sentry_sdk
sentry_sdk.init(
dsn="https://ak_prod_xyz@api.axonpush.xyz/1",
environment="production",
traces_sample_rate=0.2,
)
sentry_sdk.capture_exception(RuntimeError("boom"))

Every route the official SDKs hit is supported:

EndpointPurpose
POST /api/:channelId/envelopeThe modern envelope protocol — events, transactions, sessions, check-ins, attachments, CSP.
POST /api/:channelId/storeLegacy single-event endpoint (still used by some older SDKs).
POST /api/:channelId/securityBrowser-posted CSP / Expect-CT / Expect-Staple reports.
POST /api/:channelId/minidumpNative crash minidumps.

The key is pulled from whichever of these the SDK sends first:

  1. X-Sentry-Auth: Sentry sentry_key=<key>, ... (standard Sentry SDK header)
  2. Authorization: DSN <dsn> (legacy)
  3. ?sentry_key=<key> query parameter (browser-side CDN uploads)

The ingest normalizer turns Sentry item types into axonpush event types:

Sentry item typeaxonpush event_type
event with exception.values[]agent.error
event without exceptionsapp.log
transaction (+ child spans[])app.span (one per transaction + one per span)
check_incustom (metadata.checkIn = true)
session / sessionscustom (metadata.session = true)
attachmentapp.log with base64 payload (truncated above 1 MiB)
csp-reportapp.log (metadata.sentryItemType = "csp")
minidumpagent.error with base64 dump (truncated above 1 MiB)

trace_id and span_id from contexts.trace are preserved end-to-end, so axonpush traces stay linked to anything else you ingest via OTLP or the SDKs.

level values (debug, info, warning, error, fatal) map to OTel-style severityNumber / severityText so your Sentry-sourced logs sit in the same timeline as structured logs from Pino / Winston / stdlib logging.

The environment field on Sentry events is honored when the API key has allowEnvironmentOverride=true. Otherwise the key’s bound environment wins. See Environments for the rules.

These Sentry item types are accepted but silently dropped (acknowledged with a partialSuccess hint in the response):

  • client_report
  • statsd
  • profile / profile_chunk
  • replay_event / replay_recording

The Sentry SDK won’t retry on a 200, so you can leave them in — they just won’t show up in axonpush.

When the ingest quota is exceeded, axonpush returns the standard Sentry rate-limit header so the SDK backs off correctly:

HTTP/1.1 429 Too Many Requests
X-Sentry-Rate-Limits: 60:error:organization, 60:transaction:organization

Envelopes larger than 6 MB are rejected with 413 Payload Too Large. The Sentry SDK splits long sessions into multiple envelopes automatically, so this only matters for very large attachments (minidumps, source maps). If you regularly hit the cap, upload the attachment to your own object store and reference its URL in the event payload.

  • Environments — how the DSN key picks which env to write into
  • OTLP ingest — same channel, OpenTelemetry format instead of Sentry envelopes
  • API Keys — minting ak_* keys