Commit 5a7325a
Fix OTel Collector v0.141.0 API breaking changes for ToServer/ToClientConn and Kafka receiver/exporter (#7694)
## 🛑 Breaking Change
This upgrade of dependencies from OTel Collector introduces a breaking
change in the Kafka exporter and receiver configuration: the `topic` and
`encoding` fields moved under `traces` element
(open-telemetry/opentelemetry-collector-contrib#44568).
Before:
```yaml
exporters:
kafka:
brokers:
- localhost:9092
topic: ${env:KAFKA_TOPIC:-jaeger-spans}
encoding: ${env:KAFKA_ENCODING:-otlp_proto}
```
After:
```yaml
exporters:
kafka:
brokers:
- localhost:9092
traces:
topic: ${env:KAFKA_TOPIC:-jaeger-spans}
encoding: ${env:KAFKA_ENCODING:-otlp_proto}
```
## Fix for OTel Collector Upgrade PR #7694 ✅
- [x] Identify the failing build - Segmentation fault in
TestNewServer_TLSConfigError
- [x] Analyze error messages - Nil pointer dereference when calling
Host.GetExtensions()
- [x] Research and apply fix:
- Added nil checks before calling Host.GetExtensions() in 3 locations
- If Host is nil, pass nil to ToServer/ToClientConn instead of
dereferencing
- [x] Fix Kafka receiver/exporter configuration breaking changes
- Moved `topic` and `encoding` into signal-specific `traces` section
- Updated both `config-kafka-ingester.yaml` and
`config-kafka-collector.yaml`
- [x] Test the build passes
- [x] Verify the changes are minimal and correct
## Summary
Fixed build failures caused by breaking changes in OTel Collector
v0.141.0:
### 1. ToServer/ToClientConn API Changes
Added nil pointer checks before calling `Host.GetExtensions()` in:
- `cmd/remote-storage/app/server.go` (added import and nil check)
- `cmd/query/app/server.go` (2 locations with nil checks)
### 2. Kafka Receiver/Exporter Configuration Changes
The Kafka receiver v0.141.0 removed deprecated top-level `topic` and
`encoding` fields. Updated configuration files:
- `cmd/jaeger/config-kafka-ingester.yaml` - Moved topic/encoding under
`traces` section
- `cmd/jaeger/config-kafka-collector.yaml` - Moved topic/encoding under
`traces` section
All tests now pass including the previously failing
`TestNewServer_TLSConfigError` and Kafka integration tests. ✅
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> investigate why this upgrade PR is failing the build/CI:
#7692
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: yurishkuro <[email protected]>1 parent 63b27e1 commit 5a7325a
File tree
10 files changed
+438
-420
lines changed- cmd
- jaeger
- internal/extension
- expvar
- remotesampling
- query/app
- remote-storage/app
- internal/storage
- v1/grpc
- v2/grpc
10 files changed
+438
-420
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | | - | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
210 | 218 | | |
211 | 219 | | |
212 | | - | |
| 220 | + | |
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | | - | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments