Available in: v2.5.0+
View Log Aggregation Setup →
Overview
This guide provides platform-specific query examples for common log analysis tasks across all 6 supported platforms.AWS CloudWatch Insights
Query Language
CloudWatch Insights uses a SQL-like query language with piped commands.Common Queries
Find All Errors
Errors by User
Trace-Specific Logs
Slow Requests (Performance)
Error Rate Over Time
Top Error Messages
GCP Log Explorer
Query Language
GCP uses a custom query language with filters and boolean logic.Common Queries
Find All Errors
Trace-Specific Logs
Errors in Last Hour
Search by User ID
Authentication Failures
High Memory Usage
Azure Monitor (KQL)
Query Language
Azure uses Kusto Query Language (KQL), a powerful query language similar to SQL.Common Queries
Find All Errors
Errors by Service
Trace-Specific Logs
Request Duration Analysis
User Activity Timeline
Error Rate Trend
Elasticsearch (Kibana)
Query Language
Elasticsearch uses Query DSL (JSON-based) or KQL in Kibana.Common Queries
Find All Errors (Query DSL)
Trace-Specific Logs
Time Range + Level Filter
Aggregation: Errors by User
Kibana KQL (Discover Tab)
Trace-Specific Logs
Errors by Service
User-Specific Logs
Time Range + Error Filter
Authentication Failures
High Latency Requests
Errors with Stack Traces
Datadog Analytics
Error Count by User
P95 Request Duration
Error Rate Over Time
Splunk (SPL)
Query Language
Splunk uses Search Processing Language (SPL).Common Queries
Find All Errors
Trace-Specific Logs
Errors by User
Time Range + Level Filter
Error Rate Over Time
Top Error Messages
Request Duration Statistics
User Activity Timeline
Common Use Cases
1. Distributed Tracing
Find all logs for a specific request (across all platforms):- CloudWatch
- GCP
- Azure
- Elasticsearch
- Datadog
- Splunk
2. Error Investigation
Find errors and group by type:- CloudWatch
- GCP
- Azure
- Elasticsearch
- Datadog
- Splunk
3. Performance Analysis
Find slow requests (>1s):- CloudWatch
- GCP
- Azure
- Elasticsearch
- Datadog
- Splunk
4. Security Monitoring
Detect authentication failures:- CloudWatch
- GCP
- Azure
- Elasticsearch
- Datadog
- Splunk
Advanced Queries
Multi-Field Correlation
Find errors for specific user in specific time range:CloudWatch
Azure (KQL)
Datadog
Statistical Analysis
Calculate P95, P99 latency:CloudWatch
Azure (KQL)
Splunk
Best Practices
1. Use Structured Fields
Always query on structured fields (not text search on message):2. Limit Time Ranges
Always specify time ranges for better performance:3. Use Trace IDs
For request debugging, always use trace_id:4. Aggregate When Possible
Use aggregations instead of returning all results:5. Index Patterns
Ensure proper index patterns for fast queries:- Elasticsearch: Use index templates
- Splunk: Configure index-time field extraction
- Datadog: Define facets for frequently queried fields
Troubleshooting Queries
No Results Found
- Check time range - Logs might be outside selected window
- Verify field names - Use autocomplete or schema browser
- Check index/source - Ensure querying correct data source
- Validate syntax - Platform-specific syntax varies
Slow Queries
- Add time range - Limit data scanned
- Use indexed fields - Query on indexed fields only
- Avoid wildcards - Especially leading wildcards (
*error) - Reduce result size - Use
| heador| limit
Missing Fields
- Check JSON structure - Use
fields @messageto see all fields - Verify field mapping - Fields must be extracted/mapped correctly
- Check log format - Ensure JSON logging is enabled (
LOG_FORMAT=json)
Next Steps
- Log Aggregation Setup - Platform-specific setup guides
- Observability Guide - Complete observability setup
- Troubleshooting - Common issues and solutions