Skip to content

Commit

Permalink
Instructions on Porch Tracing setup added to Porch contributor guide (#…
Browse files Browse the repository at this point in the history
…181)

Co-authored-by: JamesMcDermott <james.j.mcdermott@ericsson.com>
Co-authored-by: Gergely Csatari <gergely.csatari@nokia.com>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent ee64b56 commit 9127211
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions content/en/docs/porch/contributors-guide/environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,74 @@ and running the [setup script](https://github.com/nephio-project/porch/blob/main

You can find a detailed description of the actual development process [here](dev-process.md).

## Enabling Open Telemetry/Jaeger tracing

### Enabling tracing on a Porch deployment

Follow the steps below to enable Open Telemetry/Jaeger tracing on your Porch deployment.

1. Apply the Porch *deployment.yaml* manifest for Jaeger.

```bash
kubectl apply -f https://raw.githubusercontent.com/nephio-project/porch/refs/heads/main/deployments/tracing/deployment.yaml
```

2. Add the environment variable *OTEL* to the porch-server manifest:

```bash
kubectl edit deployment -n porch-system porch-server
```

```bash
env:
- name: OTEL
value: otel://jaeger-oltp:4317
```

3. Set up port forwarding of the Jaeger http port to your local machine:

```bash
kubectl port-forward -n porch-system service/jaeger-http 16686
```

4. Open the Jaeger UI in your browser at *http://localhost:16686*

### Enable tracing on a local Porch server

Follow the steps below to enable Open Telemetry/Jaeger tracing on a porch server running locally on your machine, such as in VS Code.

1. Download the Jaeger binary tarball for your local machine architecture from [the Jaeger download page](https://www.jaegertracing.io/download/#binaries) and untar the tarball in some suitable directory.

2. Run Jaeger:

```bash
cd jaeger
./jaeger-all-in-one
```

3. Configure the Porch server to output Open Telemetry traces:

Set the *OTEL* environment variable to point at the Jaeger server

In *.vscode/launch.json*:

```bash
"env": {
...
...
"OTEL": "otel://localhost:4317",
...
...
}
```

In a shell:

```bash
export OTEL="otel://localhost:4317"
```

4. Open the Jaeger UI in your browser at *http://localhost:16686*

5. Run the Porch Server.

0 comments on commit 9127211

Please sign in to comment.