package opentelemetry-cohttp-lwt
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Opentelemetry tracing for Cohttp HTTP servers
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.3.tar.gz
md5=aa5caa75abb2dd3b8777aec10f69b220
sha512=63538c716f4938a756b0a2fd89edf213bc4fdd636d0f08473cd822da25f751fc3b4faf57926f45edc2e3df4bd51f04ff10e8eed205f05d8be154dcd848166443
doc/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html
Module Opentelemetry_cohttp_lwt.ServerSource
Source
val 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)
Source
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.
Source
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_.
Set the tracing scope in the custom x-ocaml-otel-traceparent header used by trace and with_.
Strip the custom x-ocaml-otel-traceparent header added by trace and with_.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>