diff --git a/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml b/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml index 4938cd47..1b0cf4ab 100644 --- a/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml +++ b/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml @@ -16,15 +16,17 @@ module Server : sig Use it like this: - let my_server callback = - let callback_traced = - Opentelemetry_cohttp_lwt.Server.trace - ~service_name:"my-service" - (fun _scope -> callback) - in - Cohttp_lwt_unix.Server.create - ~mode:(`TCP (`Port 8080)) - (Server.make () ~callback:callback_traced) + {[ + let my_server callback = + let callback_traced = + Opentelemetry_cohttp_lwt.Server.trace + ~service_name:"my-service" + (fun _scope -> callback) + in + Cohttp_lwt_unix.Server.create + ~mode:(`TCP (`Port 8080)) + (Server.make () ~callback:callback_traced) + ]} *) val with_ :