New advertisers: 50% off your first month with code FIRSTMONTHSee slots
launchdarkly avatar

Launchdarkly Metric Instrument

Instrument LaunchDarkly metric events by adding track() calls and verifying they reach LaunchDarkly.

skills.sh installs
2.3K
GitHub stars
32
last updated
Jul 14, 2026
View on GitHub

What it does

  • Covers SDK detection, call placement, track() writing for server-side and client-side SDKs, and event verification
  • Includes per-language reference patterns (references/sdk-track-patterns.md) and a troubleshooting table for events that never appear
  • Enforces matching the codebase's existing context object, exact event key casing, and wrapper utilities over direct ldClient calls
  • Designed for developers who need a metric event wired into code and confirmed through the get-metric-events MCP tool

Install

$ npx -y skills add launchdarkly/ai-tooling --skill launchdarkly-metric-instrument -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

LaunchDarkly Metric Instrument

You're using a skill that will guide you through adding a track() call to a codebase so a LaunchDarkly metric can measure it. Your job is to detect the SDK in use, find the right place in code to add the call, write it correctly, and verify that events are reaching LaunchDarkly.

Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.

Required MCP tools:

  • get-metric-events — verify events are flowing after instrumentation

Optional MCP tools (enhance workflow):

  • get-sdk-key — retrieve the server-side SDK key for the right environment when SDK initialization is needed (get-environment for a client-side ID or mobile key)

Workflow

Step 1: Detect the SDK

Before writing any code, understand the LaunchDarkly setup already in this codebase.

  1. Search for existing track() calls. This is the fastest signal:
    • Look for ldClient.track(, .track(, ld.track(
    • If any exist, they tell you the SDK type, call signature, and context pattern in one shot — mirror those exactly.

Details

Repository
github.com/launchdarkly/ai-tooling
Categories
DevOps & Cloud, Backend & APIs
First seen
May 16, 2026

More from launchdarkly/ai-tooling

All 40

Similar to Launchdarkly Metric Instrument

More DevOps & Cloud