Skip to content

Commit 431a9be

Browse files
KyleTryonCopilotsfanahata
authored
Docs/logs refresh kyle (#15595)
This pull request updates Sentry's documentation for logs and drains to provide clearer explanations, improved onboarding, and better guidance for users integrating platform-native logs and traces. The changes introduce new overview sections, clarify the benefits of trace-connected logs, and enhance instructions for setting up log drains across supported platforms. **Documentation improvements and onboarding clarity:** * Added a comprehensive overview of log and trace drains, including supported platforms, data types, setup prerequisites, and links to related documentation in `docs/product/drains/index.mdx`. This helps users understand when and how to use drains for platform-level telemetry. * Updated the logs getting started guide to describe log drains, list supported integrations, and clarify the use of OpenTelemetry endpoints for log forwarding. **Feature explanation and search enhancements:** * Expanded the logs overview to explain "trace-connected" logs—each log entry is linked to its trace, enabling seamless navigation from logs to traces and errors. Added practical examples for log search queries and clarified how to use custom attributes. * Added a new section describing the trace-connected debugging workflow, guiding users through searching logs, viewing traces, and identifying root causes in a unified flow. **Usability and search improvements:** * Improved explanations for auto-refresh and query volume conditions in the logs explorer, including links to filtering and search documentation for better discoverability. --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shannon Anahata <[email protected]>
1 parent 292469f commit 431a9be

File tree

3 files changed

+126
-26
lines changed

3 files changed

+126
-26
lines changed

docs/product/drains/index.mdx

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ sidebar_order: 75
44
description: Learn how to set up trace and log drains and forwarders to send data to Sentry.
55
---
66

7-
To send data to Sentry, we recommend using the Sentry SDKs. However we also support forwarding data to Sentry from platforms where you can't use the Sentry SDKs. At the moment we only support forwarding logs and traces data, error events are not supported yet.
7+
## Overview
88

9-
## Endpoints
9+
Log and trace drains allow you to forward logs and traces from your deployment platform's native logging and tracing systems directly into Sentry without modifying your application code. Drains capture platform-level telemetry—like build logs, runtime logs, and static asset logs—from deployment platforms such as Vercel, Cloudflare, Heroku, and Supabase.
1010

11-
- [OpenTelemetry (OTLP)](/concepts/otlp/)
11+
Drains are ideal when you want to capture platform-level observability from your hosting infrastructure or when you can't install Sentry SDKs directly in your application.
1212

13+
<Alert level="info">
14+
Error events are not currently supported through drains. To capture errors, use [Sentry SDKs](/product/explore/logs/getting-started/) instead.
15+
</Alert>
1316
## Forwarders
1417

1518
- [Vector](/product/drains/integration/vector/)
@@ -18,8 +21,50 @@ To send data to Sentry, we recommend using the Sentry SDKs. However we also supp
1821

1922
## Drains
2023

21-
- [Vercel](/product/drains/integration/vercel/)
22-
- [Cloudflare](/product/drains/integration/cloudflare/)
23-
- [Heroku](/product/drains/integration/heroku/)
24-
- [Supabase](/product/drains/integration/supabase/)
25-
- [Shopify Hydrogen](/product/drains/integration/shopify-hydrogen/)
24+
## Supported Platforms
25+
26+
| Platform | Logs | Traces | Documentation |
27+
|----------|------|--------|---------------|
28+
| [Vercel](/product/drains/integration/vercel/) ||| Forward runtime, build, and static logs, plus distributed traces |
29+
| [Cloudflare](/product/drains/integration/cloudflare/) ||| Forward logs and traces from Cloudflare Workers |
30+
| [Heroku](/product/drains/integration/heroku/) ||| Forward logs and traces via Heroku Telemetry Drains |
31+
| [Supabase](/product/drains/integration/supabase/) ||| Forward logs from your Supabase stack |
32+
| [Shopify Hydrogen](/product/drains/integration/shopify-hydrogen/) ||| Forward traces from Hydrogen storefronts |
33+
34+
## Supported Data Types
35+
36+
Drains support forwarding **logs** from most supported platforms, with some platforms supporting **traces** as well:
37+
38+
- **Logs**: Application logs, runtime logs, build logs, and system-generated logs from your platform
39+
- **Traces**: Distributed tracing data showing request flows through your application and connected services (supported on Vercel, Cloudflare, Heroku, and Shopify Hydrogen)
40+
41+
## How Drains Work
42+
43+
Drains work by configuring your deployment platform's native telemetry export system to forward data to Sentry's ingestion endpoints. Most platforms support forwarding data via:
44+
45+
- [**OpenTelemetry Protocol (OTLP)**](https://opentelemetry.io/docs/): The standard protocol for forwarding logs and traces
46+
- **Platform-specific endpoints**: Custom endpoints provided by Sentry for specific platforms (like Vercel's custom drain endpoint). Follow the [platform-specific link](/product/drains/#supported-platforms) to learn more.
47+
48+
Once configured, your platform automatically forwards logs and traces (where supported) to Sentry, where you can view, search, and analyze them alongside data from your Sentry SDKs.
49+
50+
## Prerequisites
51+
52+
Before setting up a drain, ensure you have:
53+
54+
1. **A Sentry project**: Create a project in Sentry if you don't have one already
55+
2. **Your project credentials**: You'll need your Sentry project's OTLP endpoint URL and public key, which can be found in your [Sentry Project Settings](https://sentry.io/settings/projects/) under **Client Keys (DSN)** > **OpenTelemetry (OTLP)**
56+
3. **Platform access**: Admin or configuration access to your platform's telemetry settings
57+
58+
## Getting Started
59+
60+
1. Choose your platform from the [Supported Platforms](#supported-platforms) table above and follow the platform-specific setup guide
61+
2. Configure the drain in your platform's dashboard or via CLI using your Sentry project credentials (found in your [Sentry Project Settings](https://sentry.io/settings/projects/) under **Client Keys (DSN)** > **OpenTelemetry (OTLP)**)
62+
3. Verify data is flowing by checking your Sentry project's [Logs](/product/explore/logs/) or [Performance](/product/performance/) views
63+
64+
Most drains use Sentry's [OpenTelemetry Protocol (OTLP)](/concepts/otlp/) endpoints. Some platforms, like Vercel, also support custom endpoints. You can find your OTLP endpoint URLs and authentication headers in your project settings.
65+
66+
## Related Documentation
67+
68+
- [Logs Overview](/product/explore/logs/): Learn how to view, search, and analyze logs in Sentry
69+
- [Performance Monitoring](/product/performance/): Understand distributed tracing and performance data
70+
- [OpenTelemetry Protocol](/concepts/otlp/): Learn more about OTLP and how to configure OpenTelemetry SDKs

docs/product/explore/logs/getting-started/index.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,17 @@ If you don't see your platform listed above, please reach out to us on [GitHub](
322322

323323
## Log Drains
324324

325-
Sentry supports connecting to log drains or sinks to ingest logs. We are actively working on adding support for more platforms, which we are tracking in [this GitHub issue](https://github.com/getsentry/sentry/issues/91726).
325+
Log drains allow you to forward logs from platforms like Vercel, Cloudflare, Heroku, and Supabase directly to Sentry without modifying your application code. Learn more about [log and trace drains](/product/drains/).
326326

327-
### Endpoints
327+
### Supported Platform Integrations
328328

329-
You can send logs to Sentry via [Sentry's OpenTelemetry (OTLP) Logs endpoint](/concepts/otlp/#opentelemetry-logs). This can be used with any OpenTelemetry SDK, or with the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) to send logs to Sentry.
329+
- **[Vercel](/product/drains/integration/vercel/)**: Forward runtime, build, and static logs from Vercel deployments
330+
- **[Cloudflare](/product/drains/integration/cloudflare/)**: Forward logs from Cloudflare Workers
331+
- **[Heroku](/product/drains/integration/heroku/)**: Forward logs from Heroku apps using telemetry drains
332+
- **[Supabase](/product/drains/integration/supabase/)**: Forward logs from your Supabase stack
333+
334+
We are actively working on adding support for more platforms, which we are tracking in [this GitHub issue](https://github.com/getsentry/sentry/issues/91726).
335+
336+
### OpenTelemetry (OTLP) Endpoint
337+
338+
You can also send logs to Sentry via [Sentry's OpenTelemetry (OTLP) Logs endpoint](/concepts/otlp/#opentelemetry-logs). This can be used with any OpenTelemetry SDK, or with the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) to send logs to Sentry. This is useful if you're already using OpenTelemetry instrumentation or want to route logs through an OTLP collector.

docs/product/explore/logs/index.mdx

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,60 @@ og_image: /og-images/product-explore-logs.png
1010

1111
## Overview
1212

13-
With Structured Logs, users can send text-based log information from their applications, whether frontend or backend, to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual parameters.
13+
With Structured Logs, you can send text-based log information from your applications, whether frontend or backend, to Sentry.
1414

1515
<Arcade src="https://demo.arcade.software/PalOCHofpcO3DqvA4Rzr?embed" />
1616

17-
Not everything that you want to track in your application generates an error event. You might want to arbitrarily track information happening in your application for many reasons, such as:
17+
Sentry's structured logs are searchable, **trace-connected**, and viewable alongside your errors.
1818

19-
- Debugging information like navigation actions, page interactions, or query results
20-
- User specific events
21-
- Configuration items that users or an application are receiving
19+
**What does trace-connected mean?** Every log entry is automatically linked to the active trace when it was recorded. This means you can click directly from any log entry to see the full trace waterfall, including all related spans, errors, and other logs from the same request. This connection makes it easy to understand the complete context of what happened—not just what was logged, but the entire execution path that led to that log entry.
20+
21+
When investigating an issue, you can search your logs by message content or attributes, then click into any log entry to see the exact trace, spans, and errors that occurred at that moment. Learn more about [Trace View](/concepts/key-terms/tracing/trace-view/) to understand how to navigate from logs to traces.
22+
23+
Not everything in your application generates an error or requires full tracing. Logs are perfect for tracking:
24+
25+
- **Debugging information**: Cache misses, database connections, query results, and performance metrics
26+
- **User behavior**: Login events, checkout flows, feature usage, and preference changes
27+
- **Application state**: Configuration loading, service initialization, and connection status
28+
- **Business events**: Order placements, payment processing, and notification delivery
29+
30+
Learn how to [send structured logs](/product/explore/logs/getting-started/) with custom attributes that you can search and filter in Sentry.
2231

2332
## Set up Logs
2433

2534
To get started with Logs, navigate to the [Getting Started](/product/explore/logs/getting-started/) page and select your SDK from the list.
2635

36+
If you're using a platform where you can't install the Sentry SDK directly, or if you want to forward logs from platform-native logging systems, you can use [log drains](/product/drains/) to send logs to Sentry.
37+
2738
## Viewing and Searching Logs
2839

2940
**Raw Text Search**
30-
Raw text search is case sensitive and allows you to search for specific strings within the *message* attribute of the Log. **Raw text search over the entire log's JSON is not supported.**
41+
Raw text search is case sensitive and allows you to search for specific strings within the *message* attribute of the Log. **Raw text search over the entire log's JSON is not supported.** Learn more about [search syntax](/concepts/search/).
3142

3243
![Raw Text Logs Search](./img/LogSearchRawText.png)
3344

3445
**Default Properties Search**
35-
You can also search using the default properties (like `severity`) or additional custom properties that you've added to your log entries.
46+
You can also search using the default properties (like `severity`) or [additional custom properties](/concepts/search/searchable-properties/) that you've added to your log entries.
3647

3748
![Property Logs Search](./img/LogSearchTags.png)
3849

50+
**Search Examples**
51+
Here are some practical examples of log searches you can use:
52+
53+
- `severity:error` - Find all error-level logs
54+
- `severity:error payment.failed` - Find error logs containing "payment.failed" in the message
55+
- `user.id:12345` - Find all logs for a specific user
56+
- `trace_id:abc123def456` - Find all logs associated with a specific trace
57+
- `severity:error environment:production` - Find production errors
58+
- `order.id:order_123` - Find logs related to a specific order
59+
- `severity:warn OR severity:error` - Find warnings or errors
60+
- `database:"users" query.duration_ms:>1000` - Find slow database queries on the users database
61+
62+
Learn more about [search syntax](/concepts/search/) for advanced querying.
63+
3964

4065
**Expand Logs**
41-
Log entries can be expanded to view all properties of logs entry. Individual properties can be added as columns to the results view, allowing you to quickly view properties that matter specifically to you alongside your search results.
66+
Log entries can be expanded to view all properties of a log entry. Individual properties can be added as columns to the results view, allowing you to quickly view properties that matter specifically to you alongside your search results.
4267

4368
![Expanded Logs View](./img/LogsExpanded.png)
4469

@@ -49,15 +74,15 @@ You can also enable auto refreshing of the logs view to see your latest logs as
4974

5075
Conditions in which auto-refresh is disabled:
5176

52-
- Auto-refresh is only supported when sorting by time in descending order.
53-
- Auto-refresh is only supported when using a relative time period, like "Last 15 minutes" or "Last 7 days", not absolute dates like "2025-07-23".
54-
- Auto-refresh is disabled due to high data volume (100 logs per second). Try adding a filter to reduce the number of logs.
77+
- Auto-refresh is only supported when sorting by time in descending order.
78+
- Auto-refresh is only supported when using a relative time period, like "Last 15 minutes" or "Last 7 days", not absolute dates like "2025-07-23".
79+
- Auto-refresh is disabled due to high data volume (100 logs per second). Try adding a [filter](/concepts/data-management/filtering/#logs-filtering) to reduce the number of logs.
5580
- Auto-refresh will be disabled due to reaching a max auto-refresh time of 10 minutes.
5681
- Auto-refresh will be disabled if there is an error fetching logs.
57-
- Auto-refresh is not available in the aggregates view.
82+
- Auto-refresh is not available in the aggregates view.
5883

5984
### Query Volumes
60-
When the number of logs returned by a query is too high, there are a couple of changes to explorer functionality.
85+
When the number of logs returned by a query is too high, there are a couple of changes to the logs explorer functionality. To reduce query volumes, consider [filtering logs](/concepts/data-management/filtering/#logs-filtering) or refining your [search query](/concepts/search/) with more specific criteria.
6186
- Auto-refresh will be disabled.
6287
- Data shown in the chart will be extrapolated from a sampled amount of the complete dataset.
6388

@@ -67,10 +92,31 @@ When the number of logs returned by a query is too high, there are a couple of c
6792

6893
![Continue scanning message =1000x](./img/ContinueScanning.png)
6994

95+
## Trace-Connected Debugging Flow
96+
97+
Sentry's trace-connected logs enable a seamless debugging workflow that connects logs, traces, and errors:
98+
99+
1. **Search your logs**: Start by searching for logs related to the issue you're investigating. Use message content, attributes, or filters to narrow down relevant log entries.
100+
101+
2. **Click into a log**: When you find a log entry that looks suspicious or relevant, click on it to open the log details.
102+
103+
3. **Navigate to the trace**: From the log details, click the trace link to open the full [Trace View](/concepts/key-terms/tracing/trace-view/). This shows you the complete execution path, including all spans, operations, and timing information.
104+
105+
4. **Examine related data**: In the trace view, you can see:
106+
- **Related errors**: Any errors that occurred during the same trace
107+
- **Other logs**: Additional log entries from the same request
108+
- **Performance data**: Slow spans, database queries, and API calls
109+
- **User context**: User information and session data
110+
111+
5. **Find the root cause**: With full context in hand—logs, traces, spans, and errors all connected—you can quickly identify and resolve the root cause.
112+
113+
Instead of jumping between different tools and trying to correlate timestamps, trace-connected logs give you a **single flow**: Log search → log entry → trace → root cause.
114+
115+
## Log-based Alerts and Dashboard widgets
70116

71-
## Log based Alerts and Dashboard widgets
117+
You can create [Alert rules](/product/alerts/create-alerts/) and [dashboard widgets](/product/dashboards/widget-builder/) based on your log queries.
72118

73-
You can create Alert rules and dashboard widgets based on your log queries.
119+
Learn more about [alert types](/product/alerts/alert-types/) and [custom dashboards](/product/dashboards/custom-dashboards/).
74120

75121
![Log Queries](./img/LogQueries.png)
76122

0 commit comments

Comments
 (0)