For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
      • POSTCreate metric
      • DELDelete metric
      • GETGet metric
      • GETList metrics
      • PATCHUpdate metric
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
On this page
  • Metric keys and event keys are different
  • Importing metric events
  • The metric import API uses a different base URL
REST API overview

Metrics

Was this page helpful?
Previous

Create metric

Next
Built with

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.