Skip to content

Commit d5f105f

Browse files
authored
feat: Add docs for fluentbit and otel collector (#15623)
Similar to #15622 add docs for: fluentbit: https://fluentbit.io/ otel collector: https://opentelemetry.io/docs/collector/ the collector is already documented in the OTLP concepts page, but it's nice to have it standalone in it's own page here as well.
1 parent 2ac60c3 commit d5f105f

File tree

9 files changed

+543
-44
lines changed

9 files changed

+543
-44
lines changed

docs/product/drains/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ To send data to Sentry, we recommend using the Sentry SDKs. However we also supp
1313
## Forwarders
1414

1515
- [Vector](/product/drains/integration/vector/)
16+
- [OpenTelemetry Collector](/product/drains/integration/opentelemetry-collector/)
17+
- [Fluent Bit](/product/drains/integration/fluentbit/)
1618

1719
## Drains
1820

docs/product/drains/integration/cloudflare.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_order: 40
44
description: Learn how to set up Cloudflare Workers Observability to forward logs and traces data to Sentry.
55
---
66

7-
Cloudflare Workers supports [exporting OpenTelemetry (OTEL)-compliant](https://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/) to send logs and traces to Sentry.
7+
Cloudflare Workers supports [exporting OpenTelemetry (OTEL)-compliant data](https://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/) to send logs and traces to Sentry.
88

99
- Logs: Application logs including `console.log()` output and system-generated logs
1010
- Traces: Traces showing request flows through your Worker and connected services
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: Fluent Bit
3+
sidebar_order: 30
4+
description: Learn how to set up Fluent Bit's OpenTelemetry output plugin to forward logs and traces data to Sentry.
5+
---
6+
7+
[Fluent Bit](https://fluentbit.io/) supports [exporting OpenTelemetry (OTEL)-compliant](https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry) data to send logs and traces to Sentry.
8+
9+
## Prerequisites
10+
11+
Before you begin, ensure you have:
12+
13+
- Fluent Bit installed and running
14+
- A Sentry project you want to send data to
15+
16+
## Step 1: Get Your Sentry OTLP Credentials
17+
18+
You'll need your Sentry OTLP endpoint and authentication header. These can be found in your [Sentry Project Settings](https://sentry.io/settings/projects/) under **Client Keys (DSN)** > **OpenTelemetry (OTLP)**.
19+
20+
### Logs Endpoint
21+
22+
```bash
23+
___OTLP_LOGS_URL___
24+
```
25+
26+
### Traces Endpoint
27+
28+
```bash
29+
___OTLP_TRACES_URL___
30+
```
31+
32+
### Authentication Header
33+
34+
```
35+
x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
36+
```
37+
38+
## Step 2: Configure Fluent Bit
39+
40+
Add the OpenTelemetry output plugin to your Fluent Bit configuration to forward data to Sentry.
41+
42+
### Logs Configuration
43+
44+
To forward logs to Sentry, add the following output configuration:
45+
46+
```yaml {filename:fluent-bit.yaml}
47+
pipeline:
48+
outputs:
49+
- name: opentelemetry
50+
match: "*"
51+
host: ___ORG_INGEST_DOMAIN___
52+
port: 443
53+
logs_uri: /api/___PROJECT_ID___/integration/otlp/v1/logs
54+
tls: on
55+
tls.verify: on
56+
header:
57+
- x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
58+
```
59+
60+
```text {filename:fluent-bit.conf}
61+
[OUTPUT]
62+
Name opentelemetry
63+
Match *
64+
Host ___ORG_INGEST_DOMAIN___
65+
Port 443
66+
Logs_uri /api/___PROJECT_ID___/integration/otlp/v1/logs
67+
Tls On
68+
Tls.verify On
69+
Header x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
70+
```
71+
72+
### Traces Configuration
73+
74+
To forward traces to Sentry, add the following output configuration:
75+
76+
```yaml {filename:fluent-bit.yaml}
77+
pipeline:
78+
outputs:
79+
- name: opentelemetry
80+
match: "*"
81+
host: ___ORG_INGEST_DOMAIN___
82+
port: 443
83+
traces_uri: /api/___PROJECT_ID___/integration/otlp/v1/traces
84+
tls: on
85+
tls.verify: on
86+
header:
87+
- x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
88+
```
89+
90+
```text {filename:fluent-bit.conf}
91+
[OUTPUT]
92+
Name opentelemetry
93+
Match *
94+
Host ___ORG_INGEST_DOMAIN___
95+
Port 443
96+
Traces_uri /api/___PROJECT_ID___/integration/otlp/v1/traces
97+
Tls On
98+
Tls.verify On
99+
Header x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
100+
```
101+
102+
### Combined Logs and Traces Configuration
103+
104+
To send both logs and traces to Sentry, include both `logs_uri` and `traces_uri` in the output configuration:
105+
106+
```yaml {filename:fluent-bit.yaml}
107+
pipeline:
108+
outputs:
109+
- name: opentelemetry
110+
match: "*"
111+
host: ___ORG_INGEST_DOMAIN___
112+
port: 443
113+
logs_uri: /api/___PROJECT_ID___/integration/otlp/v1/logs
114+
traces_uri: /api/___PROJECT_ID___/integration/otlp/v1/traces
115+
tls: on
116+
tls.verify: on
117+
header:
118+
- x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
119+
```
120+
121+
```text {filename:fluent-bit.conf}
122+
[OUTPUT]
123+
Name opentelemetry
124+
Match *
125+
Host ___ORG_INGEST_DOMAIN___
126+
Port 443
127+
Logs_uri /api/___PROJECT_ID___/integration/otlp/v1/logs
128+
Traces_uri /api/___PROJECT_ID___/integration/otlp/v1/traces
129+
Tls On
130+
Tls.verify On
131+
Header x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
132+
```
133+
134+
## Optional Configuration
135+
136+
Fluent Bit's OpenTelemetry output plugin supports additional options for fine-tuning your setup:
137+
138+
| Option | Description | Default |
139+
| ---------------------- | ------------------------------------------------ | ------- |
140+
| `batch_size` | Maximum number of log records to flush at a time | `1000` |
141+
| `compress` | Payload compression (`gzip` or `zstd`) | _none_ |
142+
| `log_response_payload` | Log the response payload for debugging | `true` |
143+
| `logs_body_key` | Key to use for the log body | _none_ |
144+
| `retry_limit` | Retry limit for failed deliveries | `1` |
145+
146+
For a complete list of configuration options, see the [Fluent Bit OpenTelemetry documentation](https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry).

docs/product/drains/integration/heroku.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_order: 60
44
description: Learn how to set up Heroku Telemetry Drains to forward logs and traces data to Sentry.
55
---
66

7-
Heroku Telemetry supports [exporting OpenTelemetry (OTEL)-compliant](https://devcenter.heroku.com/articles/heroku-telemetry) to send logs and traces to Sentry. Sending metrics is not supported yet.
7+
Heroku Telemetry supports [exporting OpenTelemetry (OTEL)-compliant data](https://devcenter.heroku.com/articles/heroku-telemetry) to send logs and traces to Sentry. Sending metrics is not supported yet.
88

99
<Alert level="warning">
1010

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: OpenTelemetry Collector
3+
sidebar_order: 20
4+
description: Learn how to set up the OpenTelemetry Collector to forward logs and traces data to Sentry.
5+
---
6+
7+
The [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) is a vendor-agnostic proxy that can receive, process, and export telemetry data. You can configure the Collector to forward logs and traces to Sentry using the `otlphttp` exporter.
8+
9+
If you're looking to forward logs and traces from an OpenTelemetry SDK directly to Sentry, take a look at our [OpenTelemetry (OTLP) documentation](/concepts/otlp/) instead.
10+
11+
## Prerequisites
12+
13+
Before you begin, ensure you have:
14+
15+
- OpenTelemetry Collector installed and running
16+
- A Sentry project you want to send data to
17+
18+
## Step 1: Get Your Sentry OTLP Credentials
19+
20+
You'll need your Sentry OTLP endpoint and authentication header. These can be found in your [Sentry Project Settings](https://sentry.io/settings/projects/) under **Client Keys (DSN)** > **OpenTelemetry (OTLP)**.
21+
22+
### Logs Endpoint
23+
24+
```bash
25+
___OTLP_LOGS_URL___
26+
```
27+
28+
### Traces Endpoint
29+
30+
```bash
31+
___OTLP_TRACES_URL___
32+
```
33+
34+
### Combined Endpoint (for Logs and Traces)
35+
36+
When configuring a combined pipeline, use the base OTLP endpoint. The OpenTelemetry Collector will automatically append the appropriate path (`/v1/logs` or `/v1/traces`) based on the signal type.
37+
38+
```bash
39+
___OTLP_URL___
40+
```
41+
42+
### Authentication Header
43+
44+
```
45+
x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
46+
```
47+
48+
## Step 2: Configure the Collector
49+
50+
Update your OpenTelemetry Collector configuration to add the `otlphttp` exporter pointing to Sentry. You can configure logs, traces, or both.
51+
52+
### Logs Configuration
53+
54+
To forward logs to Sentry, add the following exporter configuration:
55+
56+
```yaml {filename:otel-collector.yaml}
57+
exporters:
58+
otlphttp/sentry:
59+
logs_endpoint: ___OTLP_LOGS_URL___
60+
headers:
61+
x-sentry-auth: "sentry sentry_key=___PUBLIC_KEY___"
62+
compression: gzip
63+
encoding: proto
64+
```
65+
66+
### Traces Configuration
67+
68+
To forward traces to Sentry, add the following exporter configuration:
69+
70+
```yaml {filename:otel-collector.yaml}
71+
exporters:
72+
otlphttp/sentry:
73+
traces_endpoint: ___OTLP_TRACES_URL___
74+
headers:
75+
x-sentry-auth: "sentry sentry_key=___PUBLIC_KEY___"
76+
compression: gzip
77+
encoding: proto
78+
```
79+
80+
### Combined Logs and Traces Configuration
81+
82+
To send both logs and traces to Sentry, you can combine the configurations:
83+
84+
```yaml {filename:otel-collector.yaml}
85+
exporters:
86+
otlphttp/sentry:
87+
endpoint: ___OTLP_URL___
88+
headers:
89+
x-sentry-auth: "sentry sentry_key=___PUBLIC_KEY___"
90+
compression: gzip
91+
encoding: proto
92+
```
93+
94+
## Routing to Multiple Sentry Projects
95+
96+
Sentry's OTLP endpoints are project-specific. If you need to route telemetry from different services to different Sentry projects, you can use the [routing connector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector).
97+
98+
```yaml {filename:otel-collector.yaml}
99+
receivers:
100+
otlp:
101+
protocols:
102+
grpc:
103+
endpoint: 0.0.0.0:4317
104+
105+
connectors:
106+
routing:
107+
default_pipelines: [logs/project-a]
108+
error_mode: ignore
109+
table:
110+
- statement: route() where attributes["service.name"] == "service-b"
111+
pipelines: [logs/project-b]
112+
113+
exporters:
114+
otlphttp/project-a:
115+
logs_endpoint: https://o00000.ingest.sentry.io/api/1111111/integration/otlp/v1/logs
116+
headers:
117+
x-sentry-auth: "sentry sentry_key=example-public-key-for-project-a"
118+
compression: gzip
119+
encoding: proto
120+
121+
otlphttp/project-b:
122+
logs_endpoint: https://o00000.ingest.sentry.io/api/2222222/integration/otlp/v1/logs
123+
headers:
124+
x-sentry-auth: "sentry sentry_key=example-public-key-for-project-b"
125+
compression: gzip
126+
encoding: proto
127+
128+
service:
129+
pipelines:
130+
logs:
131+
receivers: [otlp]
132+
exporters: [routing]
133+
logs/project-a:
134+
receivers: [routing]
135+
exporters: [otlphttp/project-a]
136+
logs/project-b:
137+
receivers: [routing]
138+
exporters: [otlphttp/project-b]
139+
```

docs/product/drains/integration/shopify-hydrogen.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Before you begin, ensure you have:
1515

1616
## Trace Drains
1717

18-
Go through the following steps to
18+
Go through the following steps to set up trace exports:
1919

2020
1. From your Shopify admin, under **Sales channels**, click **Hydrogen**.
2121
2. On the **Hydrogen storefront page**, click **Storefront settings**.

docs/product/drains/integration/supabase.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Before you begin, ensure you have:
2121

2222
## Adding a Log Drain
2323

24-
To setup the Sentry log drain, you need to do the following:
24+
To set up the Sentry log drain, follow these steps:
2525

2626
1. Grab your DSN from your [Sentry project settings](https://docs.sentry.io/concepts/key-terms/dsn-explainer/#where-to-find-your-data-source-name-dsn).
2727

0 commit comments

Comments
 (0)