SigNoz
Docs
PricingCustomers
Get Started - Free
Docs
IntroductionContributingMigrate from DatadogSigNoz API
OpenTelemetry
What is OpenTelemetryOpenTelemetry Collector GuideOpenTelemetry Demo
Community
Support
Slack
X
Launch Week
Changelog
Dashboard Templates
DevOps Wordle
Newsletter
KubeCon, Atlanta 2025
More
SigNoz vs DatadogSigNoz vs New RelicSigNoz vs GrafanaSigNoz vs Dynatrace
Careers
AboutTermsPrivacySecurity & Compliance
SigNoz Logo
SigNoz
All systems operational
HIPAASOC-2
SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

Functions Reference Guide

This guide covers functions available for querying array fields in SigNoz.

Functions are currently supported only for JSON body searches.

Available Functions

hasToken() Function

Check if a token is present in a string.

The search term must be a single token—meaning a sequence of alphanumeric characters (A-Z, a-z, 0-9) that appears in the text separated by spaces, punctuation, or at the start/end of the string. hasToken will only match the term as a whole word, not as a substring inside another word (e.g., matches uuid123 but not abcuuid123xyz)

Syntax:

has(field, value)

Examples:

has(body, "john@test.com")
has(body, "e8ff7fe2-6f6a-4795-bd7f-d07f8e49d764")

has() Function

Checks if an array contains a specific value.

Syntax:

has(field, value)

Examples:

has(body.user_ids, 123)
has(body.tags, 'production')
has(body.regions, 'us-east')

Important Notes

  1. Body fields only - Functions currently work only with JSON body fields (fields prefixed with body.) except for the hasToken function.
  2. Array data - The field must contain an array for these functions to work properly

Combining with Other Conditions

Functions can be combined with other query conditions:

# Find production logs with error status codes
has(body.tags, 'production') AND status_code IN [500, 502, 503]

Common Use Cases

Filtering by Tags

# Find all logs with production tag
has(body.tags, 'production')

## Error Messages

Common errors you might encounter:

- **"unknown function"** - Check function name spelling and case
- **"function expects key and value parameters"** - Ensure you're providing both field and value
- **"function supports only body JSON search"** - Use only with `body.` prefixed fields

Last updated: May 18, 2026

Edit on GitHub

Was this page helpful?

Your response helps us improve this page.

Prev
Operators Reference
Next
Field Context & Data Types
On this page
Available Functions
hasToken() Function
has() Function
Important Notes
Combining with Other Conditions
Common Use Cases
Filtering by Tags
Find all logs with production tag
Error Messages

Is this page helpful?

Your response helps us improve this page.