ocaml-trace icon indicating copy to clipboard operation
ocaml-trace copied to clipboard

way to enter an implicit context from explicit data

Open c-cube opened this issue 2 years ago • 0 comments

say you receive via HTTP a trace-id/span ID and want to process that request synchronously using the implicit with_span interface. There needs to be a way to associate the incoming contextual information with the current scope, without necessarily entering a fresh new span from it.

Something like

val with_enter_implicit_context : span -> (unit -> 'a) -> 'a

and then you're inside that span. It works with an explicit span too because these contain a regular span.

cc @ELLIOTTCABLE

c-cube avatar Sep 15 '23 14:09 c-cube