summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r--src/nxt_http_request.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c
index a7e9ff69..417b5a39 100644
--- a/src/nxt_http_request.c
+++ b/src/nxt_http_request.c
@@ -6,6 +6,7 @@
#include <nxt_router.h>
#include <nxt_http.h>
+#include <nxt_otel.h>
static nxt_int_t nxt_http_validate_host(nxt_str_t *host, nxt_mp_t *mp);
@@ -284,6 +285,16 @@ nxt_http_request_create(nxt_task_t *task)
r->tstr_cache.var.pool = mp;
+#if (NXT_HAVE_OTEL)
+ if (nxt_otel_rs_is_init()) {
+ r->otel = nxt_mp_zget(r->mem_pool, sizeof(nxt_otel_state_t));
+ if (nxt_slow_path(r->otel == NULL)) {
+ goto fail;
+ }
+ r->otel->status = NXT_OTEL_INIT_STATE;
+ }
+#endif
+
return r;
fail: