The fundamental design of this project, Pigeon, has problems at scale due to the nature of the Workers runtime and Sentry library design. A colleague of mine went on to tackle this problem in a more scalable way with Toucan, which you should check out instead: https://github.com/robertcepa/toucan-js
This client attempts to adhere to the Sentry SDK Guidelines and works inside a Cloudflare Workers environment.
npm install --save tlianza/pigeon
Initialize the client in your worker
import * as Pigeon from "pigeon";
// Your cloudflare worker starts here
addEventListener("fetch", event => {
// Initialize the client with your DSN & current event
Pigeon.init({
dsn: "YOUR_DSN",
event: event
});
// Make sure this is on.
event.passThroughOnException();
//Rest of your logic/routing/etc here.
});
Use it within your code like this:
Pigeon.captureMessage("Test Message");
Pigeon.captureException(new Error("TEST Error"));
Pigeon.addBreadcrumb({
category: 'method',
message: 'Method "testmethod" was called',
level: Severity.Info
});
You should see all of the expected request info. Stack traces should be present but line numbers will be a little sad if your code is webpacked/wrangled up. Still, you'll get the appropriate column numbers.
This is a real example from debugging the "not my phone" app.
It seemed like the Sentry clients were all named after birds (Raven, etc) and a Pigeon is a "worker bird".