Migrate from Sentry
Create an axonpush DSN, swap it into each Sentry SDK, confirm the first events arrived and run Sentry and axonpush side by side.
Moving a service over means changing its DSN. Everything else in your Sentry setup can stay as it is. Start with one service or one non-production environment, check what arrives, then widen.
Create a DSN
- In the dashboard, pick the workspace and the environment in the top bar. The DSN is bound to that workspace’s application and to that environment.
- Open Settings › Integrations. The Sentry card is under Traces as evidence.
- Press Create a DSN. The card shows DSN (contains the token) with ready-made snippets for Python, Node, Browser and Go.
- Copy the DSN now and store it in your secret manager. It is shown once. Later the card only lists each DSN’s prefix, when it was created and when it was last used, with a Revoke button.
The DSN looks like this:
https://pt_...@api.axonpush.xyz/1234567The user part is a public ingest token (pt_). It decides the organisation,
application, channel and environment every event is written to. The number at
the end is only there because Sentry SDKs require an integer project id;
axonpush ignores it. On a self-hosted install the host is your own API URL.
Repeat this for each environment you send from. One DSN always writes to one axonpush environment.
Using a coding agent?
The MCP tool workspaces_connect mints a DSN together with the publish key and
returns it as SENTRY_DSN through a one-time claim link. See
Connect over MCP.
Swap the DSN
Server-side Sentry SDKs read SENTRY_DSN, SENTRY_ENVIRONMENT and
SENTRY_RELEASE from the environment when you don’t pass them to init. If
your service already works that way, changing SENTRY_DSN in its deployment
config is the whole migration. Browser bundles take the DSN at build time.
If the DSN is in code, replace it there:
import os
import sentry_sdk
sentry_sdk.init(
dsn=os.environ["SENTRY_DSN"], # the axonpush DSN
environment="production",
release=os.environ.get("GIT_SHA"),
traces_sample_rate=1.0,
enable_logs=True,
)Other SDKs (.NET, Java, Ruby, PHP, mobile) work the same way: they all speak the envelope protocol, so set the DSN and keep the rest. Check Supported data for what is kept per data type, especially if you rely on symbolication.
A browser DSN is public by design, like a Sentry DSN. The token can only write telemetry to its own application and environment. Revoke it from the Sentry card if it leaks.
The axonpush SDK's Sentry helper
If you used installSentry from @axonpush/sdk or install_sentry from the
Python axonpush package, pass the dashboard DSN as dsn. That works in every
release, and so does calling Sentry.init with the DSN directly. In the
published SDKs, the helpers’ apiKey / channelId form builds a DSN whose
project segment is a channel id, which Sentry SDKs reject, and an ak_ API key
is refused by the Sentry endpoint in any case.
The next SDK release changes the helpers to take a pt_
public ingest token instead (public_token
in Python, publicToken in TypeScript, or AXONPUSH_PUBLIC_TOKEN), refuse API
keys, and derive the integer project id from the channel id. Until then, use
the DSN.
Map environments and releases
- Environment. The DSN decides the axonpush environment. The SDK’s
environmentis kept on every event asdeployment.environment.namebut cannot move an event into another axonpush environment. Use one DSN per environment and keep the SDK value the same as the axonpush environment so both read the same. - Release.
releaseis used as sent, so keep whatever format you have (my-app@1.4.0, a commit SHA). The Releases page groups sessions, errors and new issues by that string, and resolving an issue “in release” uses it too. If the Sentry bundler plugin was injecting the release for you and you remove it, setreleaseexplicitly.
Confirm the first events arrived
Right after creating a DSN, Send a test event on the Sentry card posts an info-level message through the same endpoint your SDK uses. It shows up under Evidence › Events.
Then send something from your own code:
import sentry_sdk
try:
1 / 0
except ZeroDivisionError as exc:
sentry_sdk.capture_exception(exc)
sentry_sdk.flush()Open What we receive on the Sentry card. It counts, per data type and for the last 24 hours or 7 days:
- Accepted: stored.
- Dropped by axonpush, with the reason: not supported (replays, profiles), not recognised, invalid payload, over 5 MiB (attachments), or a storage failure.
- Dropped by the SDK, from the client reports it sends: sampled out,
filtered by
before_send, rate-limit back-off, full queue.
Then check the page for each signal you rely on: Errors, Traces, Events, Monitors and Releases. The trace list has a source column, so traces that came from a Sentry SDK are easy to pick out.
If nothing arrives, turn on the SDK’s debug option and look at the HTTP status:
| Status | Meaning |
|---|---|
401 | The token is wrong, revoked, or its application, channel or environment was deleted. |
403 | Sentry ingest is turned off on this server (SENTRY_INGEST_ENABLED=false on a self-hosted install). |
402, 429 | Billing blocks ingest (trial ended, payment overdue past grace, subscription paused), the self-hosted licence is inactive, or the monthly quota is reached. The SDK backs off using Retry-After. |
413 | The request is over 6 MB. |
400 | The envelope or event could not be parsed. |
Run Sentry and axonpush side by side
Two ways to compare before you switch, from simplest to most complete.
Split by service or environment. Point staging, or one service, at axonpush and leave the rest on Sentry. Nothing in your code changes beyond the DSN.
Send the same data to both. A Sentry SDK has one DSN, but both SDKs let you replace the transport. These send every envelope (errors, spans, logs, check-ins, sessions, client reports) to both destinations.
import os
import sentry_sdk
from sentry_sdk.transport import HttpTransport, Transport
AXONPUSH_DSN = os.environ["AXONPUSH_SENTRY_DSN"]
class BothTransport(Transport):
def __init__(self, options):
super().__init__(options)
self._targets = [
HttpTransport(options),
HttpTransport({**options, "dsn": AXONPUSH_DSN}),
]
def capture_envelope(self, envelope):
for target in self._targets:
target.capture_envelope(envelope)
def flush(self, timeout, callback=None):
for target in self._targets:
target.flush(timeout, callback)
def kill(self):
for target in self._targets:
target.kill()
sentry_sdk.init(
dsn=os.environ["SENTRY_DSN"], # your existing Sentry DSN
transport=BothTransport,
traces_sample_rate=1.0,
)In the browser, use Sentry.makeFetchTransport in place of
Sentry.makeNodeTransport. Install @sentry/core at the same version as your
@sentry/* package.
Things to expect while both run:
- Sampling happens once, in the SDK, so both sides see the same traces. Raising
tracesSampleRateto compare agent runs raises what Sentry ingests too. - Issue counts may differ, because each side groups on its own rules. A
fingerprintyou set in the SDK is honoured by both. - If you self-host Sentry and turned span streaming off for it, axonpush gets the static format too, which it also accepts. See SDK settings.
Source maps and sentry-cli in CI
axonpush has no source map, debug file or release API, so sentry-cli and the
Sentry bundler plugins have nothing to upload to. Stack traces are shown as the
SDK sent them.
- Running both: keep your existing upload step pointed at Sentry. It doesn’t affect axonpush.
- axonpush only: remove the
sentry-cli releases,sourcemaps uploadanddebug-files uploadsteps. For@sentry/vite-plugin,@sentry/webpack-pluginand the other bundler plugins, remove the plugin or setsourcemaps: { disable: true }. Without an auth token the plugins already skip the upload with a warning. Keep settingreleaseininit. - Minified browser code: until symbolication exists, frames from minified bundles stay minified. Shipping source maps alongside your bundle doesn’t change that, because axonpush does not fetch them.
Privacy
Error pages show stack traces, breadcrumbs, request data and user context, so decide at the source what to send:
- In Python, keep
send_default_piioff, or usedata_collection, and setinclude_prompts=Falseon AI integrations if prompts must not leave the process. In JavaScript SDK v11, use thedataCollectionoption (for examplegenAI: { inputs: false, outputs: false }). - Use
before_send/beforeSend,before_send_log/beforeSendLogandbeforeSendSpanto drop personal data before it is sent. - On the server, axonpush always removes credential-looking keys and values (authorization headers, cookies, passwords, bearer tokens, JWTs, API keys, private keys). Under Settings › Privacy you can choose a capture mode that drops or shortens prompt and response content on agent spans, and add redaction paths and rules. See Privacy.
Server redaction is a second layer. It does not replace filtering at the source.