# Telemetry

Anonymous collection of system performance data to enhance service quality.

## Overview

We collect the following functional events:

- `CXR_LifetimeEvent`: Tracks events when a `CloudXRSession` is created and destroyed.

- `CXR_SessionConfiguration`: Gathers session initialization metadata such as resolution used to initialize a `CloudXRSession`.

- `CXR_SessionState`: Monitors changes in the `SessionState`.

- `CXR_ExceptionInfo`: Records exceptions, occurring within a `CloudXRSession`.

- `CXR_ClientRequest`: Records the action when the client sends a message to server.

- `CXR_ServerResponse`: Records the action when the server responds to client requests.

- `CXR_ClientMetricEvent`: Records performance metrics for `CloudXRSession`, such as session duration, frame counts, and message statistics.

Data is collected exclusively for service purposes, without capturing any persistent IDs or personal information, and it is not associated with any specific user or device. To opt out of telemetry data collection, disable telemetry in the session configuration.

## Configuration

Telemetry can be configured when creating a CloudXR session:

    import * as CloudXR from '@nvidia/cloudxr';

    const session = CloudXR.createSession({
      // ... other session options
      telemetry: {
        enabled: true, // Enable telemetry collection (default: true)
        appInfo: {
          product: 'My CloudXR App',
          version: '1.0.0'
        }
      }
    });

### Telemetry Options

- `enabled`: Boolean flag to enable/disable telemetry collection. Defaults to `true`.
- `appInfo`: Optional application information object containing:
  - `product`: Product name (e.g., "MyApp")
  - `version`: Application version (e.g., "1.0.0")