Commit ee15d7b
committed
fix(celery): coerce non-string values to str in CeleryGetter.get()
Celery's Context object copies all message properties as instance attrs,
including numeric fields like timelimit. CeleryGetter.get() wrapped these
in a tuple but didn't convert to str, causing TextMapPropagators to crash
with "TypeError: expected string or bytes-like object, got 'int'" when
calling re.split() in TraceState.from_header().
Coerce non-string, non-iterable values to str before wrapping in a tuple.
Fixes #4359
Signed-off-by: alliasgher <alliasgher123@gmail.com>1 parent e9fed7d commit ee15d7b
1 file changed
Lines changed: 8 additions & 2 deletions
File tree
- instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| |||
0 commit comments