Skip to content
logmast

Developer documentation

Use your Sentry SDK

Change one DSN and keep your Python, Node or Go Sentry SDK.

API v1 · Updated 2026-11-10View MarkdownSource manifest

A backend service that already reports to Sentry can report to Logmast by changing its DSN. The Sentry SDK stays as it is. Logmast stores, groups and alerts on error events, and receipts, retention, redaction, limits and billing apply exactly as they do for the HTTP API.

Python, Node and Go server SDKs are tested. Browser SDKs are refused, because a Logmast DSN is a credential.

Configure the DSN

Each ingest credential issued or rotated since Sentry support has a DSN. It is returned as sentry_dsn when you enroll, create a service or rotate a credential:

https://<sentry_key>@app.logmast.com/1

The project number is ignored, because the key selects the service. Older credentials have no DSN; rotate the credential to get one.

After logmastctl enroll, save the enrolled service’s DSN to a private file:

logmastctl sentry-dsn --output sentry-dsn.json

To derive the key yourself from an ingest token, take the first 32 hex characters of HMAC-SHA256, with the token as the key and logmast/sentry-dsn/1 as the message:

hmac.new(token.encode(), b"logmast/sentry-dsn/1", hashlib.sha256).hexdigest()[:32]
sentry_sdk.init(dsn=os.environ["LOGMAST_SENTRY_DSN"], environment="production", release="api@1.4.2",
                trace_propagation_targets=["internal.example.com"])

Keep the key on your hosts

Sentry SDKs treat the DSN key as public:

  • With default options, Python and Node attach it to the baggage header of outgoing HTTP requests to other hosts.
  • Node also puts it in the request URL.

Set trace_propagation_targets (Python and Node) to your own hosts so third parties do not receive it.

The DSN key can only submit events for its service: it cannot read evidence, change settings or use the HTTP API. Anyone holding it can still submit events, which spend your balance within the per-second and daily limits. If it leaks, rotate the service credential, which replaces both the ingest token and the DSN.

What is kept

Kept From the Sentry event
Title Exception type and value, or the log message
Exception chain and stack Types, values, and frames as module.function (file:line)
Context Environment, release, transaction (as the operation), level, SDK, platform, server name, logger, tags, trace ID
Breadcrumbs The last 32: time, type, category, level and message

Never stored: request headers, cookies, bodies and URLs; user data; extra; frame local variables; source lines; breadcrumb data; contexts other than the trace. Your workspace’s redacted field names then apply as for any event.

Only error events are kept. Transactions, spans, sessions, attachments, profiles, replays, crons check-ins, logs and feedback are acknowledged and discarded without charge. Each response tells the SDK, through X-Sentry-Rate-Limits, to stop sending them.

Grouping

Events with an exception are grouped by the primary exception’s type and its innermost three in-app frames, plus the type and location of each cause. Exception values and line numbers are not used, so user 123 not found and user 456 not found share a group. Log messages are grouped by logger and by message template: identifiers, numbers, quoted values and email addresses are ignored.

  • Override with your SDK: set a fingerprint in the SDK. {{ default }} stands for the default grouping.
  • Override in Logmast: add a grouping rule matching the code prefix, for example ValueError@billing.. Codes such as ValueError@billing.charge<billing.retry also work in mutes and notification rules.

Limits and responses

Limit Value
Envelope on the wire 8 MiB (413 above)
Event item 1 MiB; stored events are trimmed to 64 KiB
Encodings identity, gzip, deflate, br
Concurrent envelopes 2 at a time per workspace; up to 4 more wait, each for at most 5 seconds; beyond that, 429

Envelopes count toward the same per-second, daily and balance limits as batches. A refused trial or quota tells the SDK to pause for 60 seconds. A retried event is a free duplicate. An event that arrives without a time is stamped with the server’s clock and marked sentry.timestamp_assumed.

Search documentation

Search guides, contracts, and agent playbooks.

Search runs in your browser over public documentation.