Cloudflare Durable Objects
Learn how to add Sentry instrumentation for Cloudflare Durable Objects.
(Available in version 9.16.0 and above)
You can use the instrumentDurableObjectWithSentry
method to instrument Cloudflare Durable Objects.
Copied
import * as Sentry from "@sentry/cloudflare";
class MyDurableObjectBase extends DurableObject<Env> {
// impl
}
// Export your named class as defined in your wrangler config
export const MyDurableObject = Sentry.instrumentDurableObjectWithSentry(
(env) => ({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
tracesSampleRate: 1.0,
}),
MyDurableObjectBase,
);
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").