mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
comments for cohttp
This commit is contained in:
parent
3dc7d63c7d
commit
8dbc5d0fb5
1 changed files with 11 additions and 9 deletions
|
|
@ -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_ :
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue