ocaml-trace
ocaml-trace copied to clipboard
way to enter an implicit context from explicit data
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