Commit fc0bc9f
[jdbc] Capture custom object types in prepared statement parameter instrumentation
Previously, setObject() calls with custom types (e.g. ORM-managed ID
classes) were silently dropped because the instrumentation only captured
a hardcoded whitelist of known JDBC types. Any class not in the list
produced no parameter attribute at all, indistinguishable from a
parameter that was never set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b0a6cdb commit fc0bc9f
2 files changed
Lines changed: 38 additions & 45 deletions
File tree
- instrumentation/jdbc
- javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jdbc
- testing/src/main/java/io/opentelemetry/instrumentation/jdbc/testing
Lines changed: 6 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | 24 | | |
27 | | - | |
28 | 25 | | |
29 | | - | |
30 | | - | |
31 | 26 | | |
32 | 27 | | |
33 | 28 | | |
| |||
168 | 163 | | |
169 | 164 | | |
170 | 165 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 166 | + | |
| 167 | + | |
187 | 168 | | |
188 | 169 | | |
189 | 170 | | |
| |||
207 | 188 | | |
208 | 189 | | |
209 | 190 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 191 | + | |
| 192 | + | |
226 | 193 | | |
227 | 194 | | |
228 | 195 | | |
| |||
246 | 213 | | |
247 | 214 | | |
248 | 215 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 216 | + | |
| 217 | + | |
257 | 218 | | |
258 | 219 | | |
259 | 220 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
377 | 402 | | |
378 | 403 | | |
379 | 404 | | |
| |||
658 | 683 | | |
659 | 684 | | |
660 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
661 | 693 | | |
662 | 694 | | |
663 | 695 | | |
| |||
0 commit comments