Skip to content

Commit baaf97c

Browse files
authored
Add dash0 tracing how-to (#4761)
* Add dash0 tracing how-to Signed-off-by: Kasper Borg Nissen <[email protected]> * remove unneeded link Signed-off-by: Kasper Borg Nissen <[email protected]> * add Dash0 to next steps list Signed-off-by: Kasper Borg Nissen <[email protected]> --------- Signed-off-by: Kasper Borg Nissen <[email protected]>
1 parent 239dfef commit baaf97c

File tree

4 files changed

+207
-1
lines changed

4 files changed

+207
-1
lines changed
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
type: docs
3+
title: "How-To: Set up Dash0 for distributed tracing"
4+
linkTitle: "Dash0"
5+
weight: 5000
6+
description: "Set up Dash0 for distributed tracing"
7+
---
8+
9+
Dapr captures metrics, traces, and logs that can be sent directly to Dash0 through the OpenTelemetry Collector. Dash0 is an OpenTelemetry-native observability platform that provides comprehensive monitoring capabilities for distributed applications.
10+
11+
## Configure Dapr tracing with the OpenTelemetry Collector and Dash0
12+
13+
By using the OpenTelemetry Collector with the OTLP exporter to send data to Dash0, you can configure Dapr to create traces for each application in your Kubernetes cluster and collect them in Dash0 for analysis and monitoring.
14+
15+
## Prerequisites
16+
17+
* A running Kubernetes cluster with `kubectl` installed
18+
* Helm v3+
19+
* [Dapr installed in the cluster](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/)
20+
* A Dash0 account ([Get started with a 14-day free trial](https://www.dash0.com/pricing))
21+
* Your Dash0 **Auth Token** and **OTLP/gRPC endpoint** (find both under **Settings → Auth Tokens** and **Settings → Endpoints**)
22+
23+
24+
## Configure the OpenTelemetry Collector
25+
26+
1) Create a namespace for the Collector
27+
28+
```bash
29+
kubectl create namespace opentelemetry
30+
```
31+
32+
2) Create a Secret with your Dash0 **Auth Token** and **Endpoint**
33+
34+
```bash
35+
kubectl create secret generic dash0-secrets \
36+
--from-literal=dash0-authorization-token="<your_auth_token>" \
37+
--from-literal=dash0-endpoint="<your_otlp_grpc_endpoint>" \
38+
--namespace opentelemetry
39+
```
40+
41+
3) Add the OpenTelemetry Helm repo (once)
42+
43+
```bash
44+
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
45+
helm repo update
46+
```
47+
48+
4) Create `values.yaml` for the Collector
49+
50+
This config:
51+
52+
* Reads token + endpoint from the Secret via env vars
53+
* Enables OTLP receivers (gRPC + HTTP)
54+
* Sends **traces, metrics, and logs** to Dash0 via OTLP/gRPC with Bearer auth
55+
56+
```yaml
57+
mode: deployment
58+
fullnameOverride: otel-collector
59+
replicaCount: 1
60+
61+
image:
62+
repository: otel/opentelemetry-collector-k8s
63+
64+
extraEnvs:
65+
- name: DASH0_AUTHORIZATION_TOKEN
66+
valueFrom:
67+
secretKeyRef:
68+
name: dash0-secrets
69+
key: dash0-authorization-token
70+
- name: DASH0_ENDPOINT
71+
valueFrom:
72+
secretKeyRef:
73+
name: dash0-secrets
74+
key: dash0-endpoint
75+
76+
config:
77+
receivers:
78+
otlp:
79+
protocols:
80+
grpc: {}
81+
http: {}
82+
83+
processors:
84+
batch: {}
85+
86+
exporters:
87+
otlp/dash0:
88+
auth:
89+
authenticator: bearertokenauth/dash0
90+
endpoint: ${env:DASH0_ENDPOINT}
91+
92+
extensions:
93+
bearertokenauth/dash0:
94+
scheme: Bearer
95+
token: ${env:DASH0_AUTHORIZATION_TOKEN}
96+
health_check: {}
97+
98+
service:
99+
extensions:
100+
- bearertokenauth/dash0
101+
- health_check
102+
pipelines:
103+
traces:
104+
receivers: [otlp]
105+
processors: [batch]
106+
exporters: [otlp/dash0]
107+
metrics:
108+
receivers: [otlp]
109+
processors: [batch]
110+
exporters: [otlp/dash0]
111+
logs:
112+
receivers: [otlp]
113+
processors: [batch]
114+
exporters: [otlp/dash0]
115+
```
116+
117+
5) Install/upgrade the Collector with Helm
118+
119+
```bash
120+
helm upgrade --install otel-collector open-telemetry/opentelemetry-collector \
121+
--namespace opentelemetry \
122+
-f values.yaml
123+
```
124+
125+
## Configure Dapr to send telemetry to the Collector
126+
127+
1) Create a configuration
128+
129+
Create `dapr-config.yaml`:
130+
131+
```yaml
132+
apiVersion: dapr.io/v1alpha1
133+
kind: Configuration
134+
metadata:
135+
name: tracing
136+
namespace: default
137+
spec:
138+
tracing:
139+
samplingRate: "1"
140+
otel:
141+
endpointAddress: "otel-collector.opentelemetry.svc.cluster.local:4317"
142+
isSecure: false
143+
protocol: grpc
144+
```
145+
146+
Apply it:
147+
148+
```bash
149+
kubectl apply -f dapr-config.yaml
150+
```
151+
152+
2) Annotate your application(s)
153+
154+
In each Deployment/Pod you want traced by Dapr, add:
155+
156+
```yaml
157+
metadata:
158+
annotations:
159+
dapr.io/config: "tracing"
160+
```
161+
162+
## Verify the setup
163+
164+
1. Check that the OpenTelemetry Collector is running:
165+
166+
```bash
167+
kubectl get pods -n opentelemetry
168+
```
169+
170+
2. Check the collector logs to ensure it's receiving and forwarding telemetry:
171+
172+
```bash
173+
kubectl logs -n opentelemetry deployment/otel-collector
174+
```
175+
176+
3. Deploy a sample application with Dapr tracing enabled and generate some traffic to verify traces are being sent to Dash0. You can use the [Dapr Kubernetes quickstart tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/hello-kubernetes) for testing.
177+
178+
## Viewing traces
179+
180+
Once your setup is complete and telemetry data is flowing, you can view traces in Dash0:
181+
182+
1. Navigate to your Dash0 account
183+
2. Go to the **Traces** section
184+
3. You should see distributed traces from your Dapr applications
185+
4. Use filters to narrow down traces by service name, operation, or time range
186+
187+
<img src="/images/dash0-dapr-trace-overview.png" width=1200 alt="Dash0 Trace Overview">
188+
189+
<img src="/images/dash0-dapr-trace.png" width=1200 alt="Dash0 Trace Details">
190+
191+
## Cleanup
192+
193+
```bash
194+
helm -n opentelemetry uninstall otel-collector
195+
kubectl -n opentelemetry delete secret dash0-secrets
196+
kubectl delete ns opentelemetry
197+
```
198+
199+
## Related Links
200+
201+
* [Dapr Kubernetes quickstart tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/hello-kubernetes)
202+
* [Dapr observability quickstart](https://github.com/dapr/quickstarts/tree/master/tutorials/observability)
203+
* [Dash0 documentation](https://www.dash0.com/docs)
204+
* [OpenTelemetry Collector documentation](https://opentelemetry.io/docs/collector/)
205+

daprdocs/content/en/operations/observability/tracing/setup-tracing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ Learn how to set up tracing with one of the following tools:
7777
- [New Relic]({{< ref newrelic.md >}})
7878
- [Jaeger]({{< ref open-telemetry-collector-jaeger.md >}})
7979
- [Zipkin]({{< ref zipkin.md >}})
80-
- [Datadog]({{< ref datadog.md >}})
80+
- [Datadog]({{< ref datadog.md >}})
81+
- [Dash0]({{< ref dash0.md >}})
670 KB
Loading
517 KB
Loading

0 commit comments

Comments
 (0)