Skip to content

Commit ed7a4d5

Browse files
committed
Updating tracing examples with practical scenarios
1 parent 5d62466 commit ed7a4d5

File tree

1 file changed

+5
-7
lines changed
  • docs/platforms/javascript/common/tracing/span-metrics

1 file changed

+5
-7
lines changed

docs/platforms/javascript/common/tracing/span-metrics/examples.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ sidebar_order: 10
66

77
<Alert>
88

9-
These examples assume you have already <PlatformLink to="/tracing/">set up tracing</PlatformLink> in your application.
10-
11-
</Alert>
12-
13-
<Alert>
14-
15-
The sample code contained within this page is for demonstration purposes only. It is not production-ready and may not be up to date with the latest version of Sentry. It's included as sample JavaScript code, and ultimately may not be for your specific language or framework.
9+
The sample code contained within this page is for demonstration purposes only. It is not production-ready. Examples are structural and ultimately may not be for your specific language or framework.
1610

1711
</Alert>
1812

@@ -308,7 +302,11 @@ app.post('/api/upload', async (req: Request<{}, {}, UploadRequest>, res: Respons
308302
}
309303
);
310304
});
305+
```
311306
307+
**Backend — Async media processing**
308+
309+
```typescript
312310
// Async media processing (runs in background via setImmediate)
313311
export async function processMedia(job: ProcessingJob): Promise<void> {
314312
await Sentry.startSpan(

0 commit comments

Comments
 (0)