@errorbird/node
v0.2.0
Published
Errorbird sunucu SDK'sı — Node.js (ve Edge) uygulamalarındaki hataları gruplanmak ve source map'lerle çevrilmek üzere gönderir
Maintainers
Readme
@errorbird/node
Errorbird sunucu SDK'sı: Node.js uygulamalarındaki (Express, NestJS,
Fastify, betikler) hataları gruplanmak ve source map'lerle orijinal koda çevrilmek üzere
gönderir. Yalnızca fetch kullanır; Edge ortamlarında da çalışır. Next.js için
@errorbird/nextjs kullanın.
Server SDK for Errorbird: sends errors from Node.js apps (Express,
NestJS, Fastify, scripts) to be grouped and mapped back to your source with source maps. Uses
only fetch, so it also runs on edge runtimes. For Next.js use
@errorbird/nextjs.
Kurulum / Install
npm install @errorbird/nodeKullanım / Usage
import { init, captureException } from '@errorbird/node'
init({
key: process.env.ERRORBIRD_SECRET_KEY!, // secret anahtar; yalnızca sunucuda
release: process.env.ERRORBIRD_RELEASE,
environment: 'production',
})
try {
await odemeAl(siparis)
} catch (error) {
captureException(error, { tags: { siparis: siparis.id } })
throw error
}Yakalanmamış hatalar kendiliğinden gönderilir; uygulamanın kendi uncaughtException
dinleyicisi yoksa Node'un varsayılanı korunur (hata yazdırılır, süreç 1 ile kapanır).
Sunucusuz ortamda yanıt dönmeden önce await flush() çağırın.
Uncaught errors are sent automatically; without your own uncaughtException listener, Node's
default is kept (the error is printed and the process exits with 1). On serverless platforms
call await flush() before returning the response.
Source map'ler / Source maps
ERRORBIRD_SECRET_KEY=… npx errorbird-sourcemaps --release [email protected] --delete distDokümantasyon / Documentation
- Türkçe: https://docs.errorbird.com/nextjs.html
- English: https://docs.errorbird.com/en/nextjs.html
Lisans / License
MIT
