Query language: one way to ask logs, metrics and traces

Build queries across services, traces, logs, metrics and web events, or write PromQL, see the generated SQL, and turn the answer into a dashboard panel or a check rule.

Query builder across services, tracing, logging, metrics, web events and PromQL
Metrics explorer with type, unit, data points and cardinality
Security search with keywords, field=value filters and plain-language questions
Data sources
Services, tracing, logging, metrics, web events
Metrics syntax
PromQL
Transparency
Generated SQL visible at any time
Next step
Add to dashboard or create a check rule
Product tour

How your team works with Query language

From the query builder to metrics, logs, security events and the alert: these views come straight from the Obseria app. Pick an area or let the tour run on its own.
01 / 05

One builder for every signal

Pick a data source, a metric, filters and a grouping; add more queries to the chart and open the generated SQL whenever you like.

  • PromQL tab for metrics
  • Add to dashboard
  • Create a check rule
One builder for every signal
02 / 05

Every metric with type, unit and cardinality

The metrics explorer lists all metrics, grouped or flat, with data points, cardinality, resources and last value, plus a tree map.

  • Filter by name or description
  • Tree map by data points or cardinality
  • Last value and last seen
Learn more
Every metric with type, unit and cardinality
03 / 05

Facets and free text for logs

The log explorer filters by status, service, environment, source and host and shows the volume by level above the results.

  • Facets with match counts
  • Pattern view
  • Live mode
Facets and free text for logs
04 / 05

Search every security event

All words must match, field=value filters an attribute, and a second field takes a question in plain language.

  • Time ranges from 1 h to 30 d
  • Event count over time
  • Ask in plain language
Learn more
Search every security event
05 / 05

A good query becomes a panel

Queries added from the builder appear as panels next to the others, with time ranges, auto-refresh and templates for common technologies.

  • Time range 15 min to 30 d
  • Auto-refresh
  • Edit as JSON
Learn more
A good query becomes a panel
Capabilities

Answer the questions no dashboard planned for

One query model across signals, visible SQL, PromQL for metrics and a direct path from a query to a panel or an alert.
Query language

Query language

One query language across logs, metrics, traces and events at the same time.

Metrics

Metrics

Collects time series from applications and infrastructure and makes them queryable and comparable.

Learn more →
Dashboards

Dashboards

Freely designed overviews built from charts, KPIs and tables.

Learn more →
Log management

Log management

Collects, searches and filters logs from all services in one place.

  • Alerting
How it works

From a question to a reusable answer

Five steps of a typical ad-hoc analysis, for example during an incident.
    • Services · Tracing · Logging
    • Metrics · Web Events
    • PromQL
    01

    Pick the source

    Choose services, tracing, logging, metrics or web events, or switch to PromQL for metrics.

  1. Example query
    02

    Measure & filter

    Select a metric such as average duration, add filters and group by a dimension like the service.

  2. checkout-api412 ms
    cart-api214 ms
    search-api139 ms
    p95 by service
    03

    Compare

    Add more queries to the same chart, label lines with placeholders and set thresholds, sorting and limits.

  3. Spike found · SQL checked
    04

    Check the query

    Open the generated SQL to see exactly what is being asked, and adjust the time range.

  4. Rule
    checkout p95 above 400 msCreated from query · every 1 min
    Also on dashboard
    05

    Keep it

    Add the query to a dashboard, open it in another view or create a check rule so it runs around the clock.

In depth

How Query language works

Across signals

One query model for services, traces, logs, metrics and events

The query builder in Obseria works across all signals. Tabs for services, tracing, logging, metrics, web events and PromQL choose the data source; the rest of the query looks the same each time: a metric, filters and a grouping, evaluated over the time range you pick.

That means a developer who knows how to ask for average span duration per service can ask for the number of ERROR logs per service in the same way, without learning a second syntax. The knowledge of how to query is no longer tied to one signal or one expert.

