Sentry SDK settings
Which Sentry SDK options change what axonpush receives, and the values that fit how axonpush ingests today.
You don’t need special settings to send to axonpush. Defaults work. The options
below are the ones that change what arrives, with values that match what the
ingest endpoint handles today. Option names are given for Python
(sentry-sdk 2.x) and JavaScript (@sentry/* v11).
A starting configuration
import os
import sentry_sdk
sentry_sdk.init(
dsn=os.environ["SENTRY_DSN"],
environment="production",
release=os.environ["GIT_SHA"],
server_name=os.environ.get("HOSTNAME"),
traces_sample_rate=1.0, # keep every trace and agent run
enable_logs=True, # off by default in Python
send_default_pii=False,
send_client_reports=True, # SDK-side drops show in What we receive
profiles_sample_rate=0.0, # profiles are not stored
)Sampling
| Python | JavaScript | Recommendation |
|---|---|---|
traces_sample_rate | tracesSampleRate | 1.0 to keep every trace. axonpush does no sampling of its own, so whatever the SDK sends is kept. |
traces_sampler | tracesSampler | Use it to keep every agent run and sample noisy routes, for example health checks, lower. |
sample_rate | sampleRate | Leave at 1.0. Sampled-out errors never reach axonpush. |
profiles_sample_rate | profilesSampleRate | 0 if you only send to axonpush. Profiles are counted as not supported. |
| n/a | replaysSessionSampleRate, replaysOnErrorSampleRate | 0 if you only send to axonpush. Replays are counted as not supported. |
Sampling decides what is sent, and on the managed cloud every stored span, log
and error counts toward your plan’s monthly events. To trim volume without
losing agent runs, drop low-value spans in the SDK with ignoreSpans /
ignore_spans rather than lowering the sample rate for everything.
Span streaming
Sentry SDKs can send a trace as one transaction when it finishes (static) or
as batches of spans while it runs (streamed). axonpush accepts both and builds
the same trace from either.
| SDK | Option | Default | Recommendation |
|---|---|---|---|
| JavaScript v11 | traceLifecycle | "stream" | Keep the default. "static" also works. |
| Python | trace_lifecycle | "static" | Either. "stream" sends spans as they finish, which helps long agent runs show up sooner. |
| Python | stream_gen_ai_spans | True | Keep True. AI spans are split out of the transaction and sent as streamed spans, and axonpush links them back into the trace. |
Coming from self-hosted Sentry
If you turned span streaming off so that a self-hosted Sentry could read your
traces (traceLifecycle: "static" in JavaScript, stream_gen_ai_spans=False in
Python), you can turn it back on for services that only send to axonpush. If the
same SDK also sends to that Sentry, leave it off; axonpush reads the static
format too, including AI spans nested in the transaction.
Environment, release and host
| Python | JavaScript | What axonpush does with it |
|---|---|---|
environment | environment | Stored as deployment.environment.name. The axonpush environment comes from the DSN, so use one DSN per environment and the same name in both places. |
release | release | Drives the Releases page, release health and “resolve in release”. Required for sessions to count. |
dist | dist | Stored as sentry.dist. |
server_name | serverName | Stored as host.name. It does not split issues, so a per-pod hostname is fine. |
Logs and metrics
| Python | JavaScript | Recommendation |
|---|---|---|
enable_logs | Logs are on in v11 | Set enable_logs=True in Python to send sentry_sdk.logger records. |
before_send_log | beforeSendLog | Drop or scrub records before they leave the process. |
enable_metrics | Sentry.metrics.* | On by default in Python. Counters, gauges and distributions are kept; other metric types are skipped. |
Log records at error or fatal level also open issues on the Errors page. If
you already capture the same failure as an exception, consider logging it at
warning.
Cron monitors
Send a monitor_config with at least one check-in so axonpush knows the
schedule. Without one a monitor records runs but can’t report missed ones.
from sentry_sdk.crons import monitor
@monitor(
monitor_slug="nightly-sync",
monitor_config={
"schedule": {"type": "crontab", "value": "0 2 * * *"},
"timezone": "Europe/London",
"checkin_margin": 5, # minutes late before a run is missed
"max_runtime": 60, # minutes before an in-progress run times out
"failure_issue_threshold": 2,
"recovery_threshold": 1,
},
)
def nightly_sync():
...Defaults when not set: a 1 minute margin and a 30 minute maximum runtime.
Sessions and release health
| Python | JavaScript | Recommendation |
|---|---|---|
auto_session_tracking | Session integrations on by default | Keep on, and set release. Sessions without a release are dropped. |
Grouping
| Python | JavaScript | Effect |
|---|---|---|
in_app_include, in_app_exclude | Frames are marked by the SDK | The last in-app frame is part of the issue fingerprint, so marking your own code correctly gives better grouping. |
scope.fingerprint | scope.setFingerprint() | Replaces the default grouping, or extends it with {{ default }}. |
Privacy
| Python | JavaScript | Recommendation |
|---|---|---|
send_default_pii, data_collection | dataCollection | Decide which user data, headers, cookies, bodies and AI inputs and outputs the SDK collects. |
include_prompts on AI integrations | dataCollection.genAI, dataCollection.mcp | Turn off if prompts and tool arguments must not leave the process. |
include_local_variables | dataCollection.stackFrameVariables | Local variables are shown on stack frames when sent. Turn off if they can hold personal data. |
before_send, before_send_transaction | beforeSend, beforeSendSpan | Last chance to scrub or drop. |
axonpush also redacts on the server. See Privacy.
Delivery
| Python | JavaScript | Recommendation |
|---|---|---|
send_client_reports | sendClientReports | Keep on (the default). axonpush shows the SDK’s own drops under What we receive. |
debug | debug | Turn on while migrating to see the HTTP status of each request. |
transport | transport | Only needed to send to Sentry and axonpush at once. See Migrate. |