-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Getting started with Datadog search #32109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
66aa054
Add new getting started for search docs
estherk15 b526762
Edit the landing page
estherk15 334d32b
Add to left nav
estherk15 936a4b3
Final edits, add syntax examples
estherk15 be36086
Update content/en/getting_started/search/_index.md
estherk15 0b2569f
Add to getting started index
estherk15 6b97aa4
Update log example
estherk15 3a234e2
Apply suggestions from code review
estherk15 19af396
Add getting started guide to further reading
estherk15 3fb6e0d
Add getting started guide to further reading
estherk15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Getting Started with Search in Datadog | ||
description: Learn the fundamentals of searching and filtering across Datadog products | ||
further_reading: | ||
- link: "/getting_started/search/product_specific_reference" | ||
tag: "Documentation" | ||
text: "Product-Specific Search" | ||
--- | ||
|
||
## Overview | ||
|
||
Datadog provides powerful and flexible search capabilities across its products and features. This guide introduces the core concepts of search syntax in Datadog, helping you understand how to construct effective queries across Logs, Metrics, APM, and more. | ||
|
||
|
||
## Understanding Datadog search | ||
|
||
Datadog provides a unified way to query data across products using text-based search syntax. All data in Datadog can be explored and filtered through queries, but the syntax and behavior differ depending on the type of data you're working with. There are two primary query formats in Datadog: | ||
- **Metric-based queries**: Used in Metrics and Cloud Cost Management (CCM). | ||
- **Event-based queries**: Used across most other products, including Logs, APM, RUM, Events, and Security. | ||
|
||
Although both query types let you filter and analyze data, their syntax is not interchangeable. Each follows its own structure, operators, and supported functions designed for the type of data it handles. | ||
|
||
### Metric-Based Queries | ||
|
||
Metric-based queries are designed to retrieve and analyze numerical time series data. They rely on tags to filter metrics and often combine functions and arithmetic operations to calculate and visualize trends over time (for example, average latency, error rate, or cost over time). | ||
|
||
### Event-Based Queries | ||
|
||
Event-based queries are used in most Datadog products to explore individual records such as log entries, traces, or browser events. These queries typically support full-text search, faceted filtering, and boolean logic to help users find, group, and analyze relevant events. | ||
|
||
Compared to metric queries, event-based searches focus on discovering and filtering individual records rather than aggregating numerical values. They form the foundation for exploratory analysis—helping you identify patterns, troubleshoot issues, and drill into specific data before moving to metrics or dashboards for long-term trends. | ||
|
||
## Product-specific syntax | ||
|
||
Each Datadog product provides its own search syntax, tailored to the type of data it handles. The Product-Specific Search reference highlights the key capabilities and unique operators available in each product, such as log search facets, APM trace filters, or metric aggregation functions. These references help you understand where syntax differs across Datadog products. | ||
|
||
Learn more in [Product-Specific Search][1]. | ||
|
||
## Further reading | ||
|
||
{{< partial name="whats-next/whats-next.html" >}} | ||
|
||
[1]: /getting_started/search/product_specific_reference |
145 changes: 145 additions & 0 deletions
145
content/en/getting_started/search/product_specific_reference.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
title: Product-Specific Search | ||
description: Learn about search capabilities across different Datadog products | ||
further_reading: | ||
- link: "/getting_started/search/" | ||
tag: "Documentation" | ||
text: "Getting Started with Search" | ||
--- | ||
|
||
## Overview | ||
|
||
Each Datadog product offers unique search capabilities optimized for its use case. This page provides a comprehensive index of product-specific search syntax resources to help you find the right documentation for your needs. | ||
|
||
## Search syntax families | ||
|
||
There are two main families of search syntaxes across Datadog products: | ||
|
||
**Metrics-based syntax**: Used by Metrics and Cloud Cost Management for time-series data queries with tag-based filtering and aggregation. | ||
|
||
**Event-based syntax**: Used by Log Management and adopted by most other Datadog products including traces, RUM, CI/CD, and more. This syntax provides flexible faceted search with boolean operators and pattern matching. | ||
|
||
## Metrics | ||
|
||
Metrics use a specialized metrics-based syntax for filtering and aggregating time-series data. | ||
|
||
For more information, see [Advanced Filtering][1]. | ||
|
||
### Key capabilities | ||
* Tag-based filtering with boolean logic (`AND`, `OR`, `NOT`) or symbolic operators (`&&`, `||`, `!`) | ||
* Wildcard matching on metric names and tag values | ||
* Aggregation by multiple tag dimensions | ||
* Template variable filtering for dynamic dashboards | ||
* Metric namespace filtering for organized queries | ||
* **Case-sensitive matching** for metric names | ||
|
||
{{% collapse-content title="Syntax examples" level="h5" expanded=false %}} | ||
```text | ||
# Filter metrics by tag | ||
system.cpu.idle{host:prod-*} | ||
|
||
# Boolean operators for tag filtering | ||
avg:system.cpu.user{env:staging AND (availability-zone:us-east-1a OR availability-zone:us-east-1c)} by {availability-zone} | ||
|
||
# Combine multiple tag filters | ||
system.disk.used{env:production,datacenter:us-east-1} | ||
|
||
# Wildcard filtered query | ||
avg:system.disk.in_use{!device:/dev/loop*} by {device} | ||
|
||
# Wildcard matching on tags | ||
aws.ec2.cpuutilization{instance-type:t3.*} | ||
|
||
# Exclude specific tags | ||
system.mem.used{env:production AND NOT service:test} | ||
``` | ||
{{% /collapse-content %}} | ||
|
||
|
||
## Logs | ||
|
||
Log Management uses event-based search syntax, serving as the foundation for many other products' search capabilities. | ||
|
||
For a complete reference for log search operators, wildcards, facets, and advanced queries, see [Log Search Syntax][2]. | ||
|
||
### Key capabilities | ||
* Full-text search across log messages with wildcards and phrase matching | ||
* Structured faceted search on attributes (tags, custom fields, standard attributes) | ||
* Pattern detection and extraction using parsing patterns | ||
* Advanced boolean operators (AND, OR, NOT) and grouping | ||
* Range queries for numerical values and timestamps | ||
|
||
{{% collapse-content title="Syntax examples" level="h5" expanded=false %}} | ||
```text | ||
# Search for error messages containing "timeout" | ||
status:error "timeout" | ||
|
||
# Query HTTP errors with status codes 500-599 | ||
@http.status_code:[500 TO 599] | ||
|
||
# Combine multiple conditions | ||
service:web-api env:(production OR dev) AND @duration:>1000 | ||
|
||
# Wildcard search for specific services | ||
service:payment-* AND status:error | ||
|
||
# Exclude specific values | ||
env:production NOT service:background-worker | ||
``` | ||
{{% /collapse-content %}} | ||
|
||
## Traces | ||
|
||
APM and Distributed Tracing use event-based search syntax for querying spans and traces. | ||
|
||
To learn more about querying spans and traces with service, resource, and tag filters, see [Trace Query Syntax][3]. | ||
|
||
### Key capabilities | ||
* Query spans by service, operation, and resource name | ||
* Filter by trace-level and span-level tags | ||
* Search across distributed traces spanning multiple services | ||
* Duration-based queries for performance analysis | ||
* Error tracking with status codes and error messages | ||
|
||
{{% collapse-content title="Syntax examples" level="h5" expanded=false %}} | ||
```text | ||
# Find errors in a specific service | ||
service:payment-api status:error | ||
|
||
# Query by resource and HTTP method | ||
resource_name:"/api/v1/checkout" @http.method:POST | ||
|
||
# Search for slow traces | ||
service:web-api* @duration:>1s | ||
|
||
# Trace queries across service dependencies | ||
@span.parent.service:frontend service:backend | ||
|
||
# Filter by custom span tags | ||
service:database @db.statement:"SELECT *" @db.row_count:>1000 | ||
``` | ||
{{% /collapse-content %}} | ||
|
||
## Additional product-specific resources | ||
|
||
{{< whatsnext desc="Product-specific search syntax documentation for additional Datadog products:" >}} | ||
{{< nextlink href="/continuous_integration/explorer/search_syntax" >}}CI Visibility Explorer: Query pipelines, tests, and CI/CD events{{< /nextlink >}} | ||
{{< nextlink href="/continuous_delivery/explorer/search_syntax" >}}CD Visibility Explorer: Search and filter deployment events and executions{{< /nextlink >}} | ||
{{< nextlink href="/monitors/manage/search" >}}Monitor Search: Find and filter monitors by status, type, tags, and alert conditions{{< /nextlink >}} | ||
{{< nextlink href="/observability_pipelines/processors/filter" >}}Observability Pipelines Filter Processor: Query syntax for filtering pipeline data{{< /nextlink >}} | ||
{{< nextlink href="/product_analytics/analytics_explorer/search_syntax" >}}Product Analytics Explorer Search: Search user interactions and product analytics events{{< /nextlink >}} | ||
{{< nextlink href="/quality_gates/explorer/search_syntax" >}}Quality Gates Explorer Syntax: Query quality gate rules and evaluation results{{< /nextlink >}} | ||
{{< nextlink href="/real_user_monitoring/explorer/search_syntax" >}}RUM Explorer Search: Search user sessions, views, actions, and errors{{< /nextlink >}} | ||
{{< nextlink href="/security/sensitive_data_scanner/scanning_rules/custom_rules" >}}Sensitive Data Scanner Custom Rules: Regex patterns and matching syntax for scanning sensitive data{{< /nextlink >}} | ||
{{< nextlink href="/service_management/events/explorer/searching" >}}Service Management Events Search: Query and filter service management events{{< /nextlink >}} | ||
{{< nextlink href="/logs/workspaces/sql_reference" >}}SQL Reference for Logs: SQL syntax for advanced log analysis in Workspaces{{< /nextlink >}} | ||
{{< nextlink href="/tests/explorer/search_syntax" >}}Test Optimization Explorer Search Syntax: Search and analyze test execution data{{< /nextlink >}} | ||
{{< /whatsnext >}} | ||
|
||
## Further reading | ||
|
||
{{< partial name="whats-next/whats-next.html" >}} | ||
|
||
[1]: /metrics/advanced-filtering | ||
[2]: /logs/explorer/search_syntax | ||
[3]: /tracing/trace_explorer/query_syntax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.