Skip to main content

Query metrics

molesignal metrics query runs a PromQL range query and prints one line per series: its last, lowest, and highest value over the window, a sparkline of it, and its labels.
The window is the last hour by default; --since, --from, and --to change it. -n caps the points, 1000 by default. --json prints each series with its points, and --csv prints the points as rows. Four more subcommands find what to query:

Find traces

The list shows the newest traces with their start, duration, number of spans, and service.

Draw a trace

molesignal traces show draws one trace as a waterfall: one line per span, under its parent, with a bar for when it ran within the trace and how long it took. Failed spans are marked with !, and red on a terminal.
--web opens the trace in MoleSignal, and --json prints its spans.

Sum up services

The list shows each APM service with its requests, error rate, p95 latency, health, and current version. --sort orders it by requests, errors, p95, or name. molesignal services show sums up one service: its rate, errors, and latency, then its endpoints, dependencies, errors, and versions:

Compare two versions

molesignal services compare sets two versions of a service side by side and says whether the candidate regressed, improved, held, or had too few requests to tell. With --fail-on-regression, a regression ends the command with 1, so that a pipeline can stop a release on it:

Run long queries as search jobs

A search job runs a query in the background over more data and more time than a query on the spot, and keeps its result for a while. Submitting and cancelling one go through the organization’s Tool Policy, like every change; see Incidents and changes.
The stream is the first one after FROM; --stream names another, and --promql submits a PromQL statement, read at the end of the window, or at every --step such as 1m. --limit caps the rows the job keeps, at most 100000, and --keep how long it keeps them. --wait waits for the job to finish. The command prints the job’s id.

Access

Metrics and traces take streams.query or sys.telemetry.read, as do APM and search jobs. The organization’s Tool Policy must leave the tools on.
Last modified on October 28, 2026