-
Notifications
You must be signed in to change notification settings - Fork 773
Add dash0 tracing how-to #4761
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
Open
kaspernissen
wants to merge
7
commits into
dapr:v1.15
Choose a base branch
from
dash0hq:dash0-tracing-docs
base: v1.15
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+207
−1
Open
Add dash0 tracing how-to #4761
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e63b4d0
Add dash0 tracing how-to
kaspernissen 1a50229
remove unneeded link
kaspernissen a62a2c6
Merge branch 'v1.15' into dash0-tracing-docs
kaspernissen 208bb1a
Merge branch 'v1.15' into dash0-tracing-docs
kaspernissen ed531ef
Merge branch 'v1.15' into dash0-tracing-docs
kaspernissen 9c8aacc
Merge branch 'v1.15' into dash0-tracing-docs
kaspernissen db72250
add Dash0 to next steps list
kaspernissen 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
205 changes: 205 additions & 0 deletions
205
daprdocs/content/en/operations/observability/tracing/dash0.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,205 @@ | ||
--- | ||
type: docs | ||
title: "How-To: Set up Dash0 for distributed tracing" | ||
linkTitle: "Dash0" | ||
weight: 5000 | ||
description: "Set up Dash0 for distributed tracing" | ||
--- | ||
|
||
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. | ||
|
||
## Configure Dapr tracing with the OpenTelemetry Collector and Dash0 | ||
|
||
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. | ||
|
||
## Prerequisites | ||
|
||
* A running Kubernetes cluster with `kubectl` installed | ||
* Helm v3+ | ||
* [Dapr installed in the cluster](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/) | ||
* A Dash0 account ([Get started with a 14-day free trial](https://www.dash0.com/pricing)) | ||
* Your Dash0 **Auth Token** and **OTLP/gRPC endpoint** (find both under **Settings → Auth Tokens** and **Settings → Endpoints**) | ||
|
||
|
||
## Configure the OpenTelemetry Collector | ||
|
||
1) Create a namespace for the Collector | ||
|
||
```bash | ||
kubectl create namespace opentelemetry | ||
``` | ||
|
||
2) Create a Secret with your Dash0 **Auth Token** and **Endpoint** | ||
|
||
```bash | ||
kubectl create secret generic dash0-secrets \ | ||
--from-literal=dash0-authorization-token="<your_auth_token>" \ | ||
--from-literal=dash0-endpoint="<your_otlp_grpc_endpoint>" \ | ||
--namespace opentelemetry | ||
``` | ||
|
||
3) Add the OpenTelemetry Helm repo (once) | ||
|
||
```bash | ||
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts | ||
helm repo update | ||
``` | ||
|
||
4) Create `values.yaml` for the Collector | ||
|
||
This config: | ||
|
||
* Reads token + endpoint from the Secret via env vars | ||
* Enables OTLP receivers (gRPC + HTTP) | ||
* Sends **traces, metrics, and logs** to Dash0 via OTLP/gRPC with Bearer auth | ||
|
||
```yaml | ||
mode: deployment | ||
fullnameOverride: otel-collector | ||
replicaCount: 1 | ||
|
||
image: | ||
repository: otel/opentelemetry-collector-k8s | ||
|
||
extraEnvs: | ||
- name: DASH0_AUTHORIZATION_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: dash0-secrets | ||
key: dash0-authorization-token | ||
- name: DASH0_ENDPOINT | ||
valueFrom: | ||
secretKeyRef: | ||
name: dash0-secrets | ||
key: dash0-endpoint | ||
|
||
config: | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: {} | ||
http: {} | ||
|
||
processors: | ||
batch: {} | ||
|
||
exporters: | ||
otlp/dash0: | ||
auth: | ||
authenticator: bearertokenauth/dash0 | ||
endpoint: ${env:DASH0_ENDPOINT} | ||
|
||
extensions: | ||
bearertokenauth/dash0: | ||
scheme: Bearer | ||
token: ${env:DASH0_AUTHORIZATION_TOKEN} | ||
health_check: {} | ||
|
||
service: | ||
extensions: | ||
- bearertokenauth/dash0 | ||
- health_check | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [otlp/dash0] | ||
metrics: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [otlp/dash0] | ||
logs: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [otlp/dash0] | ||
``` | ||
|
||
5) Install/upgrade the Collector with Helm | ||
|
||
```bash | ||
helm upgrade --install otel-collector open-telemetry/opentelemetry-collector \ | ||
--namespace opentelemetry \ | ||
-f values.yaml | ||
``` | ||
|
||
## Configure Dapr to send telemetry to the Collector | ||
|
||
1) Create a configuration | ||
|
||
Create `dapr-config.yaml`: | ||
|
||
```yaml | ||
apiVersion: dapr.io/v1alpha1 | ||
kind: Configuration | ||
metadata: | ||
name: tracing | ||
namespace: default | ||
spec: | ||
tracing: | ||
samplingRate: "1" | ||
otel: | ||
endpointAddress: "otel-collector.opentelemetry.svc.cluster.local:4317" | ||
isSecure: false | ||
protocol: grpc | ||
``` | ||
|
||
Apply it: | ||
|
||
```bash | ||
kubectl apply -f dapr-config.yaml | ||
``` | ||
|
||
2) Annotate your application(s) | ||
|
||
In each Deployment/Pod you want traced by Dapr, add: | ||
|
||
```yaml | ||
metadata: | ||
annotations: | ||
dapr.io/config: "tracing" | ||
``` | ||
|
||
## Verify the setup | ||
|
||
1. Check that the OpenTelemetry Collector is running: | ||
|
||
```bash | ||
kubectl get pods -n opentelemetry | ||
``` | ||
|
||
2. Check the collector logs to ensure it's receiving and forwarding telemetry: | ||
|
||
```bash | ||
kubectl logs -n opentelemetry deployment/otel-collector | ||
``` | ||
|
||
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. | ||
|
||
## Viewing traces | ||
|
||
Once your setup is complete and telemetry data is flowing, you can view traces in Dash0: | ||
|
||
1. Navigate to your Dash0 account | ||
2. Go to the **Traces** section | ||
3. You should see distributed traces from your Dapr applications | ||
4. Use filters to narrow down traces by service name, operation, or time range | ||
|
||
<img src="/images/dash0-dapr-trace-overview.png" width=1200 alt="Dash0 Trace Overview"> | ||
|
||
<img src="/images/dash0-dapr-trace.png" width=1200 alt="Dash0 Trace Details"> | ||
|
||
## Cleanup | ||
|
||
```bash | ||
helm -n opentelemetry uninstall otel-collector | ||
kubectl -n opentelemetry delete secret dash0-secrets | ||
kubectl delete ns opentelemetry | ||
``` | ||
|
||
## Related Links | ||
|
||
* [Dapr Kubernetes quickstart tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/hello-kubernetes) | ||
* [Dapr observability quickstart](https://github.com/dapr/quickstarts/tree/master/tutorials/observability) | ||
* [Dash0 documentation](https://www.dash0.com/docs) | ||
* [OpenTelemetry Collector documentation](https://opentelemetry.io/docs/collector/) | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.