query-spans

Query distributed tracing spans with DataPrime syntax to locate latency and errors.

114|10|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/coralogix/cx-cli --skill query-spans
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: query-spans
Source: https://github.com/coralogix/cx-cli/tree/main/skills/query-spans
Command: npx skills add https://github.com/coralogix/cx-cli --skill query-spans

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Query and analyze distributed tracing data to locate latency, slow operations, and errors across services.

Core Features & Use Cases

  • Query spans across services to identify latency bottlenecks, reconstruct traces, and surface errors using DataPrime syntax.
  • Filter, group, and aggregate on standard span fields ($m.timestamp, $m.duration, $l.serviceName, $l.operationName, $d.traceID) to derive actionable insights and performance hotspots.
  • Use cases include debugging cross-service calls, identifying slow spans, and correlating traces with logs to improve incident response.

Quick Start

Run a cx spans query for your target time window to retrieve matching spans and inspect results.

Frequently Asked Questions about query-spans

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

FAQPage Schema
How do I diagnose latency across services using distributed tracing?

Diagnose latency by querying distributed tracing data to locate slow operations and errors across services. You can filter, group, and aggregate standard span fields like $m.duration and $l.serviceName to pinpoint performance hotspots.

How do I query spans to investigate errors in production systems?

Query spans using DataPrime syntax to investigate errors in production systems. By applying the cx spans command with time-range controls, you can retrieve matching spans and surface errors correlated with logs for incident response.

What fields do I use to filter traces for slow spans?

Filter traces for slow spans using standard span fields such as $m.timestamp, $m.duration, $l.serviceName, $l.operationName, and $d.traceID. These fields allow you to group and aggregate data to derive actionable insights.

Can I reconstruct a full trace to debug cross-service calls?

You can reconstruct traces to debug cross-service calls by querying spans with DataPrime syntax. Filtering by $d.traceID allows you to retrieve and sequence the relevant spans to visualize the full request path.

What is DataPrime syntax used for in span analysis?

DataPrime syntax is used in span analysis to query and filter distributed tracing data. It supports investigating traces and spans by applying deterministic queries across standard span fields to identify latency bottlenecks and errors.

Are there limitations when using time-range controls for span queries?

Span queries require time-range controls including start, end, and limit parameters to function deterministically. You must define these parameters to properly retrieve and analyze matching spans within your target time window.