-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/cloudflare
SDK Version
10.3.0
Framework Version
No response
Link to Sentry event
Reproduction Example/SDK Setup
Nested manual spans as described here: https://docs.sentry.io/platforms/javascript/guides/cloudflare/tracing/span-metrics/#creating-dedicated-metric-spans
are not showing up in error traces.
I'm facing some deep issues in my workflows, and using the spans to debug what is happening. To do so, I'm nesting spans (one span for multiple step.do that are related)
The issue is none of those nested span are showing up in the dashboard, making it impossible to track what is going on
Steps to Reproduce
class WorkflowIngestBase extends WorkflowEntrypoint<
Cloudflare.Env,
IngestionWorkflowParameters
> {
async run(
event: WorkflowEvent<IngestionWorkflowParameters>,
step: WorkflowStep,
): Promise<void> {
const page = step.do('fetch page'() => {...})
for (const item in page.item){
Sentry.startSpan(
{
name: 'my custom span',
attributes: {
pageID: page.id,
}
},
async () => {
await step.do('process page item', async () => {...})
await step.do('save item', async () => {...})
}
);
}
}
}
export const WorkflowIngest = SentryCloudflare.instrumentWorkflowWithSentry(
(_environment: Cloudflare.Env) => {
return {
dsn: '...',
...customSentryConfig,
};
},
WorkflowIngestBase,
);
Expected Result
(in Sentry)
Trace
|- step.do fetch page
|- my custom span
| |- step.do process item
| |- step.do save item
|- my custom span
| |- step.do process item
| |- step.do save item
| ...
Actual Result
(in Sentry)
Trace
|- step.do fetch page
|- step.do process item
|- step.do save item
|- step.do process item
|- step.do save item
Metadata
Metadata
Assignees
Labels
Projects
Status