Skip to content

Commit 48fe65f

Browse files
Chore: jaeger guidance (#4923)
* update Jaeger setup instructions for port conflict and background container Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * fix spacing Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * add helm mode Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * Update daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-jaeger.md Co-authored-by: Mark Fussell <markfussell@gmail.com> Signed-off-by: Mirel <15373565+MyMirelHub@users.noreply.github.com> Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * fix: improve clarity and correctness in Jaeger V2 documentation Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * docs: add local dir instructions for Jaeger V2 Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> --------- Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> Signed-off-by: Mirel <15373565+MyMirelHub@users.noreply.github.com> Co-authored-by: Mark Fussell <markfussell@gmail.com>
1 parent 6cdb9a5 commit 48fe65f

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

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

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ Dapr supports writing traces using the OpenTelemetry (OTLP) protocol, and Jaeger
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

20+
> **Note:** Port 9411 is commonly used by Zipkin. If you have Zipkin running (starts by default when you run `dapr init`), stop the `dapr_zipkin` container first to avoid port conflicts: `docker stop dapr_zipkin`
21+
2022
```bash
21-
docker run --rm --name jaeger \
23+
docker run -d --rm --name jaeger \
2224
-p 16686:16686 \
2325
-p 4317:4317 \
2426
-p 4318:4318 \
@@ -27,7 +29,19 @@ docker run --rm --name jaeger \
2729
cr.jaegertracing.io/jaegertracing/jaeger:2.11.0
2830
```
2931

30-
Next, create the following `config.yaml` file locally:
32+
You can also view the logs from the jaeger container using:
33+
34+
```bash
35+
docker logs jaeger
36+
```
37+
38+
### Configure Dapr for tracing
39+
40+
You have two options to configure Dapr to send traces to Jaeger V2:
41+
42+
#### Option 1: Use a custom config file
43+
44+
Create a `config.yaml` file with the following content:
3145

3246
> **Note:** Because you are using the Open Telemetry protocol to talk to Jaeger, you need to fill out the `otel` section of the tracing configuration and set the `endpointAddress` to the address of the Jaeger container.
3347
@@ -54,6 +68,10 @@ the `--config` option. For example:
5468
dapr run --app-id myapp --app-port 3000 node app.js --config config.yaml
5569
```
5670

71+
#### Option 2: Update the default Dapr config (development environment)
72+
73+
Alternatively, in your development environment, navigate to your [local Dapr components directory](https://docs.dapr.io/getting-started/install-dapr-selfhost/#step-5-verify-components-directory-has-been-initialized) and update the default `config.yaml` file with the OTLP configuration above. This way, all Dapr applications will use the Jaeger V2 tracing configuration by default without needing to specify the `--config` flag each time.
74+
5775
### View traces
5876

5977
To view traces in your browser, go to `http://localhost:16686` to see the Jaeger UI.
@@ -77,20 +95,22 @@ Jaeger V2 can be deployed using the OpenTelemetry Operator for simplified manage
7795

7896
#### Installation
7997

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
83-
```
84-
Verify that all resources in the `cert-manager` namespace are ready.
98+
> **Note:** In order for the API server to communicate with the webhook component of the operator, the webhook requires a TLS certificate that the API server is configured to trust. There are a few different ways you can use to generate/configure the required TLS certificate detailed in the [otel operator chart docs](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator#tls-certificate-requirement)
99+
100+
For simplicity you can use Helm to create an automatically generated self-signed certificate.
85101

86102
1. **Install the OpenTelemetry Operator**:
103+
87104
```bash
88-
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
105+
helm install opentelemetry-operator open-telemetry/opentelemetry-operator -n opentelemetry-operator-system --create-namespace \
106+
--set "manager.collectorImage.repository=ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s" \
107+
--set admissionWebhooks.certManager.enabled=false \
108+
--set admissionWebhooks.autoGenerateCert.enabled=true
89109
```
90110
Confirm that all resources in the `opentelemetry-operator-system` namespace are ready.
91111

92112
1. **Deploy a Jaeger V2 instance with in-memory storage**:
93-
Apply the following configuration to create a Jaeger V2 instance:
113+
Create a file named `jaeger-inmemory.yaml` with the following configuration:
94114
```yaml
95115
apiVersion: opentelemetry.io/v1beta1
96116
kind: OpenTelemetryCollector
@@ -139,7 +159,7 @@ Jaeger V2 can be deployed using the OpenTelemetry Operator for simplified manage
139159

140160
Create a Dapr configuration file to enable tracing and export the sidecar traces directly to the Jaeger V2 instance.
141161

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:
162+
1. Create a configuration file (for example `tracing.yaml`) with the following content, updating the `namespace` and `otel.endpointAddress` to match your Jaeger V2 instance:
143163
```yaml
144164
apiVersion: dapr.io/v1alpha1
145165
kind: Configuration
@@ -190,7 +210,7 @@ That’s it! There’s no need to include the OpenTelemetry SDK or instrument yo
190210
To view Dapr sidecar traces, port-forward the Jaeger V2 service and open the UI:
191211

192212
```bash
193-
kubectl port-forward svc/jaeger-inmemory-instance-collector 16686 -n observability
213+
kubectl port-forward svc/jaeger-inmemory-instance-collector 16686:16686 -n observability
194214
```
195215

196216
In your browser, go to `http://localhost:16686` to see the Jaeger V2 UI.

0 commit comments

Comments
 (0)