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:
|
Use it like this:
|
||||||
|
|
||||||
let my_server callback =
|
{[
|
||||||
let callback_traced =
|
let my_server callback =
|
||||||
Opentelemetry_cohttp_lwt.Server.trace
|
let callback_traced =
|
||||||
~service_name:"my-service"
|
Opentelemetry_cohttp_lwt.Server.trace
|
||||||
(fun _scope -> callback)
|
~service_name:"my-service"
|
||||||
in
|
(fun _scope -> callback)
|
||||||
Cohttp_lwt_unix.Server.create
|
in
|
||||||
~mode:(`TCP (`Port 8080))
|
Cohttp_lwt_unix.Server.create
|
||||||
(Server.make () ~callback:callback_traced)
|
~mode:(`TCP (`Port 8080))
|
||||||
|
(Server.make () ~callback:callback_traced)
|
||||||
|
]}
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val with_ :
|
val with_ :
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue