Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Monium
  • Getting started
  • Overview
    • Getting started
    • Basic terms
      • Searching for traces and spans
      • Viewing and analyzing traces
      • Query language
      • Critical path analysis
      • Trace-to-log correlation
      • Trace archiving
      • Incomplete traces
    • Limitations
  • Access management
  • Pricing policy
  • Terraform reference
  • Release notes

In this article:

  • Syntax
  • Supported keys
  • System keys
  • Span attributes
  • Operators
  • String operators
  • Comparison operators
  • Duration operators
  • Special selectors
  • Query examples
  1. Traces
  2. Working with traces
  3. Query language

Query language

Written by
Yandex Cloud
Updated at March 24, 2026
  • Syntax
  • Supported keys
    • System keys
    • Span attributes
  • Operators
    • String operators
    • Comparison operators
    • Duration operators
    • Special selectors
  • Query examples

The Monium Traces query language allows you to filter traces and spans by attributes. Queries should be entered into the search bar on the Searching for traces and spans page. The interface supports autocompletion: start typing the attribute's name and the system will suggest the available options. Then start typing the value, and autocompletion will work for it too.

SyntaxSyntax

A query consists of key-value pairs enclosed in curly braces:

{ key="value", key="value", ... }

Conditions inside a query are joined using the AND logic, i.e., the result must satisfy all conditions at the same time.

Here is an example:

{ project="folder__b1g86q4m5vej********", service="api-gateway", span.duration>=1s }

This query will return traces (or spans) which, at the same time:

  • Belong to the folder__b1g86q4m5vej******** project.
  • Belong to api-gateway.
  • Contain at least one span of one second or longer.

Supported keysSupported keys

System keysSystem keys

  • project: Project (folder) name. This is a required key.
  • cluster: Environment, e.g., production or staging.
  • service: Service or application name.

Span attributesSpan attributes

In addition to system keys, you can search by span attributes. Some attributes are standard:

  • span.name: Span name.
  • span.kind: Span type, i.e., server, client, producer, consumer, or internal.
  • span.status: Span status, i.e., OK, ERROR, or UNSET.
  • span.duration: Span duration.

You can also search by any attributes that were added during instrumentation. Attributes are specified directly by name:

{ project="folder__b1g86q4m5vej********", http.method="GET", http.status_code=200 }

OperatorsOperators

String operatorsString operators

Operator

Description

Example

=

Exact match or glob template.

service="api-*": Services starting with api-

!=

Not equal to (supports glob).

service!="test-*": All services except those starting with test-

==

Exact match without glob

span.name=="GET /users": Exact match only

!==

Not equal to (without glob)

span.name!=="GET /users"

=~

Regular expression (re2)

span.name=~"GET /users/[0-9]+"

!~

Does not match regular expression

span.name!~"POST.*"

Comparison operatorsComparison operators

For numeric values and duration:

Operator

Description

Example

>

Greater than

span.duration>500ms

>=

Greater than or equal to

span.duration>=1s

<

Less than

span.duration<100ms

<=

Less than or equal to

span.duration<=2s

Duration operatorsDuration operators

The duration is specified with units of measurement:

  • ms, milliseconds
  • s, seconds
  • m, minutes
  • h, hours

Here are some examples:

{ span.duration>=500ms }
{ span.duration<2s }
{ span.duration>=1m }

Special selectorsSpecial selectors

Selector

Description

Example

*

Any value (attribute is present)

http.method="*": All spans with the http.method attribute

-

No attribute

http.method="-": Spans without the http.method attribute

\|

One out of several values (OR)

span.kind="client\|server": Spans of the client or server type.

Query examplesQuery examples

Finding traces from api-gateway:

{ project="folder__b1g86q4m5vej********", service="api-gateway" }

Finding traces from the production environment, except for test services:

{ project="folder__b1g86q4m5vej********", cluster="production", service!="test-*" }

Finding spans with the ERROR status:

{ project="folder__b1g86q4m5vej********", span.status="ERROR" }

Finding slow HTTP queries to a specific endpoint:

{ project="folder__b1g86q4m5vej********", service="api-gateway", http.route="/users/:id", span.duration>=500ms }

Finding errors in database queries:

{ project="folder__b1g86q4m5vej********", db.system="postgresql", span.status="ERROR" }

Finding client and server spans:

{ project="folder__b1g86q4m5vej********", span.kind="client|server" }

Finding spans with retries:

{ project="folder__b1g86q4m5vej********", http.resend_count="*" }

Was the article helpful?

Previous
Viewing and analyzing traces
Next
Critical path analysis
© 2026 Direct Cursus Technology L.L.C.