Several queries can be shown in the same chart, which helps when you want to see errors and latency, or two services, side by side.

  • Services, tracing, logging, metrics, web events
  • Metric, filters and grouping
  • Several queries in one chart
  • Time range from minutes to 30 days
PromQL & SQL

Use PromQL you know, and see the SQL behind every query

For metrics, the query builder has a PromQL tab. Teams that come from Prometheus can use the queries and functions they already know on the metrics stored in Obseria.

Every query built in the builder can show its generated SQL. That makes the result explainable: you see which table, which filter and which aggregation produced the line in the chart, and experts can check that the question was asked the way they meant it.

Legend labels can use placeholders such as {{service_name}} to insert label values from the returned time series, so a chart with one line per service stays readable.

  • PromQL tab for metrics
  • Generated SQL visible
  • Legend placeholders like {{service_name}}
  • Chart type, thresholds, sorting and limits
From query to action

A question you asked once becomes a panel or an alert

Next to the run button, the query builder offers three ways forward. Add the query to a dashboard, so the answer stays visible for the team. Open it with another view for a closer look. Or create a check rule directly from the query, so the condition you were looking for is watched around the clock.

That closes the loop that ad-hoc analysis often leaves open: the clever query from the last incident does not disappear in someone's browser history, but becomes part of monitoring.

Check rules created this way behave like all others in Obseria: problems with severity and affected entity, delivered through your notification channels.

  • Add to dashboard
  • Open with another view
  • Create a check rule
  • Share the view
Search & explorers

The same idea in the log, metrics and security views

Not every question needs the query builder. The log explorer filters by facets such as status, service, environment and host and by free text. The metrics explorer lists every metric with type, unit, data points, cardinality, resources and last value, and a tree map shows where data points and cardinality come from.

The security search covers all security events: words must all match, and field=value filters restrict to an attribute, for example a host or a service. A second field accepts a question in plain language, such as failed logins for a user in the last day.

Together these views cover the usual path of an investigation: search for the first clue, query to measure it, and keep the result.

  • Log facets and free-text filter
  • Metrics explorer with cardinality
  • Security search with field=value
  • Questions in plain language
Integrations

Query data from the sources you already use

Telemetry from OpenTelemetry and the OTel Collector, metrics from Prometheus, and logs from shippers such as Fluentd, Vector and Logstash land in one place to query.
  • OpenTelemetry
  • OTel Collector
  • Prometheus
  • Fluentd
  • Vector
  • Logstash
  • Kubernetes
  • Docker
  • Linux
Guide

Observability query language explained

What a query language for observability is

An observability query language is the way you ask questions of your telemetry: how many errors did the checkout service log in the last hour, what is the p95 latency per endpoint, which hosts send the most data? Dashboards answer the questions someone thought of in advance. A query language answers the ones nobody thought of, which are usually the ones that matter during an incident.

Many tools have one language per signal: a search syntax for logs, PromQL for metrics, a different filter syntax for traces. That works, but every switch between signals means switching syntax, and the knowledge sits with a few experts. A single query model across logs, metrics, traces and events lowers that barrier.

The building blocks of a good query

Whatever the syntax, most observability queries are built from the same parts:

  • Data source: spans, logs, metrics, services or events such as page views.
  • Measure: a count, an average, a percentile such as p95, or a sum.
  • Filters: restrict to a service, an environment, a status code or a log level.
  • Grouping: split the result by a dimension, for example per service or per endpoint.
  • Time range and resolution: the last hour at one-minute steps, or the last 30 days per day.

Once you think in these parts, it no longer matters much whether the question is about logs or traces. That is the idea behind a unified query language.

Why ad-hoc analysis matters

Incidents rarely follow the script of a dashboard. A new release behaves differently on one browser, a customer reports slowness only for large orders, a single host sends twice as many logs as the others. Ad-hoc queries let you follow such leads in minutes instead of waiting for someone to build a new dashboard. The best queries are then kept: as a dashboard panel, as an alert rule or in a document that explains the incident.

