Sentry Compatibility#
LogTap natively implements the Sentry Store and Envelope reporting protocols, taking over the /api/:projectId/store/ and /api/:projectId/envelope/ endpoints. SDKs like @sentry/browser and @sentry/node work without swapping libraries — stack traces, breadcrumbs, tags, and context are stored as-is.
How to adopt#
Replace the DSN host in your existing Sentry SDK initialization with your LogTap gateway:
// Before
Sentry.init({
dsn: "https://[email protected]/0",
});
// After: change only the host and project ID, keep everything else
Sentry.init({
dsn: "https://examplePublicKey@your-logtap-host/api/1/",
});Key points:
- The project ID in the DSN maps to the project ID in the LogTap console
- Auth reuses Sentry's
sentry_key;X-Project-Keyworks too - SDK-side sampling, environment, tags, and user-context configuration all keep working
Data handling#
- Both Store and Envelope protocols are implemented per the Sentry spec; events land in the same storage as logs and are queried in one console
- Reporting IPs are resolved to country, city, and ASN via the offline GeoLite2 database (when GeoIP is enabled)
Migrating historical data from Sentry#
LogTap ships a migration tool that imports historical events from an existing Sentry instance, so switching over doesn't mean discarding old data. See the tool and its usage notes in the logtap source repository.
FAQ#
- Do I need to change business code? No — changing the DSN is enough; the SDK and reporting path stay untouched.
- How complete is the compatibility? The Store and Envelope endpoints are implemented natively per the Sentry protocol and cover what SDKs report by default. If you hit a missing advanced feature, please open a GitHub issue.
- Can I still use custom logs and events? Yes — Sentry errors and custom data share the same project system. See the Ingest API.