Skip to main content

Overview

The SDK automatically collects rich browser metadata and includes it with your traces. This data helps you understand the environment where events occurred, debug issues, and analyze user patterns.

Enabling Metadata Collection

Metadata collection is enabled by default. To disable it:

Collected Metadata

The SDK collects 27+ environment metrics, organized into categories:

Browser Information

Operating System

Display

Hardware

Network

Locale

Page Context

Privacy

Using Metadata Utilities

The SDK exports utility functions for direct metadata access:

When Metadata is Sent

Metadata is included only on the first flush (FlushTrace). Subsequent flushes don’t resend metadata, reducing payload size.

IP Address

The client’s IP address is not collected by the SDK. Instead, it’s captured by the backend from request headers. This ensures accurate IP detection even when users are behind proxies.

Privacy Considerations

Selective Collection

If you have privacy requirements, disable automatic collection and add only what you need:

GDPR Compliance

Metadata collection should be covered in your privacy policy. Consider:
  • Informing users about data collection
  • Providing opt-out mechanisms
  • Respecting Do Not Track preferences

Next Steps

Retry Logic

Handle network failures gracefully

TypeScript

Full type safety with the SDK