Sentry SDKs

If your app already uses a Sentry SDK, point it at Tailcove by changing only its DSN. Errors arrive as error log lines, are grouped into issues like any other exception, and show a stack trace, breadcrumbs, release and environment.

7 min read

On this page8 sections

Get a DSN#

  1. Open the source's Settings and find Error tracking (Sentry SDKs).
  2. Choose Generate key. The DSN looks like https://tce_…@ingest.tailcove.dev/4815162342. The number at the end is your source's project number for Sentry SDKs, which only accept a number there.
  3. Paste it into the SDK, as below.

The key in a DSN is public by design (it ends up in browser code), like a browser key. It is separate from the source's log token and browser key; Rotate key replaces it and the old one stops working at once, Revoke turns the endpoints off for the source.

PHP#

\Sentry\init([
    'dsn' => 'https://tce_…@ingest.tailcove.dev/4815162342',
    'release' => '[email protected]',
    'environment' => 'production',
]);

With Laravel and sentry/sentry-laravel, set SENTRY_LARAVEL_DSN in .env to the same DSN.

JavaScript#

import * as Sentry from '@sentry/browser';

Sentry.init({
    dsn: 'https://tce_…@ingest.tailcove.dev/4815162342',
    release: '[email protected]',
    environment: 'production',
});

A browser SDK sends an Origin, which must be one of the source's allowed origins (set under Browser key in the same Settings tab). Server-side SDKs send none and need no origin. Use a current SDK (v6 or later): older ones put the key in a header that a browser cannot send without a preflight the key is not part of.

Python#

import sentry_sdk

sentry_sdk.init(
    dsn="https://tce_…@ingest.tailcove.dev/4815162342",
    release="[email protected]",
    environment="production",
)

Mobile apps#

The Sentry SDKs for iOS (sentry-cocoa), Android (sentry-android), React Native and Flutter work with the same DSN. They send no browser Origin, so no allowed origin is needed. Use them for native crashes, next to the React Native or Flutter client for logs, or OpenTelemetry for a native app (iOS and Android). Native frames are not symbolicated yet: a release build shows a function name only when the SDK resolved it on the device.

What Tailcove keeps#

  • Errors and messages. An event with an exception becomes an error line with the exception class, message and stack frames; the app's own frames (in_app) are highlighted and the library frames fold. Messages become ordinary log lines. The same error groups into one issue however its numbers and ids change.
  • Release and environment, tags (up to 30), the last 30 breadcrumbs (their free-form data is dropped), the SDK name and version. The issue page filters by release and environment.
  • No user data. Requests (URLs, headers, cookies, bodies), users, local variables, source lines and extra data are dropped. If you want to count affected users, tick Keep the user id on events in the settings: it keeps the id and nothing else about the user.
  • Source maps. Upload your build's maps (see Code links and source maps) and a minified browser frame shows the original file, line and code. The event's release picks the map uploaded for that release, when there is one.
  • Not yet. Performance transactions, sessions and release health, attachments and profiles are accepted and ignored.

Bring over issue states and alert rules#

Changing the DSN moves new errors. What you decided in Sentry (this one's fixed, that one's noise) lives in its issue states and alert rules, and the importer brings those over too. Open the source's Issues tab and choose Import from Sentry.

  1. Enter your Sentry address (https://sentry.io, or your own if you run Sentry yourself; it has to be https), the organization and project slugs, and an auth token with the org:read, project:read and event:read scopes. Make a personal token in Sentry under User Settings → Personal Tokens; an organization token can't read issues.
  2. Choose Read the project. This runs in the background and saves nothing yet. It reads up to 500 of the project's resolved and ignored issues, the newest first, and its issue and metric alert rules.
  3. Check what each one becomes, untick what you don't want, and choose Bring it over.

The token is used for that one read and never stored: it isn't saved to our database, put in a log or sent back to your browser. Revoke it in Sentry when you're done.

Issue states. For each issue, Tailcove takes its latest event from Sentry and works out the issue that error makes here, the same way it does when the event arrives through the SDK. When the error comes in through the new DSN, it lands on that issue, already resolved or ignored. If someone already resolved or ignored the issue in Tailcove, their choice stays.

In Sentry In Tailcove
Resolved Resolved from the moment of the import. It reopens if the error happens again after that, like any regression.
Resolved in the next release, or in a commit Resolved from the import, as above. Tailcove doesn't resolve by release.
Ignored (archived) forever Ignored
Ignored until a date Ignored until that date
Ignored until it happens N more times Ignored until N more events
N more times within a time window N more events, with no window. It can come back sooner than in Sentry, never later.
N more users N more events. Tailcove doesn't count users, and each new user is at least one event.
Archived until escalating Ignored for 7 days. Tailcove doesn't forecast escalation.
Unresolved Nothing to bring over. It opens here when it happens.

Some issues can't be matched, and the importer says which: a Sentry issue whose latest event is a captured message (Tailcove makes issues from exceptions only), a performance issue, one whose events Sentry no longer keeps, or two Sentry issues that are one issue here. Those open as new issues when they next happen. Imported issues count toward the source's issue limit and are kept for your plan's retention after the import, whenever Sentry last saw them.

Alert rules. A rule comes over only when Tailcove has the same thing. Anything else is listed with the reason so you can set it up by hand.

Sentry rule In Tailcove
The issue changes from resolved, or from ignored, to unresolved Nothing to create: Tailcove already sends regressions to the channels of every active alert on the source.
The issue is seen more than N times in 1m, 5m, 15m, 1h or 1d The source's incident rule, N + 1 events in that window. It opens an incident rather than only sending a message.
A new issue is created, with a level filter of fatal The incident rule's "new and critical issue".
A new issue is created, any level Listed. Tailcove doesn't alert on every new issue.
Metric alert: count() of errors above N in up to a day A log alert on exception:* plus the search, at N + 1 lines in the window. level, environment and release terms are translated; anything else is listed.
Percent and unique-user conditions, "below", comparisons with an earlier period, transactions Listed.

Imported alerts email the team's members who turned on email alerts. Add Slack, PagerDuty or a webhook on each one afterwards. The import makes no more alerts than your plan has room for, and if a source already has an incident rule, the settings it has are kept.

Limits and errors#

  • An envelope is at most 1 MiB (inflated too), at most 20 events and 50 items. Items that cannot be read are skipped and counted in the response (skipped); the rest of the envelope is kept.
  • Events have a budget of their own (600 a minute by default) apart from the source's logs. Over it, or over a plan's monthly quota, Tailcove answers 429 with Retry-After and X-Sentry-Rate-Limits, which SDKs honour by pausing. A busy ingest buffer answers 503.
  • A wrong key is 401; a key used with another source's id, or a browser from an origin that is not allowed, is 403.

Still stuck?

Email us and we will help you get it working.

Contact support