launchdarkly-metric-instrument

Add LaunchDarkly track() calls to instrument metric events in code.

25|8|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/launchdarkly/ai-tooling --skill launchdarkly-metric-instrument
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: launchdarkly-metric-instrument
Source: https://github.com/launchdarkly/ai-tooling/tree/main/skills/metrics/launchdarkly-metric-instrument
Command: npx skills add https://github.com/launchdarkly/ai-tooling --skill launchdarkly-metric-instrument

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Instrument LaunchDarkly metric events in a codebase by adding a track() call to measure actions and confirm events are flowing to LaunchDarkly.

Core Features & Use Cases

  • Detect the existing LD SDK setup and determine the correct track() signature for server-side vs client-side.
  • Insert the track() call at the right user action location, following existing context patterns and wrappers.
  • Verify event flow with MCP tooling and adjust data/metricValue according to the metric definition.

Quick Start

Identify the action, locate the event point (e.g., submit handler or API route), and add a track() call using the project's LD track pattern.

Frequently Asked Questions about launchdarkly-metric-instrument

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add LaunchDarkly metric tracking to my codebase?

Insert a track() call at the target user action location, such as a submit handler or API route, using the project's existing LaunchDarkly SDK pattern to measure actions and confirm event flow.

What is the correct track() syntax for server-side versus client-side LaunchDarkly SDKs?

The track() syntax depends on whether the existing LaunchDarkly SDK setup is server-side or client-side. The instrumentation process detects the current setup and applies the correct signature per language to ensure valid event flow.

Do I need an MCP server to instrument LaunchDarkly metric events?

Yes, an MCP server and appropriate tooling are prerequisites. MCP tooling is used after adding the track() call to verify the event flow and adjust the data or metricValue according to the metric definition.

How do I pass context and data payloads when tracking LaunchDarkly metric events?

When tracking LaunchDarkly metric events, follow existing context patterns and wrappers to structure the data payload. The instrumentation validates context usage and adjusts the data and metricValue to match the defined metric.

Can I use LaunchDarkly track() calls across different programming languages?

Yes, the instrumentation applies to both server-side and client-side SDK integrations across multiple languages. It ensures the skill follows the correct track() syntax specific to the language used in the codebase.