← Back to blog
Product 4 min read 炬鲸团队

SQL-like Log Search and One-Click Trace Correlation in Observe

SQL-like search brings log queries back to intuition, and one-click trace correlation takes you from a single error line to the full call chain, cutting triage time dramatically.

Why log queries should go back to SQL

The most off-putting part of any log platform is usually the query language. Elasticsearch's Lucene syntax and assorted homegrown DSLs punish a single misplaced parenthesis with an empty result set, and new teammates burn hours reading docs before they can write a useful query. Observe designs log search as SQL-like: if you can write SELECT ... WHERE ..., you can query logs.

SELECT service, COUNT(*) AS cnt
FROM logs
WHERE level = 'ERROR' AND ts > now() - 1h
GROUP BY service
ORDER BY cnt DESC

No Lucene syntax, no upfront field-type declarations. Developers, testers and operators can all start immediately. This is not a downgrade — it returns query power to the user. Log search is fundamentally filter, aggregate and sort, and SQL is naturally good at exactly that.

There's a payoff to this choice that goes beyond onboarding speed. When the query language is one engineers already know, people stop dreading the log tool. They explore, ask questions of the data, form hypotheses and test them on the spot. That is the difference between a log platform people use only when forced, and one they reach for first. For a technical lead evaluating tools, treat "query barrier" as a hard metric: can the person on the team least familiar with the log platform write a working query within ten minutes? If the answer is no, that tool is going to become a single-person bottleneck.

From one error line to the full call chain

The most common incident-response path goes like this: find an error line in the logs, then figure out which request produced it, what its upstream was, and what it called downstream. The traditional way is to grep a request_id by hand and walk the logs layer by layer — slow, error-prone, and easy to lose context between jumps.

Observe injects trace_id and span_id into every log line automatically. In the log detail view you click "view trace" and jump straight to the full call chain for that log: every span's duration and status, upstream and downstream services, and associated logs, all expanded. Error line → full trace → the specific slow method call, connected within seconds.

The reverse direction matters just as much. When you're staring at a trace with a dozen spans and one of them shows a spike in latency, you need to know what that span was doing — and that means pulling up the logs it emitted. Observe makes spans carry their own logs, so a slow span answers its own question: click it and you see the SQL statements, the outbound HTTP calls, the stack traces. This two-way jump between logs and traces is what actually shortens MTTR; lose either direction and you're back to hand-grepping.

NL2Query: search without knowing how to search

For product managers or on-call engineers who query logs only occasionally, even SQL-like syntax has a learning curve. Observe offers NL2Query: describe the problem in natural language and the system translates it into a query.

Type "error logs for the order service in the last hour, newest first" and Observe generates the SQL above and returns results. Crucially, the generated SQL is shown to the user, so they can tweak it — learning by doing until they write queries by hand. This matters most on-call: the person paged at 2am is often not the most fluent with queries, and NL2Query lets them see the problem first, then gradually learn how to query it themselves.

A useful detail: NL2Query is conservative by design. When it isn't confident it understood a request, it asks a clarifying question instead of guessing — a confidently wrong query at 2am costs more than a quick clarification.

The payoff of unifying metrics, logs and traces

When three separate systems coexist, incidents force you to switch between three dashboards and re-enter filters three times, and context leaks away with every jump. Observe puts all three into one data model: see an error-rate spike on a metric chart, click through to the underlying error logs, then follow a log to its trace — all without switching tools or re-applying filters.

The benefit to the team is direct: shorter MTTR, smoother context handoff between on-call rotations, and fewer systems for new hires to learn before they're useful. For a small team, this is the troubleshooting experience that used to belong only to large companies, packaged as a turnkey product capability.