OpsCanary
observabilitygrafanaPractitioner

Speed Up Log Analysis with Full-Text Search in Grafana Cloud Logs

5 min read Grafana BlogNov 17, 2026Reviewed for accuracy
Share
Practitioner — Hands-on experience recommended

In today's fast-paced tech environment, the ability to quickly locate relevant log lines is crucial. Full-text search in Grafana Cloud Logs addresses this need by adding a purpose-built secondary index to Loki. This allows you to search through weeks of logs without performing a full scan, drastically reducing the time it takes to find the information you need.

The mechanism behind this is straightforward yet powerful. The secondary index informs Loki about which data might contain a specific string. As a result, Loki only reads the relevant data, skipping over the rest. This efficiency is a game changer when you're dealing with large volumes of logs. You can use LogQL to execute searches like {service="payments"} |= "txn-123456" to quickly filter logs based on specific criteria.

In production, you should be aware of some important considerations. While full-text search is generally available at no extra cost, you still need to be cautious about label cardinality. Avoid including whole or partial IDs in labels to prevent high cardinality issues. Additionally, some advanced regex constructions are not supported, so familiarize yourself with the limitations of the full-text search feature to avoid pitfalls.

Key takeaways

  • →Leverage the secondary index to find specific log lines in seconds.
  • →Use LogQL for efficient queries, such as `{service="api"} |~ "(?i)webhook signature mismatch"`.
  • →Avoid high cardinality by not including whole or partial IDs in labels.
  • →Familiarize yourself with regex limitations in full-text search.
  • →Utilize full-text search at no additional cost if you're already using Grafana Cloud Logs.

Why it matters

In production, faster log searches mean quicker troubleshooting and reduced downtime. This can significantly enhance your team's efficiency and responsiveness to incidents.

Code examples

LogQL
{service="payments"} |= "txn-123456"
LogQL
{service="api"} |~ "(?i)webhook signature mismatch"
LogQL
{service="api"} |= "txn-123456" |~ "(?i)webhook signature mismatch"

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
DigitalOcean Serverless InferenceSponsor

OpenAI & Anthropic-compatible inference API — no GPU provisioning needed. 55+ models, pay-per-token with no minimums. VPC + zero data retention by default.

Try Serverless Inference →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.