> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Observability metrics

> This topic describes metrics that LaunchDarkly autogenerates from observability events.

> For the complete documentation index, see [llms.txt](/llms.txt). For the full documentation snapshot, see [llms-full.txt](/llms-full.txt).

## Overview

This topic describes metrics that LaunchDarkly autogenerates from observability events.

The LaunchDarkly [observability SDKs](/sdk/observability) provide error monitoring and metric collection for errors, web vitals, and document loading in your browser application. The functionality is in separate plugins, which you enable in the initialization options for the LaunchDarkly SDK. The observability plugins collect and send data to LaunchDarkly, where you can review metrics, events, and errors from your application.

The observability events are prefixed with `$ld:telemetry` and LaunchDarkly automatically generates metrics from these events.

These expandable sections explain the metrics that LaunchDarkly autogenerates from events recorded by the observability plugins for LaunchDarkly browser SDKs:

<Accordion title="Average Cumulative Layout Shift (CLS) per context (LaunchDarkly) `$ld:telemetry:metric:cls`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average largest burst per context of layout shift scores for every unexpected layout shift that occurs during the entire lifecycle of a page.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 Cumulative Layout Shift (CLS) per context (LaunchDarkly) `$ld:telemetry:metric:cls`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile largest burst per context of layout shift scores for every unexpected layout shift that occurs during the entire lifecycle of a page.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 Cumulative Layout Shift (CLS) per context (LaunchDarkly) `$ld:telemetry:metric:cls`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile largest burst per context of layout shift scores for every unexpected layout shift that occurs during the entire lifecycle of a page.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="Average Document Load Latency per context (LaunchDarkly) `$ld:telemetry:metric:document_load`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average DOM load duration in milliseconds per context

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 Document Load Latency per context (LaunchDarkly) `$ld:telemetry:metric:document_load`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile DOM load duration in milliseconds per context

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 Document Load Latency per context (LaunchDarkly) `$ld:telemetry:metric:document_load`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile DOM load duration in milliseconds per context

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="User error rate (LaunchDarkly) `$ld:telemetry:error`">
  **Metric kind**: Custom conversion binary

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Occurrence
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Include units and set the value to `0`

  **Description**:
  Measures the percentage of contexts that encountered an error at least once. This metric is autogenerated by an initial `$ld:telemetry:session:init` event and populated by subsequent `$ld:telemetry:error` events. This means you can use the metric even if your app has not yet generated any errors.

  **Example usage**:
  Running a guarded rollout to make sure the error change doesn't result in a higher error rate
</Accordion>

<Accordion title="Average First Contentful Paint (FCP) per context (LaunchDarkly) `$ld:telemetry:metric:fcp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average time in milliseconds per context between first navigation to a page and when any part of the page's content is rendered.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 First Contentful Paint (FCP) per context (LaunchDarkly) `$ld:telemetry:metric:fcp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile time in milliseconds per context between first navigation to a page and when any part of the page's content is rendered.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 First Contentful Paint (FCP) per context (LaunchDarkly) `$ld:telemetry:metric:fcp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile time in milliseconds per context between first navigation to a page and when any part of the page's content is rendered.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="Average First Input Delay (FID) per context (LaunchDarkly) `$ld:telemetry:metric:fid`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average time in milliseconds per context between a user's first interaction (click, tap, or key press) and the time when the browser starts processing event handlers in response to that interaction.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 First Input Delay (FID) per context (LaunchDarkly) `$ld:telemetry:metric:fid`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile time, in milliseconds per context, between a user's first interaction (click, tap, or key press) and the time when the browser starts processing event handlers in response to that interaction.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 First Input Delay (FID) per context (LaunchDarkly) `$ld:telemetry:metric:fid`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile time, in milliseconds per context, between a user's first interaction (click, tap, or key press) and the time when the browser starts processing event handlers in response to that interaction.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="Average Interaction to Next Paint (INP) per context (LaunchDarkly) `$ld:telemetry:metric:inp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average response time in milliseconds per context of all click, tap, and keyboard interactions during the lifespan of a visit to a page.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 Interaction to Next Paint (INP) per context (LaunchDarkly) `$ld:telemetry:metric:inp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile response time in milliseconds per context of all click, tap, and keyboard interactions during the lifespan of a visit to a page.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 Interaction to Next Paint (INP) per context (LaunchDarkly) `$ld:telemetry:metric:inp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile response time in milliseconds per context of all click, tap, and keyboard interactions during the lifespan of a visit to a page.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="Average Largest Contentful Paint (LCP) per context (LaunchDarkly) `$ld:telemetry:metric:lcp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average time in milliseconds per context to render the largest image, text block, or video visible when first navigating to a page

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 Largest Contentful Paint (LCP) per context (LaunchDarkly) `$ld:telemetry:metric:lcp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile time in milliseconds per context to render the largest image, text block, or video visible when first navigating to a page

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 Largest Contentful Paint (LCP) per context (LaunchDarkly) `$ld:telemetry:metric:lcp`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile time in milliseconds per context to render the largest image, text block, or video visible when first navigating to a page

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="Average Time to First Byte (TTFB) per context (LaunchDarkly) `$ld:telemetry:metric:ttfb`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: User

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: Average
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the average time in milliseconds per context between the request for a resource and when the first byte of a response begins to arrive.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P95 Time to First Byte (TTFB) per context (LaunchDarkly) `$ld:telemetry:metric:ttfb`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P95
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 95th percentile time in milliseconds per context between the request for a resource and when the first byte of a response begins to arrive.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>

<Accordion title="P99 Time to First Byte (TTFB) per context (LaunchDarkly) `$ld:telemetry:metric:ttfb`">
  **Metric kind**: Custom numeric

  **Suggested analysis unit**: Request

  **Definition**:

  * Measurement method: Value/size
  * Unit aggregation method: Average
  * Analysis method: P99
  * Success criterion: lower is better
  * Units without events: Exclude units that generate no events

  **Description**:
  Measures the 99th percentile time in milliseconds per context between the request for a resource and when the first byte of a response begins to arrive.

  **Example usage**:
  Observing the latency of interactions an end user makes with your application
</Accordion>
