diff options
| author | Ava Hahn <a.hahn@f5.com> | 2025-01-07 15:27:26 -0800 |
|---|---|---|
| committer | Konstantin Pavlov <pavlov.konstantin@gmail.com> | 2025-01-10 13:01:46 -0800 |
| commit | c4892fff93841844ed78f85f723d1b383d9f0b38 (patch) | |
| tree | 71eefa88884dac3d5bdd474387b93c2f4684389a | |
| parent | 43130a58c7189384793e89c6f31b3d472a3bbc2d (diff) | |
| download | unit-c4892fff93841844ed78f85f723d1b383d9f0b38.tar.gz unit-c4892fff93841844ed78f85f723d1b383d9f0b38.tar.bz2 | |
otel: remove deadcode
The superfluous else condition in nxt_otel_propagate_header was dead code.
This commit removes it.
Signed-off-by: Ava Hahn <a.hahn@f5.com>
| -rw-r--r-- | src/nxt_otel.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/nxt_otel.c b/src/nxt_otel.c index ef796a7c..38ef02ea 100644 --- a/src/nxt_otel.c +++ b/src/nxt_otel.c @@ -67,7 +67,7 @@ nxt_otel_propagate_header(nxt_task_t *task, nxt_http_request_t *r) * if we didn't inherit a trace id then we need to add the * traceparent header to the request */ - } else if (r->otel->trace_id == NULL) { + } else { nxt_otel_rs_copy_traceparent(traceval, r->otel->trace); @@ -92,15 +92,6 @@ nxt_otel_propagate_header(nxt_task_t *task, nxt_http_request_t *r) nxt_otel_rs_add_event_to_trace(r->otel->trace, &traceparent_name, &traceparent); - - /* - * potentially nxt_http_request_error called before headers - * finished parsing - */ - } else { - nxt_log(task, NXT_LOG_DEBUG, - "not propagating tracing headers for missing trace"); - return; } f = nxt_list_add(r->resp.fields); |
