Send your first error
PostDeploy accepts events from Sentry SDKs. You need an account, one project and one source. The source gives you a DSN for your SDK.
Steps
- Create an account, then create an organization. The 14-day trial starts when the organization is created.
- Create a project. A project groups the errors and logs of one application.
- Create a source for that project. A source is one environment, such as
productionorstaging. - Copy the DSN from the source page. PostDeploy shows it once. If you lose it, rotate the key on the source page. Rotation gives a new DSN and stops the old one.
- Add the DSN to your SDK with one of the examples below, then deploy or run your application.
- Select Send test event on the source page to check the path to PostDeploy. The page then shows whether errors and logs have arrived.
Tested SDK versions
We test these SDK versions against PostDeploy. Other SDKs and versions are not tested.
| Language | Package | Version | Tested data |
|---|---|---|---|
| Node.js | @sentry/node | 11.6.0 | Errors and structured logs |
| Python | sentry-sdk | 2.72.0 | Errors |
| Ruby | sentry-ruby | 7.1.0 | Errors |
| Elixir | sentry | 14.0.0 | Errors |
For Python, Ruby and Elixir, logs are not tested. Send logs from Node.js, or check the result on the source page before you depend on it.
Node.js
import * as Sentry from "@sentry/node";
Sentry.init({
dsn: process.env.POSTDEPLOY_DSN,
enableLogs: true,
});
Sentry.logger.info("checkout started", { request_id: "req-123" });
Python
import os
import sentry_sdk
sentry_sdk.init(dsn=os.environ["POSTDEPLOY_DSN"])
Ruby
Sentry.init do |config|
config.dsn = ENV["POSTDEPLOY_DSN"]
end
Elixir
# config/runtime.exs
config :sentry, dsn: System.fetch_env!("POSTDEPLOY_DSN")
Source maps
Owners and admins upload a JavaScript source map for a release with POST /api/orgs/{org}/projects/{project}/[email protected]&name=~/app.js.map and the map as the request body. Stack frames of events with that release then show the original file, line and function. Build-tool plugins are not tested.
PostDeploy SDK keys
The PostDeploy Elixir, Ruby and JavaScript SDKs send errors to /e/errors with their obs_ key. These keys also work in a Sentry DSN whose project path is /1. Their errors go through the same pipeline as Sentry events.