From 9015595026bb383ac10032bc104ebdb509241a96 Mon Sep 17 00:00:00 2001 From: Corentin Leruth Date: Fri, 15 Nov 2024 15:18:45 +0100 Subject: [PATCH] web,otel: add url to span name (#28) --- web.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web.ml b/web.ml index 97a28fb..7cd4ad6 100644 --- a/web.ml +++ b/web.ml @@ -302,9 +302,10 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with ] in let explicit_span = + let span_name = Printf.sprintf "%s %s" action_name url in (* We set the value of `__FUNCTION__` to preserve the build with OCaml < 4.12. *) Possibly_otel.enter_manual_span - ~__FUNCTION__:"Devkit.Web.Http.http_request'" ~__FILE__ ~__LINE__ ~data:describe action_name in + ~__FUNCTION__:"Devkit.Web.Http.http_request'" ~__FILE__ ~__LINE__ ~data:describe span_name in let headers = match Possibly_otel.Traceparent.get_ambient ~explicit_span () with | None -> headers