Commit 227d138
otel-agent: support Deployment kind, routing directly to existing otel-collector (#863)
ref sourcegraph/sourcegraph#12299
ref https://sourcegraph.slack.com/archives/C05MW2TMYAV/p1778179723106999
## Summary
Added `openTelemetry.agent.kind` value (`"DaemonSet"` | `"Deployment"`,
default `"DaemonSet"`) for environments where DaemonSets are restricted
(e.g. some customer limitation)
When `kind: "Deployment"`, the otel-agent DaemonSet is not created and
application pods send traces directly to the existing `otel-collector`
Deployment via `http://otel-collector:4317` (the pre-existing ClusterIP
service with gRPC OTLP on port 4317)
## Test plan
kind cluster with below override. tested and it worked
```yml
storageClass:
create: false
name: standard
sourcegraph:
localDevMode: true
image:
repository: us-docker.pkg.dev/sourcegraph-images/external
defaultTag: docker-images-notest-michaellz_370952_2026-05-08_7.2-48f70aff43d4 #370941_2026-05-07_7.2-2c8911ef83a9
useGlobalTagAsDefault: true
openTelemetry:
enabled: true
agent:
kind: Deployment
jaeger:
enabled: true
```
there's no more `otel-agent` ds:
<img width="740" height="92" alt="CleanShot 2026-05-07 at 18 51 42"
src="https://github.com/user-attachments/assets/544ee8e1-5353-433e-835a-caecb0286cd4"
/>
can view the trace in jager:
<img width="1400" height="976" alt="CleanShot 2026-05-07 at 18 49 50"
src="https://github.com/user-attachments/assets/42de66af-62b4-4ce4-ae27-7a3635d94e1c"
/>
<img width="1448" height="833" alt="CleanShot 2026-05-07 at 18 49 31"
src="https://github.com/user-attachments/assets/d0652be5-13ca-4495-bd0f-3dab7664a4b1"
/>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01K2AnXLduzruntPtUsC7xiA)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7f6386f commit 227d138
5 files changed
Lines changed: 54 additions & 1 deletion
File tree
- charts/sourcegraph
- templates
- otel-collector
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| 185 | + | |
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
661 | 666 | | |
662 | 667 | | |
663 | 668 | | |
| |||
0 commit comments