Skip to content

Commit 9015595

Browse files
authored
web,otel: add url to span name (#28)
1 parent 6ea2ff0 commit 9015595

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,10 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with
302302
]
303303
in
304304
let explicit_span =
305+
let span_name = Printf.sprintf "%s %s" action_name url in
305306
(* We set the value of `__FUNCTION__` to preserve the build with OCaml < 4.12. *)
306307
Possibly_otel.enter_manual_span
307-
~__FUNCTION__:"Devkit.Web.Http.http_request'" ~__FILE__ ~__LINE__ ~data:describe action_name in
308+
~__FUNCTION__:"Devkit.Web.Http.http_request'" ~__FILE__ ~__LINE__ ~data:describe span_name in
308309

309310
let headers = match Possibly_otel.Traceparent.get_ambient ~explicit_span () with
310311
| None -> headers

0 commit comments

Comments
 (0)