|
| 1 | +# Jaeger |
| 2 | + |
| 3 | +Jaeger is installed if you followed the standard installation instructions. Its resource objects are |
| 4 | +defined in the `base/jaeger` directory. Additionally, a Jaeger agent sidecar container is present in |
| 5 | +the `*.Deployment.yaml` and `*.StatefulSet.yaml` of certain services. |
| 6 | + |
| 7 | +## Connect Sourcegraph to an external Jaeger instance |
| 8 | + |
| 9 | +If you have an existing Jaeger instance you would like to connect Sourcegraph to (instead of running |
| 10 | +the Jaeger instance inside the Sourcegraph cluster), do: |
| 11 | + |
| 12 | +1. Remove the `base/jaeger` directory: `rm -rf base/jaeger` |
| 13 | +1. Update the Jaeger agent containers to point to your Jaeger collector. |
| 14 | + 1. Find all instances of Jaeger agent (`grep -R 'jaegertracing/jaeger-agent'`). |
| 15 | + 1. Update the `args` field of the Jaeger agent container configuration to point to the external |
| 16 | + collector. E.g., |
| 17 | + ``` |
| 18 | + args: |
| 19 | + - --reporter.grpc.host-port=external-jaeger-collector-host:14250 |
| 20 | + - --reporter.type=grpc |
| 21 | + ``` |
| 22 | +1. Apply these changes to the cluster. |
| 23 | +
|
| 24 | +## Disable Jaeger entirely |
| 25 | +
|
| 26 | +To disable Jaeger entirely, do: |
| 27 | +
|
| 28 | +1. Update the Sourcegraph [site |
| 29 | + configuration](https://docs.sourcegraph.com/admin/config/site_config) to remove the |
| 30 | + `observability.tracing` field. |
| 31 | +1. Remove the `base/jaeger` directory: `rm -rf base/jaeger` |
| 32 | +1. Remove the jaeger agent containers from each `*.Deployment.yaml` and `*.StatefulSet.ayml` file. |
| 33 | +1. Apply these changes to the cluster. |
| 34 | +
|
| 35 | +## Upgrading from 3.14 and earlier to 3.15 or later |
| 36 | +
|
| 37 | +The Kubernetes distribution of Sourcegraph 3.15 changed the standard way that Jaeger is deployed |
| 38 | +inside the Sourcegraph cluster. |
| 39 | +
|
| 40 | +If you were previously using the [Jaeger |
| 41 | +Operator](https://github.com/jaegertracing/jaeger-operator), do: |
| 42 | +
|
| 43 | +1. Delete the Jaeger instance: `kubectl delete jaeger jaeger`. |
| 44 | +1. [Delete the Jaeger Operator](https://www.jaegertracing.io/docs/1.16/operator/#uninstalling-the-operator) |
| 45 | +1. Merge the new version of this repository into your fork and apply the update. The new Jaeger |
| 46 | + components should be created automatically. |
| 47 | +
|
| 48 | +If you were previously connecting to an external Jaeger instance, do: |
| 49 | +
|
| 50 | +1. Merge the new version of this repository into your fork. Resolve any conflicts in files that |
| 51 | + contain configuration for the Jaeger agent to ensure the agent still points to the external |
| 52 | + Jaeger collector. |
| 53 | +1. Remove the `base/jaeger` directory: `rm -rf base/jaeger` |
| 54 | +1. Apply these changes to the cluster. |
| 55 | +
|
| 56 | +If you were previously not using Jaeger and would like to continue not using Jaeger, follow the |
| 57 | +directions above to disable Jaeger entirely. |
0 commit comments