Good practice for writing queries

  • Start broad, then filter. First look at the overall shape, then narrow down to the service or endpoint that stands out.
  • Prefer percentiles to averages. An average hides the slow tail that users notice; p95 or p99 shows it.
  • Group by one dimension at a time. Grouping by service and endpoint and region at once produces more lines than anyone can read.
  • Watch cardinality. Grouping by a user ID or a request ID creates thousands of series. Use such fields as filters, not as groups.
  • Name your queries. A query called "checkout p95 by endpoint" is easy to find and reuse.
  • Turn good queries into rules. If a question was worth asking during an incident, it is often worth an alert.

How to choose a query tool for observability data

Look at how many languages your team has to learn, whether non-experts can build a useful query without knowing the syntax, whether the underlying query is visible so experts can check it, whether existing PromQL knowledge can be reused, and how easily a query becomes a dashboard panel or an alert. A query that has to be copied by hand into another tool is a query that will not be maintained.

Typical questions, translated into queries

  • "Did the release make checkout slower?" Tracing, p95 duration, filtered on the checkout service, compared with the hours before the deployment.
  • "Which service logs the most errors?" Logging, count, filtered on level ERROR, grouped by service.
  • "Is one host running out of memory?" Metrics or PromQL, memory usage per host, sorted descending and limited to ten.
  • "Did fewer users reach the order page?" Web events, page views of that page over the last days.

Each of these starts from the same building blocks. Once a team has written a handful of such queries together, most new questions are variations of them.

How querying works in Obseria

In Obseria, the query builder in Obseria Log Analytics is the place for free analysis across signals. A query starts with a data source, chosen from tabs:

  • Services, Tracing, Logging, Metrics and Web Events with a metric such as average duration, filters and a grouping.
  • PromQL for metrics, so existing Prometheus knowledge can be used directly.

The result appears as a chart for the selected time range. Several queries can be added to the same chart, legend labels can use placeholders such as {{service_name}}, and options cover chart type, formatting, legend, sorting, thresholds and limits. The generated SQL can be shown at any time, so you can see exactly what is being asked.

From there, a query can be added to a dashboard, opened in another view or turned into a check rule with one click, so a question you asked once becomes an alert. Related views use the same idea: the log explorer filters by facets and free text, the metrics explorer lists every metric with type, unit, data points and cardinality, and the security search accepts words and field=value filters or a question in plain language.

FAQ

Questions about Query language

Answers on features, setup and what is not included yet.
Contact us

Query language FAQ

Services, traces, logs, metrics and web events in the query builder, and metrics with PromQL. The log explorer, the metrics explorer and the security search add filters, facets and free-text search for their data.

No. The query builder guides you through data source, metric, filters and grouping. For metrics, you can use PromQL. The generated SQL can be shown for every query, which helps when you want to understand exactly what is being asked.

The query builder has a PromQL tab for metrics stored in Obseria. Whether an existing query works one to one depends on the metric names and labels in your data, so test it after moving.

Yes, you can add several queries to the same chart, for example errors from logs and latency from traces, and label each line with placeholders such as {{service_name}}.

Yes. Create a check rule directly from the query builder. The rule then runs on its own interval and raises problems that reach your notification channels.

Yes. Add it to an existing dashboard from the query builder, where it appears as a panel next to the others.

The security search accepts a question in plain language next to its keyword and field=value search. In other areas, the AI agent in Obseria can help with questions about your data.

Obseria does not offer a separately named text query language with its own documentation, and the query builder shows generated SQL rather than accepting free SQL. Query languages of other vendors are not supported, with the exception of PromQL for metrics. Logs and spans can be exported as files or via API through the export function.

Contact

See Query language in action

In 30 minutes we show you how Obseria works in your environment and answer your questions on setup, privacy and pricing.

  • No obligation, free of charge
  • Usually answered within one business day
  • Data in the EU
Your contact
Your contactObseria team

* Required field. By submitting, you agree to the processing of your details as described in our Privacy Notice