diff --git a/dune b/dune index 815c0f49..1c6b45f6 100644 --- a/dune +++ b/dune @@ -1,3 +1,3 @@ (env (_ - (flags :standard -warn-error -a+8 -strict-sequence))) + (flags :standard -warn-error -a+8 -w +a-4-30-40-41-42-44-70 -strict-sequence))) diff --git a/src/client-cohttp-lwt/common_.ml b/src/client-cohttp-lwt/common_.ml index a082ff1f..091896aa 100644 --- a/src/client-cohttp-lwt/common_.ml +++ b/src/client-cohttp-lwt/common_.ml @@ -1,4 +1,3 @@ -open Lwt.Syntax module Atomic = Opentelemetry_atomic.Atomic let[@inline] ( let@ ) f x = f x diff --git a/src/client-cohttp-lwt/opentelemetry_client_cohttp_lwt.ml b/src/client-cohttp-lwt/opentelemetry_client_cohttp_lwt.ml index 11e93aed..2048db44 100644 --- a/src/client-cohttp-lwt/opentelemetry_client_cohttp_lwt.ml +++ b/src/client-cohttp-lwt/opentelemetry_client_cohttp_lwt.ml @@ -164,16 +164,8 @@ end module Batch : sig type 'a t - val push : 'a t -> 'a -> bool - (** [push batch x] pushes [x] into the batch, and heuristically - returns [true] if the batch is ready to be emitted (to know if we should - wake up the sending thread, if any) *) - val push' : 'a t -> 'a -> unit - val is_ready : now:Mtime.t -> _ t -> bool - (** is the batch ready to be sent? This is heuristic. *) - val pop_if_ready : ?force:bool -> now:Mtime.t -> 'a t -> 'a list option (** Is the batch ready to be emitted? If batching is disabled, this is true as soon as {!is_empty} is false. If a timeout is provided @@ -205,8 +197,6 @@ end = struct high_watermark; } - let is_empty_ self = self.size = 0 - let timeout_expired_ ~now self : bool = match self.timeout with | Some t -> @@ -219,8 +209,6 @@ end = struct | None -> self.size > 0 | Some b -> self.size >= b - let is_ready ~now self : bool = is_full_ self || timeout_expired_ ~now self - let pop_if_ready ?(force = false) ~now (self : _ t) : _ list option = if self.size > 0 && (force || is_full_ self || timeout_expired_ ~now self) then ( diff --git a/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml b/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml index 1b0cf4ab..9adb3902 100644 --- a/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml +++ b/src/integrations/cohttp/opentelemetry_cohttp_lwt.ml @@ -143,7 +143,6 @@ end = struct ?parent:(Option.map (fun scope -> scope.Otel.Trace.span_id) scope) ?links name (fun scope -> - let open Lwt.Syntax in let req = set_trace_context scope req in f req) end @@ -152,7 +151,7 @@ let client ?(scope : Otel.Scope.t option) (module C : Cohttp_lwt.S.Client) = let module Traced = struct open Lwt.Syntax - let attrs_for ~uri ~meth () = + let attrs_for ~uri ~meth:_ () = [ "http.method", `String (Code.string_of_method `GET); "http.url", `String (Uri.to_string uri); diff --git a/src/lwt/opentelemetry_lwt.ml b/src/lwt/opentelemetry_lwt.ml index 8e8524cf..f398b5fd 100644 --- a/src/lwt/opentelemetry_lwt.ml +++ b/src/lwt/opentelemetry_lwt.ml @@ -58,7 +58,6 @@ module Trace = struct end module Metrics = struct - open Proto.Metrics include Metrics end diff --git a/src/opentelemetry.ml b/src/opentelemetry.ml index 8fa159c5..38dc60e4 100644 --- a/src/opentelemetry.ml +++ b/src/opentelemetry.ml @@ -252,8 +252,6 @@ module Trace_id : sig val of_hex : string -> t end = struct - open Proto.Trace - type t = bytes let to_bytes self = self @@ -294,8 +292,6 @@ module Span_id : sig val of_hex : string -> t end = struct - open Proto.Trace - type t = bytes let to_bytes self = self diff --git a/src/thread_local.ml b/src/thread_local.ml index f53fde6e..4c4eadfb 100644 --- a/src/thread_local.ml +++ b/src/thread_local.ml @@ -28,8 +28,6 @@ let[@inline] get_exn (self : _ t) = let[@inline] get self = try Some (get_exn self) with Not_found -> None -let[@inline] get_or ~default self = try get_exn self with Not_found -> default - (* remove reference for the key *) let remove_ref_ self key : unit = while diff --git a/src/trace/opentelemetry_trace.ml b/src/trace/opentelemetry_trace.ml index 16f4ccc4..5078fdc8 100644 --- a/src/trace/opentelemetry_trace.ml +++ b/src/trace/opentelemetry_trace.ml @@ -3,8 +3,6 @@ module TLS = Otel.Thread_local type span = Trace.span -let ( let@ ) = ( @@ ) - (** Table indexed by Trace spans *) module Span_tbl = Hashtbl.Make (struct include Int64 @@ -119,7 +117,7 @@ let collector () : Trace.collector = () - let message ?span ~data msg : unit = + let message ?span ~data:_ msg : unit = (* gather information from context *) let old_scope = Otel.Scope.get_surrounding () in let trace_id = Option.map (fun sc -> sc.Otel.Scope.trace_id) old_scope in