Open brc-dd opened 3 months ago
Hey @brc-dd thanks for writing in! Sounds like a good idea. However, we're all booked on a lot of other tasks at the moment so I'm gonna backlog this for now. Since you already figured out most the moving parts, are you interested in contributing your instrumentation as a PR?
Ok sure. I'm currently testing this out internally. I'll create a PR in 2-3 days.
I need bit of clarification though, should breadcrumbs be cleared for isolationScope
at the starting of withIsolationScope
? Because otherwise each message will show console logs from other requests too. Not sure though why it isn't there in bun. Something like this (https://stackoverflow.com/a/54815332/11613622):
return new Proxy(handler, {
apply(fetchTarget, fetchThisArg, fetchArgs: Parameters<typeof handler>) {
return withIsolationScope((isolationScope) => {
isolationScope.clearBreadcrumbs() // or maybe isolationScope.clear()
const request = ...
withIsolationScope
should isolate the breadcrumbs to each request, you shouldn't need to clear anything.
I wonder if the Deno async context is working properly 🤔
I wonder if the Deno async context is working properly
Without .clear there, the breadcrumbs have older logs too:
Code:
Without .clear there, the breadcrumbs have older logs too:
Yeah that's a bug we need to fix! Let me PR.
Problem Statement
similar to https://github.com/getsentry/sentry-javascript/blob/develop/packages/bun/src/integrations/bunserver.ts
Solution Brainstorm
Rough working implementation:
needs
requestDataIntegration