# Enhanced Browser SDK capabilities for better trace correlation in Discover Applications

> Browser SDK now offers improved trace correlation, custom error capture, and flexible span attribution for richer frontend observability in Discover Applications.

Source: https://last9.io/changelog/enhanced-browser-sdk-capabilities-for-better-trace-correlation-in-discover-applications/

### Improvements

- **Better trace correlation for custom events**: Custom events created via `L9RUM.addEvent()` are now properly associated with the active view root span instead of creating independent traces, improving trace correlation and view-level analysis
- **Backend trace context propagation**: Browser SDK now automatically injects W3C trace context headers into fetch and XHR requests, correlating frontend traces with backend services
- **Global span attributes**: Applications can register custom attributes that are automatically included in every span for consistent metadata across traces
- **Unified error capture pipeline**: New `L9RUM.captureError()` API enables manual error reporting, with configurable automatic capture from console errors, global error handlers, ReportingObserver, and network failures
- **Custom event tracking**: `L9RUM.addEvent()` API now emits custom standalone traces enriched with session and view context, enabling tracking of user actions like button clicks

[Read our docs](https://last9.io/docs/real-user-monitoring/web/#configuration).
