From c753eac20b79e74f9648cd713841709174f7903b Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 16 Jun 2022 10:07:41 +0100 Subject: [PATCH] [new release] prometheus and prometheus-app (1.2) CHANGES: - Add lwt collectors and pre-collectors (@killian-delarue, mirage/prometheus#43). Note that this is a temporary feature while we wait for OCaml 5 to be released, when this can be replaced by the use of effects. - Fix deprecations in Fmt 0.8.10 (@MisterDA, mirage/prometheus#36). - General build updates, upstream deprecations, etc (@talex5, mirage/prometheus#33 mirage/prometheus#34 mirage/prometheus#35 mirage/prometheus#40 mirage/prometheus#42). --- packages/current/current.0.4/opam | 2 +- packages/current/current.0.5/opam | 2 +- packages/current/current.0.6.1/opam | 2 +- packages/current/current.0.6/opam | 2 +- .../current_examples.0.4/opam | 2 +- .../current_examples.0.5/opam | 2 +- .../current_examples.0.6.1/opam | 2 +- .../current_examples.0.6/opam | 2 +- packages/current_web/current_web.0.1/opam | 2 +- packages/current_web/current_web.0.2/opam | 2 +- packages/current_web/current_web.0.3/opam | 2 +- packages/current_web/current_web.0.4/opam | 2 +- packages/current_web/current_web.0.5/opam | 2 +- packages/current_web/current_web.0.6.1/opam | 2 +- packages/current_web/current_web.0.6/opam | 2 +- packages/ocluster/ocluster.0.1/opam | 2 +- .../prometheus-app/prometheus-app.1.2/opam | 56 +++++++++++++++++++ packages/prometheus/prometheus.1.2/opam | 39 +++++++++++++ 18 files changed, 111 insertions(+), 16 deletions(-) create mode 100644 packages/prometheus-app/prometheus-app.1.2/opam create mode 100644 packages/prometheus/prometheus.1.2/opam diff --git a/packages/current/current.0.4/opam b/packages/current/current.0.4/opam index 9c8d83fffa0b..49051d62cfdc 100644 --- a/packages/current/current.0.4/opam +++ b/packages/current/current.0.4/opam @@ -36,7 +36,7 @@ depends: [ "fpath" {>= "0.7.3"} "logs" {>= "0.7.0"} "result" {>= "1.5"} - "prometheus-app" {>= "0.7" & with-test} + "prometheus-app" {with-test & >= "0.7" & < "1.2"} ] build: [ ["dune" "build" "-p" name "-j" jobs] diff --git a/packages/current/current.0.5/opam b/packages/current/current.0.5/opam index f5a8c0099ac9..dedd0122fa97 100644 --- a/packages/current/current.0.5/opam +++ b/packages/current/current.0.5/opam @@ -36,7 +36,7 @@ depends: [ "fpath" {>= "0.7.3"} "logs" {>= "0.7.0"} "result" {>= "1.5"} - "prometheus-app" {>= "0.7" & with-test} + "prometheus-app" {with-test & >= "0.7" & < "1.2"} ] conflicts: [ "seq" {< "base"} diff --git a/packages/current/current.0.6.1/opam b/packages/current/current.0.6.1/opam index 6bf909a88124..cee2608d1885 100644 --- a/packages/current/current.0.6.1/opam +++ b/packages/current/current.0.6.1/opam @@ -36,7 +36,7 @@ depends: [ "fpath" {>= "0.7.3"} "logs" {>= "0.7.0"} "result" {>= "1.5"} - "prometheus-app" {>= "0.7" & with-test} + "prometheus-app" {with-test & >= "0.7" & < "1.2"} "conf-libev" {os != "win32"} ] build: [ diff --git a/packages/current/current.0.6/opam b/packages/current/current.0.6/opam index 97f7a4f2e4c9..4a395b89d3d1 100644 --- a/packages/current/current.0.6/opam +++ b/packages/current/current.0.6/opam @@ -36,7 +36,7 @@ depends: [ "fpath" {>= "0.7.3"} "logs" {>= "0.7.0"} "result" {>= "1.5"} - "prometheus-app" {>= "0.7" & with-test} + "prometheus-app" {with-test & >= "0.7" & < "1.2"} "conf-libev" {os != "win32"} ] build: [ diff --git a/packages/current_examples/current_examples.0.4/opam b/packages/current_examples/current_examples.0.4/opam index a18d2b945506..d1c5e771d7fc 100644 --- a/packages/current_examples/current_examples.0.4/opam +++ b/packages/current_examples/current_examples.0.4/opam @@ -38,7 +38,7 @@ depends: [ "routes" {>= "0.8.0"} "uri" {>= "4.0.0"} "yojson" {>= "1.7.0"} - "prometheus-app" {>= "1.0"} + "prometheus-app" {>= "1.0" & < "1.2"} ] build: [ ["dune" "build" "-p" name "-j" jobs] diff --git a/packages/current_examples/current_examples.0.5/opam b/packages/current_examples/current_examples.0.5/opam index 3ae88890c8db..a5bc9bca6a88 100644 --- a/packages/current_examples/current_examples.0.5/opam +++ b/packages/current_examples/current_examples.0.5/opam @@ -38,7 +38,7 @@ depends: [ "routes" {>= "0.8.0"} "uri" {>= "4.0.0"} "yojson" {>= "1.7.0"} - "prometheus-app" {>= "1.0"} + "prometheus-app" {>= "1.0" & < "1.2"} ] build: [ ["dune" "build" "-p" name "-j" jobs] diff --git a/packages/current_examples/current_examples.0.6.1/opam b/packages/current_examples/current_examples.0.6.1/opam index 4055688e8561..80cb5eae8689 100644 --- a/packages/current_examples/current_examples.0.6.1/opam +++ b/packages/current_examples/current_examples.0.6.1/opam @@ -39,7 +39,7 @@ depends: [ "routes" {>= "0.8.0"} "uri" {>= "4.0.0"} "yojson" {>= "1.7.0"} - "prometheus-app" {>= "1.0"} + "prometheus-app" {>= "1.0" & < "1.2"} "mdx" {with-test} ] build: [ diff --git a/packages/current_examples/current_examples.0.6/opam b/packages/current_examples/current_examples.0.6/opam index 52d9bd16451c..55ed842de1f3 100644 --- a/packages/current_examples/current_examples.0.6/opam +++ b/packages/current_examples/current_examples.0.6/opam @@ -39,7 +39,7 @@ depends: [ "routes" {>= "0.8.0"} "uri" {>= "4.0.0"} "yojson" {>= "1.7.0"} - "prometheus-app" {>= "1.0"} + "prometheus-app" {>= "1.0" & < "1.2"} "mdx" {with-test} ] build: [ diff --git a/packages/current_web/current_web.0.1/opam b/packages/current_web/current_web.0.1/opam index 4de97568983d..710f0d1bd6c6 100644 --- a/packages/current_web/current_web.0.1/opam +++ b/packages/current_web/current_web.0.1/opam @@ -23,7 +23,7 @@ depends: [ "bos" "lwt" "cmdliner" - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp-lwt-unix" {>= "2.2.0"} "tyxml" "dune" {>= "1.9"} diff --git a/packages/current_web/current_web.0.2/opam b/packages/current_web/current_web.0.2/opam index bf7143d57d28..3b48dd5c35a4 100644 --- a/packages/current_web/current_web.0.2/opam +++ b/packages/current_web/current_web.0.2/opam @@ -23,7 +23,7 @@ depends: [ "bos" "lwt" "cmdliner" - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp-lwt-unix" {>= "2.2.0"} "tyxml" "routes" {>= "0.7.0" & < "0.8.0"} diff --git a/packages/current_web/current_web.0.3/opam b/packages/current_web/current_web.0.3/opam index d5f77443a688..9b0a29f6c614 100644 --- a/packages/current_web/current_web.0.3/opam +++ b/packages/current_web/current_web.0.3/opam @@ -28,7 +28,7 @@ depends: [ "bos" "lwt" "cmdliner" - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp-lwt-unix" {>= "2.2.0"} "tyxml" "routes" {>= "0.8.0"} diff --git a/packages/current_web/current_web.0.4/opam b/packages/current_web/current_web.0.4/opam index 8929712c2cef..e1045545fe61 100644 --- a/packages/current_web/current_web.0.4/opam +++ b/packages/current_web/current_web.0.4/opam @@ -25,7 +25,7 @@ depends: [ "lwt" "cmdliner" "prometheus" {>= "0.7"} - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp" {>= "2.2.0"} "cohttp-lwt" {>= "2.2.0"} "cohttp-lwt-unix" {>= "2.2.0"} diff --git a/packages/current_web/current_web.0.5/opam b/packages/current_web/current_web.0.5/opam index d1db6978317b..21de9b2d0601 100644 --- a/packages/current_web/current_web.0.5/opam +++ b/packages/current_web/current_web.0.5/opam @@ -25,7 +25,7 @@ depends: [ "lwt" "cmdliner" "prometheus" {>= "0.7"} - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp" {>= "2.2.0"} "cohttp-lwt" {>= "2.2.0"} "cohttp-lwt-unix" {>= "2.2.0"} diff --git a/packages/current_web/current_web.0.6.1/opam b/packages/current_web/current_web.0.6.1/opam index ef8e6f364d3b..b7ea1a2c4396 100644 --- a/packages/current_web/current_web.0.6.1/opam +++ b/packages/current_web/current_web.0.6.1/opam @@ -27,7 +27,7 @@ depends: [ "multipart_form-lwt" {>= "0.4.0"} "cmdliner" {>= "1.1.0"} "prometheus" {>= "0.7"} - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp-lwt-unix" {>= "4.0.0"} "tyxml" {>= "4.4.0"} "csv" {>= "2.4"} diff --git a/packages/current_web/current_web.0.6/opam b/packages/current_web/current_web.0.6/opam index c42ac2074d75..7c3995a2a4db 100644 --- a/packages/current_web/current_web.0.6/opam +++ b/packages/current_web/current_web.0.6/opam @@ -25,7 +25,7 @@ depends: [ "lwt" "cmdliner" {>= "1.1.0"} "prometheus" {>= "0.7"} - "prometheus-app" + "prometheus-app" {< "1.2"} "cohttp-lwt-unix" {>= "4.0.0"} "tyxml" {>= "4.4.0"} "routes" {>= "0.8.0"} diff --git a/packages/ocluster/ocluster.0.1/opam b/packages/ocluster/ocluster.0.1/opam index 76df37f01dd9..ccc2fc34f5ab 100644 --- a/packages/ocluster/ocluster.0.1/opam +++ b/packages/ocluster/ocluster.0.1/opam @@ -30,7 +30,7 @@ depends: [ "digestif" {>= "0.8"} "fpath" "lwt-dllist" - "prometheus-app" {>= "1.0"} + "prometheus-app" {>= "1.0" & < "1.2"} "cohttp-lwt-unix" "sqlite3" "obuilder" diff --git a/packages/prometheus-app/prometheus-app.1.2/opam b/packages/prometheus-app/prometheus-app.1.2/opam new file mode 100644 index 000000000000..8532168ad597 --- /dev/null +++ b/packages/prometheus-app/prometheus-app.1.2/opam @@ -0,0 +1,56 @@ +opam-version: "2.0" +synopsis: "Client library for Prometheus monitoring" +description: """\ +Applications can enable metric reporting using the `prometheus-app` opam package. +This depends on cohttp and can serve the metrics collected above over HTTP. + +The `prometheus-app.unix` ocamlfind library provides the `Prometheus_unix` module, +which includes a cmdliner option and pre-configured web-server. +See the `examples/example.ml` program for an example, which can be run as: + +```shell +$ dune exec -- examples/example.exe --listen-prometheus=9090 +If run with the option --listen-prometheus=9090, this program serves metrics at +http://localhost:9090/metrics +Tick! +Tick! +... +``` + +Unikernels can use `Prometheus_app` instead of `Prometheus_unix` to avoid the `Unix` dependency.""" +maintainer: "talex5@gmail.com" +authors: ["Thomas Leonard" "David Scott"] +license: "Apache-2.0" +homepage: "https://github.com/mirage/prometheus" +doc: "https://mirage.github.io/prometheus/" +bug-reports: "https://github.com/mirage/prometheus/issues" +depends: [ + "ocaml" {>= "4.08"} + "dune" {>= "2.3"} + "prometheus" {= version} + "fmt" {>= "0.8.7"} + "re" + "cohttp-lwt" {>= "4.0.0"} + "cohttp-lwt-unix" {>= "4.0.0"} + "lwt" {>= "2.5.0"} + "cmdliner" + "alcotest" {with-test} + "alcotest-lwt" {with-test} + "asetmap" + "astring" + "logs" {>= "0.6.0"} +] +build: [ + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +dev-repo: "git+https://github.com/mirage/prometheus.git" +url { + src: + "https://github.com/mirage/prometheus/releases/download/v1.2/prometheus-1.2.tbz" + checksum: [ + "sha256=83643a029a6b6de71d14034eee2e94feff1d08755c4a41d583dc1530ab555bcb" + "sha512=bbec7f0728b850b991ec50e76ef2c999341a9469ceaa11b68180f060150c4fe62f3dca87c13914ac331b3d7ef6e46256ae11466b607ecb60d00b8f284cab86b9" + ] +} +x-commit-hash: "d1669d0e0d7e44b104755a0fd9700ae87e140f34" diff --git a/packages/prometheus/prometheus.1.2/opam b/packages/prometheus/prometheus.1.2/opam new file mode 100644 index 000000000000..0ca79ebc6ded --- /dev/null +++ b/packages/prometheus/prometheus.1.2/opam @@ -0,0 +1,39 @@ +opam-version: "2.0" +synopsis: "Client library for Prometheus monitoring" +maintainer: "talex5@gmail.com" +authors: ["Thomas Leonard" "David Scott"] +license: "Apache-2.0" +homepage: "https://github.com/mirage/prometheus" +doc: "https://mirage.github.io/prometheus/" +bug-reports: "https://github.com/mirage/prometheus/issues" +depends: [ + "ocaml" {>= "4.01.0"} + "dune" {>= "2.3"} + "astring" + "asetmap" + "re" + "lwt" {>= "2.5.0"} +] +build: [ + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +dev-repo: "git+https://github.com/mirage/prometheus.git" +description: """ +To run services reliably, it is useful if they can report various metrics +(for example, heap size, queue lengths, number of warnings logged, etc). + +A monitoring service can be configured to collect this data regularly. +The data can be graphed to help understand the performance of the service over time, +or to help debug problems quickly. +It can also be used to send alerts if a service is down or behaving poorly. +""" +url { + src: + "https://github.com/mirage/prometheus/releases/download/v1.2/prometheus-1.2.tbz" + checksum: [ + "sha256=83643a029a6b6de71d14034eee2e94feff1d08755c4a41d583dc1530ab555bcb" + "sha512=bbec7f0728b850b991ec50e76ef2c999341a9469ceaa11b68180f060150c4fe62f3dca87c13914ac331b3d7ef6e46256ae11466b607ecb60d00b8f284cab86b9" + ] +} +x-commit-hash: "d1669d0e0d7e44b104755a0fd9700ae87e140f34"