From 8dbc5d0fb501c968b5e26c297f59ef5a1c6ce9f5 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 30 Sep 2022 14:26:28 -0400 Subject: [PATCH] comments for cohttp --- .../cohttp/opentelemetry_cohttp_lwt.ml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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_ :