diff --git a/dev/index.html b/dev/index.html index 3ed9f87e..eb05f051 100644 --- a/dev/index.html +++ b/dev/index.html @@ -13,6 +13,7 @@
diff --git a/dev/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/.dummy b/dev/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/.dummy new file mode 100644 index 00000000..e69de29b diff --git a/dev/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html b/dev/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html new file mode 100644 index 00000000..126a1b19 --- /dev/null +++ b/dev/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html @@ -0,0 +1,27 @@ + +Opentelemetry_cohttp_lwt.Serverval trace :
+ service_name:string ->
+ ?attrs:Otel.Span.key_value list ->
+ ( 'conn ->
+ Cohttp_lwt.Request.t ->
+ 'body ->
+ (Cohttp_lwt.Response.t * 'body) Lwt.t ) ->
+ 'conn ->
+ Cohttp_lwt.Request.t ->
+ 'body ->
+ (Cohttp_lwt.Response.t * 'body) Lwt.tTrace requests to a Cohttp server.
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)
val with_ :
+ ?trace_state:string ->
+ ?service_name:string ->
+ ?attrs:Otel.Span.key_value list ->
+ ?kind:Otel.Span.kind ->
+ ?links:(Otel.Trace_id.t * Otel.Span_id.t * string) list ->
+ string ->
+ Cohttp_lwt.Request.t ->
+ ( Cohttp_lwt.Request.t -> 'a Lwt.t ) ->
+ 'a Lwt.tTrace a new internal span.
Identical to Opentelemetry_lwt.Trace.with_, but fetches/stores the trace scope in the x-ocaml-otel-traceparent header in the request for convenience.
val get_trace_context :
+ ?from:[ `Internal | `External ] ->
+ Cohttp_lwt.Request.t ->
+ Otel.Trace.scope optionGet the tracing scope from the custom x-ocaml-otel-traceparent header added by trace and with_.
val set_trace_context :
+ Otel.Trace.scope ->
+ Cohttp_lwt.Request.t ->
+ Cohttp_lwt.Request.tSet the tracing scope in the custom x-ocaml-otel-traceparent header used by trace and with_.
Opentelemetry_cohttp_lwtThe entry point of this library is the module: Opentelemetry_cohttp_lwt.