mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-05-05 08:54:27 -04:00
Compare commits
6 commits
2c52df1fae
...
40b84944a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40b84944a7 | ||
|
|
74022be198 | ||
|
|
c0d949259f | ||
|
|
470a461c82 | ||
|
|
174e9c60ba | ||
|
|
748f2352e4 |
29 changed files with 40 additions and 62 deletions
2
.github/workflows/format.yml
vendored
2
.github/workflows/format.yml
vendored
|
|
@ -25,6 +25,6 @@ jobs:
|
|||
dune-cache: true
|
||||
allow-prerelease-opam: true
|
||||
|
||||
- run: opam install ocamlformat.0.27.0
|
||||
- run: opam install ocamlformat.0.27.0 lwt.6.1.1
|
||||
- run: opam exec -- make format-check
|
||||
|
||||
|
|
|
|||
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
|
|
@ -42,10 +42,8 @@ jobs:
|
|||
allow-prerelease-opam: true
|
||||
|
||||
- run: |
|
||||
opam pin trace https://github.com/ocaml-tracing/ocaml-trace.git#main -y -n
|
||||
opam pin https://github.com/ocaml-tracing/ambient-context.git#HEAD -y -n
|
||||
opam install pbrt.4.0 -y
|
||||
opam install ambient-context
|
||||
opam install ambient-context lwt.5.9.2
|
||||
|
||||
# We cannot install packages that need eio on ocaml versions before 5
|
||||
- run: |
|
||||
|
|
@ -62,6 +60,11 @@ jobs:
|
|||
- run: opam install trace
|
||||
- run: opam exec -- dune build @install -p opentelemetry
|
||||
|
||||
- run: opam install lwt.6.1.1 -y
|
||||
if: ${{ matrix.ocaml-compiler == '5.3.x' }}
|
||||
- run: opam exec -- dune build @install -p opentelemetry,opentelemetry-client,opentelemetry-lwt,opentelemetry-client-cohttp-lwt
|
||||
if: ${{ matrix.ocaml-compiler == '5.3.x' }}
|
||||
|
||||
- run: opam install ocaml-protoc
|
||||
- run: opam exec -- dune build @lint
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(lang dune 2.9)
|
||||
(lang dune 3.11)
|
||||
|
||||
(name opentelemetry)
|
||||
|
||||
|
|
@ -49,8 +49,7 @@
|
|||
(>= 0.27)
|
||||
(< 0.28)))
|
||||
(mtime
|
||||
(>= "1.4"))
|
||||
dune-build-info)
|
||||
(>= "1.4")))
|
||||
(depopts atomic trace thread-local-storage lwt eio picos)
|
||||
(conflicts
|
||||
(trace
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ license: "MIT"
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "5.00"}
|
||||
"mtime" {>= "1.4"}
|
||||
"ca-certs"
|
||||
|
|
@ -37,11 +37,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ license: "MIT"
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"mtime" {>= "1.4"}
|
||||
"opentelemetry" {= version}
|
||||
|
|
@ -37,11 +37,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ license: "MIT"
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"mtime" {>= "1.4"}
|
||||
"opentelemetry" {= version}
|
||||
|
|
@ -33,11 +33,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ license: "MIT"
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"mtime" {>= "1.4"}
|
||||
"opentelemetry" {= version}
|
||||
|
|
@ -31,11 +31,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ tags: ["tracing" "opentelemetry" "sdk"]
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"opentelemetry" {= version}
|
||||
"odoc" {with-doc}
|
||||
"alcotest" {with-test}
|
||||
|
|
@ -28,11 +28,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ license: "MIT"
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"opentelemetry" {= version}
|
||||
"opentelemetry-lwt" {= version}
|
||||
|
|
@ -32,11 +32,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ license: "MIT"
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"opentelemetry" {= version}
|
||||
"odoc" {with-doc}
|
||||
|
|
@ -32,11 +32,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ tags: ["instrumentation" "tracing" "opentelemetry" "datadog" "lwt"]
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"opentelemetry" {= version}
|
||||
"ambient-context-lwt"
|
||||
|
|
@ -32,11 +32,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ tags: ["instrumentation" "tracing" "opentelemetry" "datadog" "jaeger"]
|
|||
homepage: "https://github.com/imandra-ai/ocaml-opentelemetry"
|
||||
bug-reports: "https://github.com/imandra-ai/ocaml-opentelemetry/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.9"}
|
||||
"dune" {>= "3.11"}
|
||||
"ocaml" {>= "4.08"}
|
||||
"ptime"
|
||||
"hmap"
|
||||
|
|
@ -26,7 +26,6 @@ depends: [
|
|||
"ocaml-lsp-server" {with-dev-setup}
|
||||
"ocamlformat" {with-dev-setup & >= "0.27" & < "0.28"}
|
||||
"mtime" {>= "1.4"}
|
||||
"dune-build-info"
|
||||
]
|
||||
depopts: ["atomic" "trace" "thread-local-storage" "lwt" "eio" "picos"]
|
||||
conflicts: [
|
||||
|
|
@ -41,11 +40,9 @@ build: [
|
|||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/imandra-ai/ocaml-opentelemetry.git"
|
||||
|
|
|
|||
|
|
@ -25,3 +25,19 @@
|
|||
mtime.clock.os
|
||||
lwt.unix)
|
||||
(synopsis "Lwt-specific helpers for opentelemetry-client"))
|
||||
|
||||
(rule
|
||||
(enabled_if
|
||||
(and
|
||||
%{lib-available:lwt}
|
||||
(>= %{version:lwt} 6.0)))
|
||||
(action
|
||||
(copy types_.ml.6 types_.ml)))
|
||||
|
||||
(rule
|
||||
(enabled_if
|
||||
(and
|
||||
%{lib-available:lwt}
|
||||
(< %{version:lwt} 6.0)))
|
||||
(action
|
||||
(copy types_.ml.5 types_.ml)))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ module IO = Io_lwt
|
|||
type t = {
|
||||
notified: bool Atomic.t;
|
||||
cond: unit Lwt_condition.t;
|
||||
notification: int;
|
||||
notification: Types_.notification;
|
||||
lwt_tid: int; (** thread ID where lwt runs *)
|
||||
deleted: bool Atomic.t;
|
||||
}
|
||||
|
|
|
|||
2
src/client/lwt/types_.ml.5
Normal file
2
src/client/lwt/types_.ml.5
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
type notification = int
|
||||
2
src/client/lwt/types_.ml.6
Normal file
2
src/client/lwt/types_.ml.6
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
type notification = Lwt_unix.notification
|
||||
|
|
@ -21,7 +21,6 @@
|
|||
(re_export opentelemetry.ambient-context)
|
||||
(re_export opentelemetry.atomic)
|
||||
(re_export hmap)
|
||||
(re_export dune-build-info)
|
||||
mtime
|
||||
mtime.clock.os
|
||||
pbrt
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
let version =
|
||||
match Build_info.V1.version () with
|
||||
| None -> "dev"
|
||||
| Some v -> Build_info.V1.Version.to_string v
|
||||
let version = "%%VERSION%%"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
module OT = Opentelemetry
|
||||
module Otel_lwt = Opentelemetry_lwt
|
||||
|
||||
let spf = Printf.sprintf
|
||||
|
||||
let ( let@ ) f x = f x
|
||||
|
||||
let sleep_inner = ref 0.1
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
module OT = Opentelemetry
|
||||
module Atomic = Opentelemetry_atomic.Atomic
|
||||
|
||||
let spf = Printf.sprintf
|
||||
|
||||
let ( let@ ) = ( @@ )
|
||||
|
||||
let sleep_inner = ref 0.1
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ module T = Opentelemetry_lwt
|
|||
module Atomic = Opentelemetry_atomic.Atomic
|
||||
open Lwt.Syntax
|
||||
|
||||
let spf = Printf.sprintf
|
||||
|
||||
let ( let@ ) f x = f x
|
||||
|
||||
let sleep_inner = ref 0.1
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
module OT = Opentelemetry
|
||||
module Atomic = Opentelemetry_atomic.Atomic
|
||||
|
||||
let spf = Printf.sprintf
|
||||
|
||||
let ( let@ ) f x = f x
|
||||
|
||||
let sleep_inner = ref 0.1
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
module OT = Opentelemetry
|
||||
module Atomic = Opentelemetry_atomic.Atomic
|
||||
|
||||
let spf = Printf.sprintf
|
||||
|
||||
let ( let@ ) = ( @@ )
|
||||
|
||||
let sleep_inner = ref 0.1
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
module OT = Opentelemetry
|
||||
module OTC = Opentelemetry_client
|
||||
|
||||
let spf = Printf.sprintf
|
||||
|
||||
let ( let@ ) = ( @@ )
|
||||
|
||||
let sleep_inner = ref 0.1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
module Client = Opentelemetry_client
|
||||
module Proto = Opentelemetry.Proto
|
||||
open Clients_e2e_lib
|
||||
|
||||
(* NOTE: This port must be different from that used by other integration tests,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
module Client = Opentelemetry_client
|
||||
module Proto = Opentelemetry.Proto
|
||||
open Clients_e2e_lib
|
||||
|
||||
(* NOTE: This port must be different from that used by other integration tests,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
module Client = Opentelemetry_client
|
||||
module Proto = Opentelemetry.Proto
|
||||
open Clients_e2e_lib
|
||||
|
||||
(* NOTE: This port must be different from that used by other integration tests,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
module Client = Opentelemetry_client
|
||||
module Proto = Opentelemetry.Proto
|
||||
open Clients_e2e_lib
|
||||
|
||||
(* NOTE: This port must be different from that used by other integration tests,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
module OT = Opentelemetry
|
||||
module C = Opentelemetry_client_ocurl_lwt
|
||||
|
||||
let () =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue