diff options
| author | Ava Hahn <a.hahn@f5.com> | 2025-01-07 15:27:26 -0800 |
|---|---|---|
| committer | Ava Hahn <110854134+avahahn@users.noreply.github.com> | 2025-01-08 11:31:06 -0800 |
| commit | 753e298477fb895b2809275baafa2ba9fda18f37 (patch) | |
| tree | 9fb0c8a82d85859e6b66d2cfbe5b8b3e9ed1e48e /src | |
| parent | d699fb9da6858b57d713a0567b4a9fbe47574cbd (diff) | |
| download | unit-753e298477fb895b2809275baafa2ba9fda18f37.tar.gz unit-753e298477fb895b2809275baafa2ba9fda18f37.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>
Diffstat (limited to 'src')
| -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); |
