Catch the crash. Find the line.

Point the SDK you already run at Davy. Each error lands in an issue with its release, its stack and the logs of the same request.

Keep your SDK.
Change the DSN.

Davy speaks the Sentry protocol, the Logtail format and OTLP logs. The SDK and the shipper you run today send to it after one setting changes.

Pick what you run

.env

  # read by Sentry.init({ dsn: process.env.SENTRY_DSN })
- SENTRY_DSN=https://OLD_KEY@o0.ingest.sentry.io/0
+ SENTRY_DSN=https://KEY@davy.example.com/1

The tests run the real @sentry/node 7 and 10 against the release binary. The Node guide

src/main.js

  Sentry.init({
-   dsn: 'https://OLD_KEY@o0.ingest.sentry.io/0',
+   dsn: 'https://KEY@davy.example.com/1',
    release: 'my-app@1.0.0',
  })

The tests run the real sentry-cli for source maps. The Browser guide

.env

  # read by sentry_sdk.init(dsn=os.environ["SENTRY_DSN"])
- SENTRY_DSN=https://OLD_KEY@o0.ingest.sentry.io/0
+ SENTRY_DSN=https://KEY@davy.example.com/1

Same protocol. Not in the tests yet. The Python guide

.env

  # read by sentry.Init(sentry.ClientOptions{Dsn: os.Getenv("SENTRY_DSN")})
- SENTRY_DSN=https://OLD_KEY@o0.ingest.sentry.io/0
+ SENTRY_DSN=https://KEY@davy.example.com/1

Same protocol. Not in the tests yet. The Go guide

.env

  # read by let dsn = std::env::var("SENTRY_DSN")?.parse()?;
- SENTRY_DSN=https://OLD_KEY@o0.ingest.sentry.io/0
+ SENTRY_DSN=https://KEY@davy.example.com/1

Checked against the SDK docs, no runtime test yet. The Rust guide

.env

  # read by options.Dsn = Environment.GetEnvironmentVariable("SENTRY_DSN")
- SENTRY_DSN=https://OLD_KEY@o0.ingest.sentry.io/0
+ SENTRY_DSN=https://KEY@davy.example.com/1

Checked against the SDK docs, no runtime test yet. The .NET guide

local.properties

  # read by local.getProperty("SENTRY_DSN", "") in build.gradle.kts
- SENTRY_DSN=https://OLD_KEY@o0.ingest.sentry.io/0
+ SENTRY_DSN=https://KEY@davy.example.com/1

Checked against the SDK docs, no runtime test yet. The Android guide

log.js

  pino.transport({ target: '@logtail/pino', options: {
-   sourceToken: process.env.BETTER_STACK_TOKEN,
+   sourceToken: process.env.DAVY_LOG_KEY,
+   options: { endpoint: 'https://davy.example.com' },
  }})

The tests run the real @logtail/pino against the release binary. The pino guide

sink settings

- endpoint  your Better Stack ingest host
+ endpoint  https://davy.example.com
- token     your Better Stack source token
+ token     KEY, the key in the project DSN

Takes the same two settings under its own names. Not in the tests. The Vector guide

output settings

- endpoint  your Better Stack ingest host
+ endpoint  https://davy.example.com
- token     your Better Stack source token
+ token     KEY, the key in the project DSN

Takes the same two settings under its own names. Not in the tests. The Fluent Bit guide

environment

+ OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://davy.example.com/v1/logs
+ OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer $DAVY_LOG_KEY"

Logs only, over HTTP. The tests run the real exporters. The OpenTelemetry guide

Log Drain, Custom Endpoint

+ Endpoint URL    https://davy.example.com/vercel/logs
+ Custom Headers  Authorization: Bearer KEY

Built to the log schema and signing Vercel documents. Not yet checked against a live drain. The Vercel guide

Replaces Sentry for errors and Better Stack for logs and uptime.

Every event finds its issue.
A fix belongs to a release.

Davy groups errors by their type and the frames in your code. Mark an issue fixed in a release and it stays fixed, unless the error comes back in that release or a newer one.

shop-api, productionlatest release 1.4.0

Events

Issues

  • Newsince 1.4.0

    TypeError Cannot read properties of undefined (reading 'total')

    applyCoupon in src/checkout/coupon.ts14
  • Unresolvedsince 1.3.2

    Error connect ETIMEDOUT 10.0.4.12:5432

    query in src/db/pool.ts212
  • Unresolvedsince 1.3.2

    RangeError Invalid time value

    formatDue in src/invoices/format.ts37
  • Resolved in 1.3.2since 1.3.2

    PaymentError acme answered 502 after 3 retries

    charge in src/payments/acme.ts9

Fingerprint of TypeError, the type and the frames in your code. Line numbers never count, so a deploy does not split it.

  1. TypeError
  2. src/checkout/coupon.ts applyCoupon:42
  3. src/checkout/cart.ts priceCart:118
  4. src/routes/checkout.ts POST /api/checkout:27

A resolved issue reopens only for its own release or a newer one. An old server that still runs keeps it resolved.

The issue, in one view.
Every clue next to the stack.

The stack shows its source, your code bright and libraries dim. The breadcrumbs and the logs of the same request sit one tab away. The keys are the ones Davy's web UI uses. Point at the inspector and press R, I or O.

errorNew

TypeError

Cannot read properties of undefined (reading 'total')

applyCoupon in src/checkout/coupon.ts14 eventsfirst seen in 1.4.0

Crash-nearest frame first. Frames in your code open with their source.

  1. applyCoupon src/checkout/coupon.ts:42in app

    38export function applyCoupon(cart: Cart, code?: string) {
    39  if (!code) return cart.total
    40  const rules = loadRules()
    41  const rule = rules.get(code)
    42  return cart.total - cart.total * rule.total
    43}
    
  2. priceCart src/checkout/cart.ts:118in app

    117  const subtotal = sum(lines)
    118  const total = applyCoupon({ ...cart, total: subtotal }, cart.coupon)
    119  return { lines, total }
    
  3. POST /api/checkout src/routes/checkout.ts:27in app

    26  const cart = await loadCart(req.session.cartId)
    27  const priced = priceCart(cart)
    28  res.json(await createOrder(priced))
    
  4. handle node_modules/express/lib/router/layer.js:95library

  5. next node_modules/express/lib/router/route.js:149library

  6. processTicksAndRejections node:internal/process/task_queues:95library