From cfdabef027ceefbc41252caabce1c99ba9094836 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 27 May 2020 23:36:49 +0200 Subject: [PATCH 1/3] add prometheus metrics module Exposes the http server and metric definitions which can be used by the services to expose prometheus in the background. --- Cargo.lock | 365 ++++++++++++++++++++++++++++++++++++++++++ ofborg/Cargo.toml | 3 + ofborg/src/lib.rs | 1 + ofborg/src/metrics.rs | 45 ++++++ 4 files changed, 414 insertions(+) create mode 100644 ofborg/src/metrics.rs diff --git a/Cargo.lock b/Cargo.lock index c557dfc8..e7489cf2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,17 +83,51 @@ name = "antidote" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "anyhow" +version = "1.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "arrayvec" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "async-h1" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-pool 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "http-types 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "async-sse" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-types 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "async-std" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "async-task 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "broadcaster 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -189,6 +223,28 @@ dependencies = [ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "broadcaster" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byte-pool" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "byte-tools" version = "0.3.1" @@ -227,6 +283,15 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cookie" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cookie-factory" version = "0.3.1" @@ -279,6 +344,15 @@ dependencies = [ "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-queue" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.7.2" @@ -289,6 +363,11 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "data-encoding" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "digest" version = "0.8.1" @@ -315,11 +394,25 @@ dependencies = [ "backtrace 0.3.48 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "error-chain" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.48 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "foreign-types" version = "0.3.2" @@ -372,6 +465,15 @@ name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures-channel" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "futures-core" version = "0.3.5" @@ -382,11 +484,51 @@ name = "futures-io" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-sink" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "futures-timer" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures-util" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "generic-array" version = "0.12.3" @@ -431,6 +573,40 @@ dependencies = [ "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "http-service" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-types 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http-service-h1" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "async-h1 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-service 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-types 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "infer 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "omnom 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "httparse" version = "1.3.4" @@ -499,6 +675,14 @@ dependencies = [ "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "infer" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "iovec" version = "0.1.4" @@ -659,6 +843,20 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime_guess" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mio" version = "0.6.22" @@ -817,15 +1015,18 @@ dependencies = [ "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-native-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lapin 1.0.0-rc6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "prometheus 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "separator 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", "sys-info 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tide 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "tracing 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tracing-subscriber 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -839,6 +1040,14 @@ dependencies = [ "ofborg 0.1.9", ] +[[package]] +name = "omnom" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "once_cell" version = "1.4.0" @@ -960,6 +1169,24 @@ dependencies = [ "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pin-project" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pin-project-lite" version = "0.1.5" @@ -990,6 +1217,16 @@ name = "ppv-lite86" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "proc-macro-hack" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "proc-macro-nested" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "proc-macro2" version = "1.0.17" @@ -998,6 +1235,24 @@ dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "prometheus" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "protobuf" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "quick-error" version = "1.2.3" @@ -1128,6 +1383,11 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "route-recognizer" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc-demangle" version = "0.1.16" @@ -1211,6 +1471,17 @@ dependencies = [ "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_qs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "data-encoding 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sha-1" version = "0.8.2" @@ -1251,6 +1522,16 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "static_assertions" version = "1.1.0" @@ -1311,6 +1592,24 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "thiserror" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "thiserror-impl 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "thread_local" version = "1.0.1" @@ -1319,6 +1618,28 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tide" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "async-sse 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "http-service 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-service-h1 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-types 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kv-log-macro 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_qs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "time" version = "0.1.43" @@ -1422,6 +1743,14 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -1539,7 +1868,10 @@ dependencies = [ "checksum amq-protocol-uri 6.0.0-rc7 (registry+https://github.com/rust-lang/crates.io-index)" = "7b891342708e4ed231278ef5bb8ccccf6ca1542fc56d02e7a1cff548ac2ad215" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" +"checksum anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +"checksum async-h1 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "effd501febce09534b924aa471e6a7fd689071fee63659473413f62a1979ae56" +"checksum async-sse 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6de73294dd1287b32b10f4c884186446353048f183071dff38c1481f82c053b3" "checksum async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" "checksum async-task 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0ac2c016b079e771204030951c366db398864f5026f84a44dafb0ff20f02085d" "checksum async-task 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c17772156ef2829aadc587461c7753af20b7e8db1529bc66855add962a3b35d3" @@ -1551,24 +1883,31 @@ dependencies = [ "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum broadcaster 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" +"checksum byte-pool 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9342e102eac8b1879fbedf9a7e0572c40b0cc5805b663c4d4ca791cae0bae221" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)" = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum cookie-factory 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41f21b581d2f0cb891554812435667bb9610d74feb1a4c6415bf09c28ff0381d" "checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" "checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" "checksum crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" "checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" "checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +"checksum data-encoding 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" +"checksum error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum frank_jwt 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cbb16e02df0e4d50ba30bda5ce2a8a781217858f3512578a64a425803327d77f" @@ -1576,20 +1915,29 @@ dependencies = [ "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" "checksum futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" "checksum futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" +"checksum futures-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" +"checksum futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" +"checksum futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" "checksum futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" +"checksum futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum gimli 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" "checksum handlebars 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ba758d094d31274eb49d15da6f326b96bf3185239a6359bf684f3d5321148900" "checksum hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" +"checksum http-service 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c574f90a9567a12b72e9071ab541704ce8d2bea45a950c33991556a1880cd32" +"checksum http-service-h1 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b10c11288f86378ecdab7d468e5313304f8dfcffee3107f151f946e3b00271df" +"checksum http-types 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05af75a78dfeb163d472b1d27bebb6a8845917a069accdf53a9bed47aaff9bfc" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum hubcaps 0.3.16 (git+https://github.com/grahamc/hubcaps.git)" = "" "checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" "checksum hyper-native-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d375598f442742b0e66208ee12501391f1c7ac0bafb90b4fe53018f81f06068" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +"checksum infer 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d55c406a76164eb346a829ed4b97b73cb06259078eca01adeb12e8ca308d4123" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" @@ -1612,6 +1960,8 @@ dependencies = [ "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum memoffset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" "checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" "checksum mio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e9971bc8349a361217a8f2a41f5d011274686bd4436465ba51730921039d7fb" "checksum mio-uds 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" @@ -1626,6 +1976,7 @@ dependencies = [ "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" "checksum object 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" +"checksum omnom 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6b216cee2e0d6e680f73158d15468c80b39e571c11669cd90556f9a644e9fd3" "checksum once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum openssl 0.10.29 (registry+https://github.com/rust-lang/crates.io-index)" = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" @@ -1640,12 +1991,18 @@ dependencies = [ "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" "checksum pest_generator 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" "checksum pest_meta 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +"checksum pin-project 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "edc93aeee735e60ecb40cf740eb319ff23eab1c5748abfdb5c180e4ce49f7791" +"checksum pin-project-internal 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "e58db2081ba5b4c93bd6be09c40fd36cb9193a8336c384f3b40012e531aa7e40" "checksum pin-project-lite 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" "checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" "checksum pinky-swear 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "071f064dfa28151beb3a0b6aad0daad62b20d5c801132c9d4b366c5245685504" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +"checksum proc-macro-hack 0.5.16 (registry+https://github.com/rust-lang/crates.io-index)" = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" +"checksum proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" "checksum proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "1502d12e458c49a4c9cbff560d0fe0060c252bc29799ed94ca2ed4bb665a0101" +"checksum prometheus 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20" +"checksum protobuf 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e86d370532557ae7573551a1ec8235a0f8d6cb276c7c9e6aa490b511c447485" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" @@ -1662,6 +2019,7 @@ dependencies = [ "checksum regex-automata 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" "checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ea509065eb0b3c446acdd0102f0d46567dc30902dc0be91d6552035d92b0f4f8" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" @@ -1673,18 +2031,24 @@ dependencies = [ "checksum serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)" = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" "checksum serde_derive 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)" = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" "checksum serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)" = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" +"checksum serde_qs 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d43eef44996bbe16e99ac720e1577eefa16f7b76b5172165c98ced20ae9903e1" "checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum sharded-slab 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "06d5a3f5166fb5b42a5439f2eee8b9de149e235961e3eb21c5808fc3ea17ff3e" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" "checksum socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" "checksum syn 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)" = "95b5f192649e48a5302a13f2feb224df883b98933222369e4b3b0fe2a5447269" "checksum sys-info 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "58283a48c9212afcade2069f8bbf7ded6a7bdbf4888d2defba72244c8e5f423c" "checksum tcp-stream 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3bf936a66fc83b53e50a754b2dc3ca607c1149710b5e96f0546e053a9764303e" "checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum thiserror 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b13f926965ad00595dd129fa12823b04bbf866e9085ab0a5f2b05b850fbfc344" +"checksum thiserror-impl 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +"checksum tide 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf955af2fe3c761498002bd8d0b677795a262a62fc761968d5de7e4de7912a99" "checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" "checksum tracing 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c6b59d116d218cb2d990eb06b77b64043e0268ef7323aae63d8b30ae462923" "checksum tracing-attributes 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c" @@ -1697,6 +2061,7 @@ dependencies = [ "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" "checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" diff --git a/ofborg/Cargo.toml b/ofborg/Cargo.toml index b852d96a..fe6b75c2 100644 --- a/ofborg/Cargo.toml +++ b/ofborg/Cargo.toml @@ -28,3 +28,6 @@ separator = "0.4.1" async-std = "=1.5.0" lapin = "1.0.0-rc6" +lazy_static = "1.4.0" +prometheus = "0.8" +tide = "0.8.0" diff --git a/ofborg/src/lib.rs b/ofborg/src/lib.rs index 35928c3c..3e38fbd1 100644 --- a/ofborg/src/lib.rs +++ b/ofborg/src/lib.rs @@ -31,6 +31,7 @@ pub mod ghevent; pub mod locks; pub mod maintainers; pub mod message; +pub mod metrics; pub mod nix; pub mod nixenv; pub mod nixstats; diff --git a/ofborg/src/metrics.rs b/ofborg/src/metrics.rs new file mode 100644 index 00000000..302b95ff --- /dev/null +++ b/ofborg/src/metrics.rs @@ -0,0 +1,45 @@ +use std::env; + +use async_std::task; +use lazy_static::lazy_static; +use prometheus::{ + register_counter_vec, register_gauge_vec, register_int_counter, CounterVec, Encoder, GaugeVec, + IntCounter, TextEncoder, +}; +use tide::http::StatusCode; +use tide::{Body, Request, Response}; +use tracing::info; + +use crate::ofborg; + +lazy_static! { + static ref VERSION: GaugeVec = register_gauge_vec!( + "ofborg_version", + "Labeled OfBorg version information.", + &["version"] + ) + .unwrap(); +} + +pub fn spawn_server() { + let port = env::var("METRICS_PORT").unwrap_or_else(|_err| String::from("9128")); + + let mut server = tide::new(); + server.at("/metrics").get(metrics); + + // Initialize version metric. + VERSION.with_label_values(&[ofborg::VERSION]).set(1_f64); + + info!("Listening on http://127.0.0.1:{}/metrics", port); + task::spawn(server.listen(format!("0.0.0.0:{}", port))); +} + +async fn metrics(mut _req: Request<()>) -> Result { + let encoder = TextEncoder::new(); + let metric_families = prometheus::gather(); + let mut buffer = vec![]; + encoder.encode(&metric_families, &mut buffer)?; + + let resp = Response::new(StatusCode::Ok).body(Body::from(buffer)); + Ok(resp) +} From 1e5d3ef10eff935642bd81d4685249ed6cda7ecf Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 28 May 2020 00:20:33 +0200 Subject: [PATCH 2/3] add crates --- Cargo.nix | 1010 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1002 insertions(+), 8 deletions(-) diff --git a/Cargo.nix b/Cargo.nix index 8eb76b00..2b58a5bb 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -319,6 +319,19 @@ rec { ]; }; + "anyhow" = rec { + crateName = "anyhow"; + version = "1.0.31"; + edition = "2018"; + sha256 = "0pqrpvlaicjpaf5zfqgwq1rg39gfvqhs9sz6a1acm5zc13671fw5"; + authors = [ + "David Tolnay " + ]; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "arrayvec" = rec { crateName = "arrayvec"; version = "0.5.1"; @@ -332,6 +345,103 @@ rec { }; resolvedDefaultFeatures = [ "array-sizes-33-128" "default" "std" ]; }; + "async-h1" = rec { + crateName = "async-h1"; + version = "1.1.2"; + edition = "2018"; + sha256 = "0mmfg4cjmxhk6i3mjdp6zrqr0s7xlzk7392aj95m62ffxcgm1zgg"; + authors = [ + "Yoshua Wuyts " + ]; + dependencies = [ + { + name = "async-std"; + packageId = "async-std"; + features = [ "unstable" ]; + } + { + name = "byte-pool"; + packageId = "byte-pool"; + } + { + name = "futures-core"; + packageId = "futures-core"; + } + { + name = "http-types"; + packageId = "http-types"; + } + { + name = "httparse"; + packageId = "httparse"; + } + { + name = "lazy_static"; + packageId = "lazy_static"; + } + { + name = "log"; + packageId = "log 0.4.8"; + } + { + name = "pin-project-lite"; + packageId = "pin-project-lite"; + } + { + name = "url"; + packageId = "url 2.1.1"; + } + ]; + devDependencies = [ + { + name = "async-std"; + packageId = "async-std"; + features = [ "unstable" "attributes" ]; + } + ]; + + }; + "async-sse" = rec { + crateName = "async-sse"; + version = "2.1.0"; + edition = "2018"; + sha256 = "1cskq211yj6173zis1w3y5430da6chc89j7l20mv71qjvna35rvd"; + authors = [ + "Renée Kooi " + "Yoshua Wuyts " + ]; + dependencies = [ + { + name = "async-std"; + packageId = "async-std"; + features = [ "unstable" ]; + } + { + name = "http-types"; + packageId = "http-types"; + } + { + name = "log"; + packageId = "log 0.4.8"; + } + { + name = "memchr"; + packageId = "memchr"; + } + { + name = "pin-project-lite"; + packageId = "pin-project-lite"; + } + ]; + devDependencies = [ + { + name = "async-std"; + packageId = "async-std"; + features = [ "attributes" "unstable" ]; + } + ]; + + }; "async-std" = rec { crateName = "async-std"; version = "1.5.0"; @@ -348,6 +458,11 @@ rec { packageId = "async-task 1.3.1"; optional = true; } + { + name = "broadcaster"; + packageId = "broadcaster"; + optional = true; + } { name = "crossbeam-channel"; packageId = "crossbeam-channel"; @@ -437,7 +552,7 @@ rec { "std" = [ "crossbeam-utils" "futures-core" "futures-io" "memchr" "once_cell" "pin-project-lite" "pin-utils" "slab" ]; "unstable" = [ "std" "broadcaster" "futures-timer" ]; }; - resolvedDefaultFeatures = [ "async-task" "crossbeam-channel" "crossbeam-deque" "crossbeam-utils" "default" "futures-core" "futures-io" "futures-timer" "kv-log-macro" "log" "memchr" "mio" "mio-uds" "num_cpus" "once_cell" "pin-project-lite" "pin-utils" "slab" "std" ]; + resolvedDefaultFeatures = [ "async-task" "broadcaster" "crossbeam-channel" "crossbeam-deque" "crossbeam-utils" "default" "futures-core" "futures-io" "futures-timer" "kv-log-macro" "log" "memchr" "mio" "mio-uds" "num_cpus" "once_cell" "pin-project-lite" "pin-utils" "slab" "std" "unstable" ]; }; "async-task 1.3.1" = rec { crateName = "async-task"; @@ -641,6 +756,73 @@ rec { ]; }; + "broadcaster" = rec { + crateName = "broadcaster"; + version = "1.0.0"; + edition = "2018"; + sha256 = "11xx4v0y9fdajqrsrmdwi9xgwh89hypdmr3krwv5l18d3vi75jfr"; + authors = [ + "leo60228 " + ]; + dependencies = [ + { + name = "futures-channel"; + packageId = "futures-channel"; + optional = true; + features = [ "sink" ]; + } + { + name = "futures-core"; + packageId = "futures-core"; + } + { + name = "futures-sink"; + packageId = "futures-sink"; + } + { + name = "futures-util"; + packageId = "futures-util"; + features = [ "sink" ]; + } + { + name = "parking_lot"; + packageId = "parking_lot"; + optional = true; + } + { + name = "slab"; + packageId = "slab"; + } + ]; + features = { + "default" = [ "default-channels" "parking-lot" ]; + "default-channels" = [ "futures-channel" ]; + "parking-lot" = [ "parking_lot" ]; + }; + resolvedDefaultFeatures = [ "default" "default-channels" "futures-channel" "parking-lot" "parking_lot" ]; + }; + "byte-pool" = rec { + crateName = "byte-pool"; + version = "0.2.1"; + edition = "2018"; + sha256 = "08g2pbhcm4d79i6kqrjvh32hq2y4f82px6nzpsgqgcf8x81f2hlk"; + authors = [ + "dignifiedquire " + ]; + dependencies = [ + { + name = "crossbeam-queue"; + packageId = "crossbeam-queue"; + } + { + name = "stable_deref_trait"; + packageId = "stable_deref_trait"; + } + ]; + features = { + }; + resolvedDefaultFeatures = [ "default" ]; + }; "byte-tools" = rec { crateName = "byte-tools"; version = "0.3.1"; @@ -743,6 +925,32 @@ rec { }; resolvedDefaultFeatures = [ "bitflags" "default" ]; }; + "cookie" = rec { + crateName = "cookie"; + version = "0.12.0"; + edition = "2015"; + sha256 = "1mdvqixahcywvqp0y8k2skkgbpfhsp0w73l9mz93dcrx1gq091l8"; + authors = [ + "Alex Crichton " + "Sergio Benitez " + ]; + dependencies = [ + { + name = "time"; + packageId = "time"; + } + { + name = "url"; + packageId = "url 1.7.2"; + optional = true; + } + ]; + features = { + "percent-encode" = [ "url" ]; + "secure" = [ "ring" "base64" ]; + }; + resolvedDefaultFeatures = [ "percent-encode" "url" ]; + }; "cookie-factory" = rec { crateName = "cookie-factory"; version = "0.3.1"; @@ -888,6 +1096,32 @@ rec { }; resolvedDefaultFeatures = [ "default" "lazy_static" "std" ]; }; + "crossbeam-queue" = rec { + crateName = "crossbeam-queue"; + version = "0.2.1"; + edition = "2015"; + sha256 = "1nwkjh185bdwjrv1zj2g7an9lglv8sp4459268m4fwvi3v5fx5f6"; + authors = [ + "The Crossbeam Project Developers" + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "crossbeam-utils"; + packageId = "crossbeam-utils"; + usesDefaultFeatures = false; + } + ]; + features = { + "alloc" = [ "crossbeam-utils/alloc" ]; + "default" = [ "std" ]; + "std" = [ "crossbeam-utils/std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "crossbeam-utils" = rec { crateName = "crossbeam-utils"; version = "0.7.2"; @@ -919,6 +1153,20 @@ rec { }; resolvedDefaultFeatures = [ "default" "lazy_static" "std" ]; }; + "data-encoding" = rec { + crateName = "data-encoding"; + version = "2.2.1"; + edition = "2018"; + sha256 = "0sdx3pagijwd9dqgxnrn2g88qqaj475bf71bi9yxvs7s9p019akj"; + authors = [ + "Julien Cretin " + ]; + features = { + "default" = [ "std" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" ]; + }; "digest" = rec { crateName = "digest"; version = "0.8.1"; @@ -962,7 +1210,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "use_std" ]; }; - "error-chain" = rec { + "error-chain 0.10.0" = rec { crateName = "error-chain"; version = "0.10.0"; edition = "2015"; @@ -985,6 +1233,36 @@ rec { }; resolvedDefaultFeatures = [ "backtrace" "default" "example_generated" ]; }; + "error-chain 0.12.2" = rec { + crateName = "error-chain"; + version = "0.12.2"; + edition = "2015"; + sha256 = "1ka5y0fmymxzx3gz2yrd7rpz2i555m1iw4fpmcggpzcgr1n10wfk"; + authors = [ + "Brian Anderson " + "Paul Colomiets " + "Colin Kiegel " + "Yamakaky " + "Andrew Gauger " + ]; + dependencies = [ + { + name = "backtrace"; + packageId = "backtrace"; + optional = true; + } + ]; + buildDependencies = [ + { + name = "version_check"; + packageId = "version_check 0.9.2"; + } + ]; + features = { + "default" = [ "backtrace" "example_generated" ]; + }; + resolvedDefaultFeatures = [ "backtrace" "default" "example_generated" ]; + }; "fake-simd" = rec { crateName = "fake-simd"; version = "0.1.2"; @@ -995,6 +1273,20 @@ rec { ]; }; + "fnv" = rec { + crateName = "fnv"; + version = "1.0.7"; + edition = "2015"; + sha256 = "1hc2mcqha06aibcaza94vbi81j6pr9a1bbxrxjfhc91zin8yr7iz"; + libPath = "lib.rs"; + authors = [ + "Alex Crichton " + ]; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "foreign-types" = rec { crateName = "foreign-types"; version = "0.3.2"; @@ -1112,6 +1404,37 @@ rec { ]; }; + "futures-channel" = rec { + crateName = "futures-channel"; + version = "0.3.5"; + edition = "2018"; + sha256 = "1mb756zxpgrsr0lxkgl358jlpyrwi0i68pnrasj6pjlcq9sasrpk"; + authors = [ + "Alex Crichton " + ]; + dependencies = [ + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + { + name = "futures-sink"; + packageId = "futures-sink"; + optional = true; + usesDefaultFeatures = false; + } + ]; + features = { + "alloc" = [ "futures-core/alloc" ]; + "cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" ]; + "default" = [ "std" ]; + "sink" = [ "futures-sink" ]; + "std" = [ "alloc" "futures-core/std" ]; + "unstable" = [ "futures-core/unstable" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "futures-sink" "sink" "std" ]; + }; "futures-core" = rec { crateName = "futures-core"; version = "0.3.5"; @@ -1139,6 +1462,74 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; + "futures-macro" = rec { + crateName = "futures-macro"; + version = "0.3.5"; + edition = "2018"; + sha256 = "0f8d4kmdxx0h7nca90zdpnbk429w6d3w8dw2hxrm9ar88c5a7dfh"; + procMacro = true; + authors = [ + "Taylor Cramer " + "Taiki Endo " + ]; + dependencies = [ + { + name = "proc-macro-hack"; + packageId = "proc-macro-hack"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn"; + features = [ "full" ]; + } + ]; + + }; + "futures-sink" = rec { + crateName = "futures-sink"; + version = "0.3.5"; + edition = "2018"; + sha256 = "1k4azaq6x7g9kmpvc91vx5w541y4p340rkl5bnhcfd5p7j4k481z"; + authors = [ + "Alex Crichton " + ]; + features = { + "default" = [ "std" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" ]; + }; + "futures-task" = rec { + crateName = "futures-task"; + version = "0.3.5"; + edition = "2018"; + sha256 = "09m647nghwsg46ckys2846jfga6fbdwgfc08mfqij87215gnpdmx"; + authors = [ + "Alex Crichton " + ]; + dependencies = [ + { + name = "once_cell"; + packageId = "once_cell"; + optional = true; + usesDefaultFeatures = false; + features = [ "std" ]; + } + ]; + features = { + "default" = [ "std" ]; + "std" = [ "alloc" "once_cell" ]; + }; + resolvedDefaultFeatures = [ "alloc" "once_cell" "std" ]; + }; "futures-timer" = rec { crateName = "futures-timer"; version = "2.0.2"; @@ -1149,6 +1540,78 @@ rec { ]; }; + "futures-util" = rec { + crateName = "futures-util"; + version = "0.3.5"; + edition = "2018"; + sha256 = "1iijrqcamgll0h0r6ww9mh3ln4292c1wghw28h41lw4by17mfr47"; + authors = [ + "Alex Crichton " + ]; + dependencies = [ + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + { + name = "futures-macro"; + packageId = "futures-macro"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "futures-sink"; + packageId = "futures-sink"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "futures-task"; + packageId = "futures-task"; + usesDefaultFeatures = false; + } + { + name = "pin-project"; + packageId = "pin-project"; + } + { + name = "pin-utils"; + packageId = "pin-utils"; + } + { + name = "proc-macro-hack"; + packageId = "proc-macro-hack"; + optional = true; + } + { + name = "proc-macro-nested"; + packageId = "proc-macro-nested"; + optional = true; + } + { + name = "slab"; + packageId = "slab"; + optional = true; + } + ]; + features = { + "alloc" = [ "futures-core/alloc" "futures-task/alloc" ]; + "async-await-macro" = [ "async-await" "futures-macro" "proc-macro-hack" "proc-macro-nested" ]; + "cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" "futures-task/cfg-target-has-atomic" ]; + "channel" = [ "std" "futures-channel" ]; + "compat" = [ "std" "futures_01" ]; + "default" = [ "std" "async-await" "async-await-macro" ]; + "io" = [ "std" "futures-io" "memchr" ]; + "io-compat" = [ "io" "compat" "tokio-io" ]; + "read-initializer" = [ "io" "futures-io/read-initializer" "futures-io/unstable" ]; + "sink" = [ "futures-sink" ]; + "std" = [ "alloc" "futures-core/std" "futures-task/std" "slab" ]; + "unstable" = [ "futures-core/unstable" "futures-task/unstable" ]; + "write-all-vectored" = [ "io" ]; + }; + resolvedDefaultFeatures = [ "alloc" "async-await" "async-await-macro" "default" "futures-macro" "futures-sink" "proc-macro-hack" "proc-macro-nested" "sink" "slab" "std" ]; + }; "generic-array" = rec { crateName = "generic-array"; version = "0.12.3"; @@ -1274,6 +1737,107 @@ rec { }; resolvedDefaultFeatures = [ "default" ]; }; + "http-service" = rec { + crateName = "http-service"; + version = "0.5.0"; + edition = "2018"; + sha256 = "0cndh0c6lmci771m1aa5x8mqvkh42xaanwch5svi4yjnm684ymrc"; + authors = [ + "Aaron Turon " + "Yoshua Wuyts " + ]; + dependencies = [ + { + name = "async-std"; + packageId = "async-std"; + usesDefaultFeatures = false; + features = [ "std" ]; + } + { + name = "http-types"; + packageId = "http-types"; + } + ]; + + }; + "http-service-h1" = rec { + crateName = "http-service-h1"; + version = "0.1.0"; + edition = "2018"; + sha256 = "1pvi0aqf6ipra7qhfcgfzzy8skrh2d9qwikxmg6qwdw6iwl1235i"; + authors = [ + "dignifiedquire " + ]; + dependencies = [ + { + name = "async-h1"; + packageId = "async-h1"; + } + { + name = "async-std"; + packageId = "async-std"; + usesDefaultFeatures = false; + features = [ "std" ]; + } + { + name = "http-service"; + packageId = "http-service"; + } + { + name = "http-types"; + packageId = "http-types"; + } + ]; + features = { + "default" = [ "runtime" ]; + "runtime" = [ "async-std/default" ]; + }; + resolvedDefaultFeatures = [ "default" "runtime" ]; + }; + "http-types" = rec { + crateName = "http-types"; + version = "1.2.0"; + edition = "2018"; + sha256 = "1z4vzym4gvcv7bswvb39l0bmk158nvmpplmifba67cgyinkpbbq5"; + authors = [ + "Yoshua Wuyts " + ]; + dependencies = [ + { + name = "anyhow"; + packageId = "anyhow"; + } + { + name = "async-std"; + packageId = "async-std"; + features = [ "unstable" ]; + } + { + name = "cookie"; + packageId = "cookie"; + } + { + name = "infer"; + packageId = "infer"; + } + { + name = "omnom"; + packageId = "omnom"; + } + { + name = "pin-project-lite"; + packageId = "pin-project-lite"; + } + { + name = "url"; + packageId = "url 2.1.1"; + } + ]; + features = { + "hyperium_http" = [ "http" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; "httparse" = rec { crateName = "httparse"; version = "1.3.4"; @@ -1303,7 +1867,7 @@ rec { dependencies = [ { name = "error-chain"; - packageId = "error-chain"; + packageId = "error-chain 0.10.0"; } { name = "frank_jwt"; @@ -1364,7 +1928,7 @@ rec { } { name = "mime"; - packageId = "mime"; + packageId = "mime 0.2.6"; } { name = "num_cpus"; @@ -1384,7 +1948,7 @@ rec { } { name = "unicase"; - packageId = "unicase"; + packageId = "unicase 1.4.2"; } { name = "url"; @@ -1465,6 +2029,22 @@ rec { } ]; + }; + "infer" = rec { + crateName = "infer"; + version = "0.1.6"; + edition = "2018"; + sha256 = "08s1ilqcms0jxfnh3jlf0xcn5c1wnyblpv99m13b6khnfrm40p6m"; + authors = [ + "Bojan " + ]; + dependencies = [ + { + name = "byteorder"; + packageId = "byteorder"; + } + ]; + }; "iovec" = rec { crateName = "iovec"; @@ -1880,7 +2460,7 @@ rec { }; resolvedDefaultFeatures = [ "default" ]; }; - "mime" = rec { + "mime 0.2.6" = rec { crateName = "mime"; version = "0.2.6"; edition = "2015"; @@ -1898,6 +2478,45 @@ rec { "heap_size" = [ "heapsize" ]; }; }; + "mime 0.3.16" = rec { + crateName = "mime"; + version = "0.3.16"; + edition = "2015"; + sha256 = "13dcm9lh01hdwfjcg74ppljyjfj1c6w3a3cwkhxf0w8wa37cfq1a"; + authors = [ + "Sean McArthur " + ]; + + }; + "mime_guess" = rec { + crateName = "mime_guess"; + version = "2.0.3"; + edition = "2015"; + sha256 = "04pjpbl90z4yn0cmifvwgf4mqznciw6b095k626q96bxx71d9116"; + authors = [ + "Austin Bonander " + ]; + dependencies = [ + { + name = "mime"; + packageId = "mime 0.3.16"; + } + { + name = "unicase"; + packageId = "unicase 2.6.0"; + } + ]; + buildDependencies = [ + { + name = "unicase"; + packageId = "unicase 2.6.0"; + } + ]; + features = { + "default" = [ "rev-mappings" ]; + }; + resolvedDefaultFeatures = [ "default" "rev-mappings" ]; + }; "mio 0.6.22" = rec { crateName = "mio"; version = "0.6.22"; @@ -2401,6 +3020,10 @@ rec { name = "lapin"; packageId = "lapin"; } + { + name = "lazy_static"; + packageId = "lazy_static"; + } { name = "lru-cache"; packageId = "lru-cache"; @@ -2413,6 +3036,10 @@ rec { name = "nom"; packageId = "nom 4.2.3"; } + { + name = "prometheus"; + packageId = "prometheus"; + } { name = "separator"; packageId = "separator"; @@ -2437,6 +3064,10 @@ rec { name = "tempfile"; packageId = "tempfile 2.2.0"; } + { + name = "tide"; + packageId = "tide"; + } { name = "tracing"; packageId = "tracing"; @@ -2476,6 +3107,22 @@ rec { } ]; + }; + "omnom" = rec { + crateName = "omnom"; + version = "2.1.2"; + edition = "2018"; + sha256 = "1lwz9rj9lvsmj36nj5n1f7jkj2y8d1ad2n1iyy0fdmp0wb71dcnn"; + authors = [ + "Yoshua Wuyts " + ]; + dependencies = [ + { + name = "memchr"; + packageId = "memchr"; + } + ]; + }; "once_cell" = rec { crateName = "once_cell"; @@ -2799,6 +3446,49 @@ rec { } ]; + }; + "pin-project" = rec { + crateName = "pin-project"; + version = "0.4.17"; + edition = "2018"; + sha256 = "14bpkzj4q3hqbkdvz2klqnqyl8zz36rhwx6g835hxrimwzp3mjgd"; + authors = [ + "Taiki Endo " + ]; + dependencies = [ + { + name = "pin-project-internal"; + packageId = "pin-project-internal"; + usesDefaultFeatures = false; + } + ]; + + }; + "pin-project-internal" = rec { + crateName = "pin-project-internal"; + version = "0.4.17"; + edition = "2018"; + sha256 = "0h3ym8qya4h0nkrq9hrnhcx1kfbcsc7w82dysqxwkd553c4b53g5"; + procMacro = true; + authors = [ + "Taiki Endo " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn"; + features = [ "full" "visit-mut" ]; + } + ]; + }; "pin-project-lite" = rec { crateName = "pin-project-lite"; @@ -2867,6 +3557,27 @@ rec { }; resolvedDefaultFeatures = [ "simd" "std" ]; }; + "proc-macro-hack" = rec { + crateName = "proc-macro-hack"; + version = "0.5.16"; + edition = "2018"; + sha256 = "1r657v7d9vh1ivrvq65rvg9gjb29dpa0l3zg2fgrn5j8znz5c13y"; + procMacro = true; + authors = [ + "David Tolnay " + ]; + + }; + "proc-macro-nested" = rec { + crateName = "proc-macro-nested"; + version = "0.1.4"; + edition = "2015"; + sha256 = "15664z2pjnn7ajpbrir4wh4c16jxz4i8r46y73n2kvfkz6an154f"; + authors = [ + "David Tolnay " + ]; + + }; "proc-macro2" = rec { crateName = "proc-macro2"; version = "1.0.17"; @@ -2887,6 +3598,65 @@ rec { }; resolvedDefaultFeatures = [ "default" "proc-macro" ]; }; + "prometheus" = rec { + crateName = "prometheus"; + version = "0.8.0"; + edition = "2018"; + sha256 = "084xk4g7k4whpn3spivyvb5qm11qm9y31mrnfa72cqmbiljmwmxh"; + authors = [ + "overvenus@gmail.com" + "siddontang@gmail.com" + "vistaswx@gmail.com" + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "fnv"; + packageId = "fnv"; + } + { + name = "lazy_static"; + packageId = "lazy_static"; + } + { + name = "protobuf"; + packageId = "protobuf"; + optional = true; + } + { + name = "spin"; + packageId = "spin"; + } + { + name = "thiserror"; + packageId = "thiserror"; + } + ]; + features = { + "default" = [ "protobuf" ]; + "gen" = [ "protobuf-codegen-pure" ]; + "nightly" = [ "libc" ]; + "process" = [ "libc" "procfs" ]; + "push" = [ "reqwest" "libc" "protobuf" ]; + }; + resolvedDefaultFeatures = [ "default" "protobuf" ]; + }; + "protobuf" = rec { + crateName = "protobuf"; + version = "2.14.0"; + edition = "2015"; + sha256 = "11bl8hf522s9mbkckivnn9n8s3ss4g41w6jmfdsswmr5adqd71lf"; + authors = [ + "Stepan Koltsov " + ]; + features = { + "with-bytes" = [ "bytes" ]; + "with-serde" = [ "serde" "serde_derive" ]; + }; + }; "quick-error" = rec { crateName = "quick-error"; version = "1.2.3"; @@ -3283,6 +4053,16 @@ rec { } ]; + }; + "route-recognizer" = rec { + crateName = "route-recognizer"; + version = "0.1.13"; + edition = "2015"; + sha256 = "1y7ln295s0sjclfyj2yw084w6zan8q6jy46hrmm48g0bxdjr0l7a"; + authors = [ + "wycats" + ]; + }; "rustc-demangle" = rec { crateName = "rustc-demangle"; @@ -3519,6 +4299,37 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; + "serde_qs" = rec { + crateName = "serde_qs"; + version = "0.5.2"; + edition = "2015"; + sha256 = "1q83k6p21vccr5jj25xmfrxnz8gggrby2867kblidgkbk52fygnl"; + authors = [ + "Sam Scott " + ]; + dependencies = [ + { + name = "data-encoding"; + packageId = "data-encoding"; + } + { + name = "error-chain"; + packageId = "error-chain 0.12.2"; + } + { + name = "percent-encoding"; + packageId = "percent-encoding 1.0.1"; + } + { + name = "serde"; + packageId = "serde"; + } + ]; + features = { + "actix" = [ "actix-web" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; "sha-1" = rec { crateName = "sha-1"; version = "0.8.2"; @@ -3632,6 +4443,30 @@ rec { features = { }; }; + "spin" = rec { + crateName = "spin"; + version = "0.5.2"; + edition = "2015"; + sha256 = "0b84m6dbzrwf2kxylnw82d3dr8w06av7rfkr8s85fb5f43rwyqvf"; + authors = [ + "Mathijs van de Nes " + "John Ericson " + ]; + + }; + "stable_deref_trait" = rec { + crateName = "stable_deref_trait"; + version = "1.1.1"; + edition = "2015"; + sha256 = "1j2lkgakksmz4vc5hfawcch2ipiskrhjs1sih0f3br7s7rys58fv"; + authors = [ + "Robert Grosse " + ]; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "static_assertions" = rec { crateName = "static_assertions"; version = "1.1.0"; @@ -3674,7 +4509,7 @@ rec { "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; "test" = [ "syn-test-suite/all-features" ]; }; - resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "full" "parsing" "printing" "proc-macro" "quote" "visit" ]; + resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "full" "parsing" "printing" "proc-macro" "quote" "visit" "visit-mut" ]; }; "sys-info" = rec { crateName = "sys-info"; @@ -3823,6 +4658,47 @@ rec { } ]; + }; + "thiserror" = rec { + crateName = "thiserror"; + version = "1.0.19"; + edition = "2018"; + sha256 = "0i63pw7qanxhyajv0nh8x5kgifq47f115yi9s5fmj05dcmlr4gxi"; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "thiserror-impl"; + packageId = "thiserror-impl"; + } + ]; + + }; + "thiserror-impl" = rec { + crateName = "thiserror-impl"; + version = "1.0.19"; + edition = "2018"; + sha256 = "0ygllwcnbglqx156fv04n5sa0c2hbfk6aqlhizhwv61gdh484dc9"; + procMacro = true; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn"; + } + ]; + }; "thread_local" = rec { crateName = "thread_local"; @@ -3840,6 +4716,107 @@ rec { ]; }; + "tide" = rec { + crateName = "tide"; + version = "0.8.1"; + edition = "2018"; + sha256 = "169aj7klsznysml1jxpwc8m2cnkrfyvd1n1b02c18xiwzvr5m5fg"; + authors = [ + "Aaron Turon " + "Yoshua Wuyts " + ]; + dependencies = [ + { + name = "async-sse"; + packageId = "async-sse"; + } + { + name = "async-std"; + packageId = "async-std"; + features = [ "unstable" ]; + } + { + name = "cookie"; + packageId = "cookie"; + features = [ "percent-encode" ]; + } + { + name = "futures-core"; + packageId = "futures-core"; + } + { + name = "http-service"; + packageId = "http-service"; + } + { + name = "http-service-h1"; + packageId = "http-service-h1"; + optional = true; + } + { + name = "http-types"; + packageId = "http-types"; + } + { + name = "kv-log-macro"; + packageId = "kv-log-macro"; + } + { + name = "mime"; + packageId = "mime 0.3.16"; + } + { + name = "mime_guess"; + packageId = "mime_guess"; + } + { + name = "route-recognizer"; + packageId = "route-recognizer"; + } + { + name = "serde"; + packageId = "serde"; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "serde_qs"; + packageId = "serde_qs"; + } + { + name = "url"; + packageId = "url 2.1.1"; + } + ]; + devDependencies = [ + { + name = "async-std"; + packageId = "async-std"; + features = [ "unstable" "attributes" ]; + } + { + name = "mime"; + packageId = "mime 0.3.16"; + } + { + name = "mime_guess"; + packageId = "mime_guess"; + } + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + ]; + features = { + "default" = [ "h1-server" ]; + "docs" = [ "unstable" ]; + "h1-server" = [ "http-service-h1" ]; + }; + resolvedDefaultFeatures = [ "default" "h1-server" "http-service-h1" ]; + }; "time" = rec { crateName = "time"; version = "0.1.43"; @@ -4135,7 +5112,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; - "unicase" = rec { + "unicase 1.4.2" = rec { crateName = "unicase"; version = "1.4.2"; edition = "2015"; @@ -4153,6 +5130,23 @@ rec { "heap_size" = [ "heapsize" "heapsize_plugin" ]; }; }; + "unicase 2.6.0" = rec { + crateName = "unicase"; + version = "2.6.0"; + edition = "2015"; + sha256 = "1xmlbink4ycgxrkjspp0mf7pghcx4m7vxq7fpfm04ikr2zk7pwsh"; + authors = [ + "Sean McArthur " + ]; + buildDependencies = [ + { + name = "version_check"; + packageId = "version_check 0.9.2"; + } + ]; + features = { + }; + }; "unicode-bidi" = rec { crateName = "unicode-bidi"; version = "0.3.4"; From aa507e71e664578280405dc5225a0d431d0fa12f Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 27 May 2020 23:47:27 +0200 Subject: [PATCH 3/3] add builder metrics Counters for some basic build metrics. --- ofborg/src/bin/builder.rs | 5 +++-- ofborg/src/easylapin.rs | 21 +++++++++++--------- ofborg/src/message/buildresult.rs | 12 ++++++++++++ ofborg/src/metrics.rs | 32 +++++++++++++++++++++++++++++++ ofborg/src/tasks/build.rs | 18 +++++++++++++++++ 5 files changed, 77 insertions(+), 11 deletions(-) diff --git a/ofborg/src/bin/builder.rs b/ofborg/src/bin/builder.rs index 2a22c798..b857ee16 100644 --- a/ofborg/src/bin/builder.rs +++ b/ofborg/src/bin/builder.rs @@ -6,8 +6,7 @@ use async_std::task; use tracing::{info, warn}; use ofborg::easyamqp::{self, ChannelExt, ConsumerExt}; -use ofborg::easylapin; -use ofborg::{checkout, config, tasks}; +use ofborg::{checkout, config, easylapin, metrics, tasks}; // FIXME: remove with rust/cargo update #[allow(clippy::cognitive_complexity)] @@ -93,6 +92,8 @@ fn main() -> Result<(), Box> { }, )?; + metrics::spawn_server(); + info!("Fetching jobs from {}", &queue_name); task::block_on(handle); diff --git a/ofborg/src/easylapin.rs b/ofborg/src/easylapin.rs index c74ce6ad..0008eac7 100644 --- a/ofborg/src/easylapin.rs +++ b/ofborg/src/easylapin.rs @@ -1,14 +1,5 @@ use std::pin::Pin; -use crate::config::RabbitMQConfig; -use crate::easyamqp::{ - BindQueueConfig, ChannelExt, ConsumeConfig, ConsumerExt, ExchangeConfig, ExchangeType, - QueueConfig, -}; -use crate::notifyworker::{NotificationReceiver, SimpleNotifyWorker}; -use crate::ofborg; -use crate::worker::{Action, SimpleWorker}; - use async_std::future::Future; use async_std::stream::StreamExt; use async_std::task; @@ -21,6 +12,16 @@ use lapin::types::{AMQPValue, FieldTable}; use lapin::{BasicProperties, Channel, Connection, ConnectionProperties, ExchangeKind}; use tracing::{debug, trace}; +use crate::config::RabbitMQConfig; +use crate::easyamqp::{ + BindQueueConfig, ChannelExt, ConsumeConfig, ConsumerExt, ExchangeConfig, ExchangeType, + QueueConfig, +}; +use crate::metrics; +use crate::notifyworker::{NotificationReceiver, SimpleNotifyWorker}; +use crate::ofborg; +use crate::worker::{Action, SimpleWorker}; + pub fn from_config(cfg: &RabbitMQConfig) -> Result { let mut props = FieldTable::default(); props.insert( @@ -166,6 +167,8 @@ impl<'a, W: SimpleNotifyWorker + 'a> ConsumerExt<'a, W> for NotifyChannel { Ok(Box::pin(async move { while let Some(Ok(deliver)) = consumer.next().await { debug!(?deliver.delivery_tag, "consumed delivery"); + metrics::JOBS_RECEIVED.inc(); + let mut receiver = ChannelNotificationReceiver { channel: &mut chan, deliver: &deliver, diff --git a/ofborg/src/message/buildresult.rs b/ofborg/src/message/buildresult.rs index a292edea..a55db110 100644 --- a/ofborg/src/message/buildresult.rs +++ b/ofborg/src/message/buildresult.rs @@ -11,6 +11,18 @@ pub enum BuildStatus { UnexpectedError { err: String }, } +impl BuildStatus { + pub fn as_label(&self) -> &'static str { + match self { + BuildStatus::Skipped => "skipped", + BuildStatus::Success => "success", + BuildStatus::Failure => "failure", + BuildStatus::TimedOut => "timeout", + BuildStatus::UnexpectedError { err: _ } => "unexpected", + } + } +} + impl From for String { fn from(status: BuildStatus) -> String { match status { diff --git a/ofborg/src/metrics.rs b/ofborg/src/metrics.rs index 302b95ff..3c289744 100644 --- a/ofborg/src/metrics.rs +++ b/ofborg/src/metrics.rs @@ -12,6 +12,38 @@ use tracing::info; use crate::ofborg; +lazy_static! { + pub static ref JOBS_RECEIVED: IntCounter = register_int_counter!( + "ofborg_jobs_received_total", + "Total number of jobs received." + ) + .unwrap(); + pub static ref BUILDS_RECEIVED: CounterVec = register_counter_vec!( + "ofborg_builds_received_total", + "Total number of builds received.", + &["system"] + ) + .unwrap(); + pub static ref BUILDS_FINISHED: CounterVec = register_counter_vec!( + "ofborg_builds_finished_total", + "Total number of builds finished.", + &["system", "status"] + ) + .unwrap(); + pub static ref BUILDS_ATTRIBUTES_ATTEMPTED: CounterVec = register_counter_vec!( + "ofborg_builds_attributes_attempted_total", + "Total number of attributes attempted to build.", + &["system"] + ) + .unwrap(); + pub static ref BUILDS_ATTRIBUTES_NOT_ATTEMPTED: CounterVec = register_counter_vec!( + "ofborg_builds_attributes_not_attempted_total", + "Total number of attributes not attempted to build.", + &["system"] + ) + .unwrap(); +} + lazy_static! { static ref VERSION: GaugeVec = register_gauge_vec!( "ofborg_version", diff --git a/ofborg/src/tasks/build.rs b/ofborg/src/tasks/build.rs index e4f32bd9..380ccc5c 100644 --- a/ofborg/src/tasks/build.rs +++ b/ofborg/src/tasks/build.rs @@ -2,6 +2,7 @@ use crate::checkout; use crate::commentparser; use crate::message::buildresult::{BuildResult, BuildStatus, V1Tag}; use crate::message::{buildjob, buildlogmsg}; +use crate::metrics; use crate::nix; use crate::notifyworker; use crate::worker; @@ -280,6 +281,9 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker { ) { let span = debug_span!("job", pr = ?job.pr.number); let _enter = span.enter(); + metrics::BUILDS_RECEIVED + .with_label_values(&[&self.system]) + .inc(); let mut actions = self.actions(&job, notifier); @@ -347,6 +351,14 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker { cannot_build_attrs.join(", ") ); + metrics::BUILDS_ATTRIBUTES_ATTEMPTED + .with_label_values(&[&self.system]) + .inc_by(can_build.len() as f64); + + metrics::BUILDS_ATTRIBUTES_NOT_ATTEMPTED + .with_label_values(&[&self.system]) + .inc_by(cannot_build_attrs.len() as f64); + actions.log_started(can_build.clone(), cannot_build_attrs.clone()); actions.log_instantiation_errors(cannot_build); @@ -375,7 +387,13 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker { .last(); info!("----->8-----"); + let status_label = status.as_label(); actions.build_finished(status, can_build, cannot_build_attrs); + + metrics::BUILDS_FINISHED + .with_label_values(&[&self.system, status_label]) + .inc(); + info!("Build done!"); } }