measure-telemetry-span

Measures Sentry performance span durations by replaying agent-device flows on iOS simulators or Android emulators.

5.0k|4.0k|Updated Aug 7, 2020
One-click install
npx skills add https://github.com/Expensify/App --skill measure-telemetry-span
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: measure-telemetry-span
Source: https://github.com/Expensify/App/tree/main/.claude/skills/measure-telemetry-span
Command: npx skills add https://github.com/Expensify/App --skill measure-telemetry-span

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-device.

What problem does it solve?

Measuring mobile app performance spans locally requires manually replaying user flows and parsing device logs for timing data. This Skill automates that loop: it replays a tagged agent-device flow repeatedly, captures Sentry span log lines, and prints a summary table with average, minimum, and maximum durations.

Core Features & Use Cases

  • Automated span measurement: Runs a warmup plus N measured replays of a flow tagged # @tag sentry-<span-name> and parses [Sentry][<Span>] Ending span (Nms) log lines from iOS simctl or Android logcat.
  • Repeatable state resets: Supports @reset flows or automatic app relaunch between runs so each measurement starts from a known anchor state.
  • Branch comparison workflow: Measures whatever Git checkout is active, letting you run it on different branches or worktrees and compare the printed summaries.
  • Use Case: After optimizing a React Native screen, run the skill against the sentry-open-chat span on Android with 10 runs to verify the average span duration dropped versus the main branch.

Quick Start

Ask the AI to measure the Sentry span for your flow by running the measure script with the span name, run count, and platform, for example measuring the open-chat span on Android with 10 runs.

Frequently Asked Questions about measure-telemetry-span

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

FAQPage Schema
How do I measure a Sentry performance span locally on a simulator?

Run the measure.sh script with the span name, run count, and platform, for example measure.sh open-chat 10 ios. The script finds the flow tagged sentry-open-chat, replays it with agent-device, and prints average, minimum, and maximum durations parsed from device logs.

How do I compare performance between two Git branches?

The script measures whatever checkout is currently active and never switches branches itself. Check out each branch in turn, or use two worktrees, run the measurement separately on each, and compare the two printed summary tables.

Does the measurement work on both iOS and Android?

Yes, pass ios or android as the platform argument. iOS captures logs via xcrun simctl log stream and requires agent-device react-devtools attached, while Android reads adb logcat at debug level. Use --boot to start a simulator or emulator if none is connected.

Why does the script report no captured runs?

No captured runs means the span log line never appeared in the captured output. On iOS, verify react-devtools is attached so Hermes console.debug reaches logs; on Android, check log level and package name, then retry after clearing the log pipeline.

What prerequisites are needed before running the measurement?

You need agent-device installed globally, Metro running on port 8081, and a dev build installed on the target device. The flow file must declare a matching sentry tag, and the app must log the span ending message via console.debug.