Metrics

Metrics track flag behavior over time when an experiment is running. The data generated from experiments gives you more insight into the impact of a particular flag. To learn more, read Metrics.

Using the metrics API, you can create, delete, and manage metrics.

Metric keys and event keys are different

LaunchDarkly automatically generates a metric key when you create a metric. You can use the metric key to identify the metric in API calls.

Custom conversion/binary and custom numeric metrics also require an event key. You can set the event key to anything you want. Adding this event key to your codebase lets your SDK track actions customers take in your app as events. To learn more, read Sending custom events.

Importing metric events

The metric import API is separate from the metrics API.

The metric import API lets you import metric events from your data pipeline for use with Experimentation and guarded rollouts. This means you can send your already-instrumented metrics into LaunchDarkly without writing and deploying new code for each metric.

For details on the metric import API, read Importing metric events.

The metric import API uses a different base URL

The metric import API differs from other LaunchDarkly REST APIs because it uses a different base URL: it requires https://events.launchdarkly.com rather than https://app.launchdarkly.com. For this reason, the metric import API is also not included as part of LaunchDarkly’s generated client libraries, and details are not included in the OpenAPI specification. To learn more, read Importing metric events.