summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAva Hahn <a.hahn@f5.com>2025-01-07 15:27:26 -0800
committerAndrew Clayton <a.clayton@nginx.com>2025-01-10 16:33:06 +0000
commitb5db00124153ed4caa84d826d63820c42b1d1f11 (patch)
tree2125b652244bd6797e95a722ba9e382f408ce8e3
parent2dc9a4edaf4ffc9fb43b1d9563ea57c80d889d5a (diff)
downloadunit-b5db00124153ed4caa84d826d63820c42b1d1f11.tar.gz
unit-b5db00124153ed4caa84d826d63820c42b1d1f11.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.c11
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);