Skip to content

Commit 753e298

Browse files
committed
otel: remove deadcode
The superfluous else condition in nxt_otel_propagate_header was dead code. This commit removes it. Signed-off-by: Ava Hahn <[email protected]>
1 parent d699fb9 commit 753e298

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/nxt_otel.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ nxt_otel_propagate_header(nxt_task_t *task, nxt_http_request_t *r)
6767
* if we didn't inherit a trace id then we need to add the
6868
* traceparent header to the request
6969
*/
70-
} else if (r->otel->trace_id == NULL) {
70+
} else {
7171

7272
nxt_otel_rs_copy_traceparent(traceval, r->otel->trace);
7373

@@ -92,15 +92,6 @@ nxt_otel_propagate_header(nxt_task_t *task, nxt_http_request_t *r)
9292

9393
nxt_otel_rs_add_event_to_trace(r->otel->trace,
9494
&traceparent_name, &traceparent);
95-
96-
/*
97-
* potentially nxt_http_request_error called before headers
98-
* finished parsing
99-
*/
100-
} else {
101-
nxt_log(task, NXT_LOG_DEBUG,
102-
"not propagating tracing headers for missing trace");
103-
return;
10495
}
10596

10697
f = nxt_list_add(r->resp.fields);

0 commit comments

Comments
 (0)