Skip to content

Commit 8c5ab7d

Browse files
authored
feat Jaeger v2 (#4921)
* Update OpenTelemetry documentation for Jaeger V2 integration Signed-off-by: MyMirelHub <[email protected]> * Add note on storage backends and update references for Jaeger V2 Signed-off-by: MyMirelHub <[email protected]> * Update cert-manager installation command to version 1.19.1 Signed-off-by: MyMirelHub <[email protected]> --------- Signed-off-by: MyMirelHub <[email protected]>
1 parent 35e0744 commit 8c5ab7d

File tree

1 file changed

+100
-35
lines changed

1 file changed

+100
-35
lines changed

daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-jaeger.md

Lines changed: 100 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
---
22
type: docs
3-
title: "Using OpenTelemetry Collector to collect traces to send to Jaeger"
4-
linkTitle: "Using the OpenTelemetry for Jaeger"
3+
title: "Using OpenTelemetry to send traces to Jaeger V2"
4+
linkTitle: "Using OpenTelemetry for Jaeger V2"
55
weight: 1200
6-
description: "How to push trace events to Jaeger distributed tracing platform, using the OpenTelemetry Collector."
6+
description: "How to push trace events to Jaeger V2 distributed tracing platform using OpenTelemetry protocol."
77
---
88

9-
While Dapr supports writing traces using OpenTelemetry (OTLP) and Zipkin protocols, Zipkin support for Jaeger has been deprecated in favor of OTLP. Although Jaeger supports OTLP directly, the recommended approach for production is to use the OpenTelemetry Collector to collect traces from Dapr and send them to Jaeger, allowing your application to quickly offload data and take advantage of features like retries, batching, and encryption. For more information, read the Open Telemetry Collector [documentation](https://opentelemetry.io/docs/collector/#when-to-use-a-collector).
9+
Dapr supports writing traces using the OpenTelemetry (OTLP) protocol, and Jaeger V2 natively supports OTLP, allowing Dapr to send traces directly to a Jaeger V2 instance. This approach is recommended for production to leverage Jaeger V2's capabilities for distributed tracing.
10+
1011
{{< tabpane text=true >}}
1112

1213
{{% tab "Self-hosted" %}}
13-
<!-- self-hosted -->
14-
## Configure Jaeger in self-hosted mode
14+
## Configure Jaeger V2 in self-hosted mode
1515

1616
### Local setup
1717

1818
The simplest way to start Jaeger is to run the pre-built, all-in-one Jaeger image published to DockerHub and expose the OTLP port:
1919

2020
```bash
21-
docker run -d --name jaeger \
22-
-p 4317:4317 \
21+
docker run --rm --name jaeger \
2322
-p 16686:16686 \
24-
jaegertracing/all-in-one:1.49
23+
-p 4317:4317 \
24+
-p 4318:4318 \
25+
-p 5778:5778 \
26+
-p 9411:9411 \
27+
cr.jaegertracing.io/jaegertracing/jaeger:2.11.0
2528
```
2629

2730
Next, create the following `config.yaml` file locally:
@@ -58,41 +61,103 @@ To view traces in your browser, go to `http://localhost:16686` to see the Jaeger
5861

5962
{{% tab "Kubernetes" %}}
6063
<!-- kubernetes -->
61-
## Configure Jaeger on Kubernetes with the OpenTelemetry Collector
64+
## Configure Jaeger V2 on Kubernetes
6265

63-
The following steps show you how to configure Dapr to send distributed tracing data to the OpenTelemetry Collector which, in turn, sends the traces to Jaeger.
66+
The following steps show you how to configure Dapr to send distributed tracing data directly to a Jaeger V2 instance deployed using the OpenTelemetry Operator with in-memory storage.
6467

6568
### Prerequisites
6669

6770
- [Install Dapr on Kubernetes]({{% ref kubernetes %}})
68-
- [Set up Jaeger](https://www.jaegertracing.io/docs/1.49/operator/) using the Jaeger Kubernetes Operator
69-
70-
### Set up OpenTelemetry Collector to push to Jaeger
7171

72-
To push traces to your Jaeger instance, install the OpenTelemetry Collector on your Kubernetes cluster.
72+
### Set up Jaeger V2 with the OpenTelemetry Operator
7373

74-
1. Download and inspect the [`open-telemetry-collector-jaeger.yaml`](/docs/open-telemetry-collector/open-telemetry-collector-jaeger.yaml) file.
74+
Jaeger V2 can be deployed using the OpenTelemetry Operator for simplified management and native OTLP support. The following example configures Jaeger V2 with in-memory storage.
7575

76-
1. In the data section of the `otel-collector-conf` ConfigMap, update the `otlp/jaeger.endpoint` value to reflect the endpoint of your Jaeger collector Kubernetes service object.
76+
> **Note on Storage Backends:** This example uses in-memory storage (`memstore`) for simplicity, suitable for development or testing environments as it stores up to 100,000 traces in memory. For production environments, consider configuring a persistent storage backend like Cassandra or Elasticsearch to ensure trace data durability.
7777

78-
1. Deploy the OpenTelemetry Collector into the same namespace where your Dapr-enabled applications are running:
78+
#### Installation
7979

80-
```sh
81-
kubectl apply -f open-telemetry-collector-jaeger.yaml
80+
1. **Install cert-manager** to manage certificates:
81+
```bash
82+
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.1/cert-manager.yaml -n cert-manager
8283
```
84+
Verify that all resources in the `cert-manager` namespace are ready.
8385

84-
### Set up Dapr to send traces to OpenTelemetryCollector
85-
86-
Create a Dapr configuration file to enable tracing and export the sidecar traces to the OpenTelemetry Collector.
87-
88-
1. Use the [`collector-config-otel.yaml`](/docs/open-telemetry-collector/collector-config-otel.yaml) file to create your own Dapr configuration.
86+
1. **Install the OpenTelemetry Operator**:
87+
```bash
88+
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
89+
```
90+
Confirm that all resources in the `opentelemetry-operator-system` namespace are ready.
91+
92+
1. **Deploy a Jaeger V2 instance with in-memory storage**:
93+
Apply the following configuration to create a Jaeger V2 instance:
94+
```yaml
95+
apiVersion: opentelemetry.io/v1beta1
96+
kind: OpenTelemetryCollector
97+
metadata:
98+
name: jaeger-inmemory-instance
99+
namespace: observability
100+
spec:
101+
image: jaegertracing/jaeger:latest
102+
ports:
103+
- name: jaeger
104+
port: 16686
105+
config:
106+
service:
107+
extensions: [jaeger_storage, jaeger_query]
108+
pipelines:
109+
traces:
110+
receivers: [otlp]
111+
exporters: [jaeger_storage_exporter]
112+
extensions:
113+
jaeger_query:
114+
storage:
115+
traces: memstore
116+
jaeger_storage:
117+
backends:
118+
memstore:
119+
memory:
120+
max_traces: 100000
121+
receivers:
122+
otlp:
123+
protocols:
124+
grpc:
125+
endpoint: 0.0.0.0:4317
126+
http:
127+
endpoint: 0.0.0.0:4318
128+
exporters:
129+
jaeger_storage_exporter:
130+
trace_storage: memstore
131+
```
132+
Apply it with:
133+
```bash
134+
kubectl apply -f jaeger-inmemory.yaml -n observability
135+
```
89136

90-
1. Update the `namespace` and `otel.endpointAddress` values to align with the namespace where your Dapr-enabled applications and OpenTelemetry Collector are deployed.
91137

92-
1. Apply the configuration with:
138+
### Set up Dapr to send traces to Jaeger V2
139+
140+
Create a Dapr configuration file to enable tracing and export the sidecar traces directly to the Jaeger V2 instance.
141+
142+
1. Create a configuration file (e.g., `tracing.yaml`) with the following content, updating the `namespace` and `otel.endpointAddress` to match your Jaeger V2 instance:
143+
```yaml
144+
apiVersion: dapr.io/v1alpha1
145+
kind: Configuration
146+
metadata:
147+
name: tracing
148+
namespace: order-system
149+
spec:
150+
tracing:
151+
samplingRate: "1"
152+
otel:
153+
endpointAddress: "jaeger-inmemory-instance-collector.observability.svc.cluster.local:4317"
154+
isSecure: false
155+
protocol: grpc
156+
```
93157

94-
```sh
95-
kubectl apply -f collector-config.yaml
158+
2. Apply the configuration:
159+
```bash
160+
kubectl apply -f tracing.yaml -n order-system
96161
```
97162

98163
### Deploy your app with tracing enabled
@@ -122,20 +187,20 @@ That’s it! There’s no need to include the OpenTelemetry SDK or instrument yo
122187

123188
### View traces
124189

125-
To view Dapr sidecar traces, port-forward the Jaeger Service and open the UI:
190+
To view Dapr sidecar traces, port-forward the Jaeger V2 service and open the UI:
126191

127192
```bash
128-
kubectl port-forward svc/jaeger-query 16686 -n observability
193+
kubectl port-forward svc/jaeger-inmemory-instance-collector 16686 -n observability
129194
```
130195

131-
In your browser, go to `http://localhost:16686` and you will see the Jaeger UI.
196+
In your browser, go to `http://localhost:16686` to see the Jaeger V2 UI.
132197

133198
![jaeger](/images/jaeger_ui.png)
134199
{{% /tab %}}
135200

136201
{{< /tabpane >}}
202+
137203
## References
138204

139-
- [Jaeger Getting Started](https://www.jaegertracing.io/docs/1.49/getting-started/)
140-
- [Jaeger Kubernetes Operator](https://www.jaegertracing.io/docs/1.49/operator/)
141-
- [OpenTelemetry Collector Exporters](https://opentelemetry.io/docs/collector/configuration/#exporters)
205+
- [Jaeger V2 Getting Started](https://www.jaegertracing.io/docs/2.11/getting-started/)
206+
- [Jaeger V2 Kubernetes Operator](https://www.jaegertracing.io/docs/2.11/deployment/kubernetes/#kubernetes-operator)

0 commit comments

Comments
 (0)