tsuga services list plus tsuga teams list/get — confirm service and owner; extract sources[], errorLogsCount24h, errorTracesCount24h, logsCount24h, tracesCount24h, env, and query time. Treat counters as rolling snapshot state. If both error counters are 0: lead with "No errors in last 24h per service registry snapshot" before proceeding with window investigation.
If the service emits context.service.version, surface active versions with a capped scoped sample: tsuga logs search --query "context.service.name:\"<name>\" context.service.version:*" --from <from> --to <to> --max-results 10 --fields context.service.version. When multiple versions are live in the window, add context.service.version:<version> to the tsuga aggregation scalar / tsuga aggregation timeseries filters in step 3 and compare per version. Symptoms coinciding with a version change are a correlation only, not proof of causality (see Safety Rules).
Run the following in parallel (all four are independent). Pass JSON bodies with tsuga aggregation scalar --data '<json>' or tsuga aggregation timeseries --data '<json>'; do not curl the API.
a. Error count — tsuga aggregation scalar:
{
"timeRange": {"from": <unix_seconds>, "to": <unix_seconds>},
"dataSource": "logs",
"queries": [
{"aggregate": {"type": "count"}, "filter": "context.service.name:\"<name>\" level:ERROR <env filter if provided>"}
],
"formula": "q1"
}
b. Request rate — tsuga aggregation timeseries (log count per 5m):
{
"timeRange": {"from": <unix_seconds>, "to": <unix_seconds>},
"dataSource": "logs",
"queries": [
{"aggregate": {"type": "count"}, "filter": "context.service.name:\"<name>\" <env filter if provided>"}
],
"formula": "q1",
"aggregationWindow": "5m"
}
c. p95 latency by operation — tsuga aggregation timeseries (only if tracesCount24h > 0; default threshold is 1000ms):
{
"timeRange": {"from": <unix_seconds>, "to": <unix_seconds>},
"dataSource": "traces",
"queries": [
{"aggregate": {"type": "percentile", "percentile": 95, "field": "duration"}, "filter": "context.service.name:\"<name>\" <env filter if provided>"}
],
"groupBy": [{"fields": ["span.name"], "limit": 5}],
"formula": "q1",
"aggregationWindow": "5m"
}
d. Error pattern increases — tsuga logs error-pattern-increases --team <team> --from <from> --to <to> (use the team resolved with tsuga teams list/get; add --env <env> if provided) — detects actively spiking error patterns. --team is required. Note the count of patterns returned; non-empty results indicate anomalous volume growth.
Optional trace-log correlation: If sources[] includes both logs and traces, and error count > 0:
tsuga logs search --query "context.service.name:\"<name>\" trace_id:*" --from <peak_window_start> --to <peak_window_end> --max-results 10 --fields trace_id,context.sensitive
tsuga traces search --query "trace_id:\"<trace_id>\"" --from <peak_window_start> --to <peak_window_end> --max-results 10
Correlates traced errors with log errors in the same window. If no log sample has trace_id, state that trace-log correlation was not observed instead of reporting a count.