Skip to content

Commit e0d2463

Browse files
committed
removing queues example
1 parent f219234 commit e0d2463

File tree

1 file changed

+0
-96
lines changed
  • docs/platforms/javascript/common/tracing/span-metrics

1 file changed

+0
-96
lines changed

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

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -330,99 +330,3 @@ The frontend span tracks the user's checkout experience, while the backend span
330330
- Monitor inventory availability impact on conversions
331331
- Measure end-to-end order completion times
332332
- Identify friction points in the user experience
333-
334-
## Job Scheduling and Processing Pipeline
335-
336-
**Challenge:** Understanding performance and reliability of distributed job processing systems, from job creation through completion.
337-
338-
**Solution:** Comprehensive tracking of job lifecycle across scheduling, queueing, and processing stages.
339-
340-
**Frontend Instrumentation:**
341-
```javascript
342-
// Client-side job submission and monitoring
343-
Sentry.startSpan(
344-
{
345-
name: 'Job Submission Flow',
346-
op: 'job.client',
347-
attributes: {
348-
// Job configuration
349-
'job.type': 'video_transcoding',
350-
'job.priority': 'high',
351-
'job.estimated_duration_ms': 300000,
352-
353-
// Input metrics
354-
'input.size_bytes': 52428800, // 50MB
355-
'input.format': 'mp4',
356-
'input.segments': 5,
357-
358-
// Client-side scheduling
359-
'schedule.requested_start': '2024-03-15T10:00:00Z',
360-
'schedule.deadline': '2024-03-15T11:00:00Z',
361-
362-
// Progress monitoring
363-
'monitor.polling_interval_ms': 5000,
364-
'monitor.status_updates_received': 12,
365-
'monitor.last_progress_percent': 45
366-
}
367-
},
368-
async () => {
369-
// Job submission and progress tracking implementation
370-
}
371-
);
372-
```
373-
374-
**Backend Instrumentation:**
375-
```javascript
376-
// Server-side job processing
377-
Sentry.startSpan(
378-
{
379-
name: 'Job Processing Pipeline',
380-
op: 'job.server',
381-
attributes: {
382-
// Queue metrics
383-
'queue.name': 'video-processing',
384-
'queue.provider': 'redis',
385-
'queue.length_at_enqueue': 23,
386-
'queue.wait_time_ms': 45000,
387-
388-
// Worker metrics
389-
'worker.id': 'worker-pod-123',
390-
'worker.current_load': 0.75,
391-
'worker.memory_usage_mb': 1024,
392-
393-
// Processing stages
394-
'processing.stages_completed': ['download', 'transcode', 'thumbnail'],
395-
'processing.stage_durations_ms': {
396-
'download': 12000,
397-
'transcode': 180000,
398-
'thumbnail': 5000
399-
},
400-
401-
// Resource utilization
402-
'resource.cpu_percent': 85,
403-
'resource.gpu_utilization': 0.92,
404-
'resource.memory_peak_mb': 2048,
405-
406-
// Job outcome
407-
'outcome.status': 'completed',
408-
'outcome.retry_count': 0,
409-
'outcome.output_size_bytes': 31457280 // 30MB
410-
}
411-
},
412-
async () => {
413-
// Job processing implementation
414-
}
415-
)
416-
);
417-
```
418-
419-
**How the Trace Works Together:**
420-
The frontend span tracks job submission and monitoring, while the backend span captures queue management and processing details. The distributed trace provides visibility into the entire job lifecycle, enabling you to:
421-
422-
- Monitor end-to-end job processing times and success rates
423-
- Track queue health and worker resource utilization
424-
- Identify bottlenecks in specific processing stages
425-
- Analyze job scheduling efficiency and queue wait times
426-
- Optimize resource allocation based on job characteristics
427-
428-
For more information about implementing these examples effectively, see our <PlatformLink to="/tracing/span-metrics/">Span Metrics guide</PlatformLink> which includes detailed best practices and implementation guidelines.

0 commit comments

Comments
 (0)