Commit cf8982a
Dhruv Paranjape
fix: Grape Instrumentation handle status code symbol (#448)
Since grape 1.7.0 grape endpoints can return status codes as rack
status code symbols. The symbols are converted to integers by the
Grape error middleware.
This performs the same conversion with `Rack::Utils`. Rack is already
an implicit runtime dependency (and should remain implicit) of the
instrumentation, but has now been added as an explicit development
dependency for the tests.
If the status_code is not valid the status code is assumed to be 0.1 parent bdd4f64 commit cf8982a
File tree
3 files changed
+23
-1
lines changed- instrumentation/grape
- lib/opentelemetry/instrumentation/grape
- test/opentelemetry/instrumentation
3 files changed
+23
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
379 | 398 | | |
380 | 399 | | |
381 | 400 | | |
| |||
0 commit comments