You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: docs/product/drains/index.mdx
+53-8Lines changed: 53 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,15 @@ sidebar_order: 75
4
4
description: Learn how to set up trace and log drains and forwarders to send data to Sentry.
5
5
---
6
6
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
8
8
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.
10
10
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.
12
12
13
+
<Alertlevel="info">
14
+
Error events are not currently supported through drains. To capture errors, use [Sentry SDKs](/product/explore/logs/getting-started/) instead.
15
+
</Alert>
13
16
## Forwarders
14
17
15
18
-[Vector](/product/drains/integration/vector/)
@@ -18,8 +21,50 @@ To send data to Sentry, we recommend using the Sentry SDKs. However we also supp
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
Copy file name to clipboardExpand all lines: docs/product/explore/logs/getting-started/index.mdx
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -322,8 +322,17 @@ If you don't see your platform listed above, please reach out to us on [GitHub](
322
322
323
323
## Log Drains
324
324
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/).
326
326
327
-
### Endpoints
327
+
### Supported Platform Integrations
328
328
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.
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.
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.
18
18
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:
-**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.
22
31
23
32
## Set up Logs
24
33
25
34
To get started with Logs, navigate to the [Getting Started](/product/explore/logs/getting-started/) page and select your SDK from the list.
26
35
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
+
27
38
## Viewing and Searching Logs
28
39
29
40
**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/).
31
42
32
43

33
44
34
45
**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.
36
47
37
48

38
49
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
+
39
64
40
65
**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.
42
67
43
68

44
69
@@ -49,15 +74,15 @@ You can also enable auto refreshing of the logs view to see your latest logs as
49
74
50
75
Conditions in which auto-refresh is disabled:
51
76
52
-
- Auto-refresh is only supported when sorting bytime in descending order.
53
-
- Auto-refresh is onlysupported 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 afilter to reduce the number of logs.
77
+
- Auto-refresh is only supported when sorting bytime in descending order.
78
+
- Auto-refresh is onlysupported 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.
55
80
- Auto-refresh will be disabled due to reaching a max auto-refresh time of 10 minutes.
56
81
- Auto-refresh will be disabled if there is an error fetching logs.
57
-
- Auto-refresh is notavailable in the aggregates view.
82
+
- Auto-refresh is notavailable in the aggregates view.
58
83
59
84
### 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.
61
86
- Auto-refresh will be disabled.
62
87
- Data shown in the chart will be extrapolated from a sampled amount of the complete dataset.
63
88
@@ -67,10 +92,31 @@ When the number of logs returned by a query is too high, there are a couple of c
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
70
116
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.
72
118
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/).
0 commit comments