track_metric
Record a metric point from your app for counters or gauges, such as page views, successful checkouts, or latency. Increment counters by a value or log a measurement to track telemetry over time.
Instructions
Record a metric point your app "produced". Use this whenever the surrounding code emits a counter or gauge — e.g. on a page view, a successful checkout, or a measured latency. Counters are +N (default +1), values are gauges (e.g. 42.5 ms).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stat | Yes | Name of the metric to record (e.g. "page_views", "api.latency_ms", "checkout.success"). Allowed chars: letters, numbers, underscores, hyphens, dots. Auto-created on first use. | |
| count | No | For COUNTER stats: how much to increment by. Omit (or set with `value`) for a gauge/measurement stat. If both `count` and `value` are omitted, this defaults to +1. | |
| value | No | For VALUE/gauge stats: the measurement to record (e.g. 42.5 for "load time ms"). Omit for a counter increment. | |
| timestamp | No | Optional Unix-seconds timestamp for back-dated datapoints. Omit for "now". |