| 1 | From: Jakub Jirutka <[email protected]>
|
| 2 | Date: Tue, 13 Apr 2021 19:14:53 +0200
|
| 3 | Subject: [PATCH] Remove http sampler to decrease size and dependencies
|
| 4 |
|
| 5 | http sampler increases size of the rezolus binary from 2.5 MiB to 4.1 MiB
|
| 6 | (opt-level="z", panic="abort", lto, stripped) and adds dependency on libssl
|
| 7 | and libcrypto.
|
| 8 |
|
| 9 | I think that it's a bit out of scope of the Rezolus purpose and there are
|
| 10 | better tools for this. If there will be demand for this sampler, we can
|
| 11 | build and provide two variants of rezolus (e.g. rezolus and rezolus-http).
|
| 12 |
|
| 13 | |
| 14 | |
| 15 | @@ -127,48 +127,6 @@
|
| 16 | # "p99",
|
| 17 | # ]
|
| 18 |
|
| 19 | -# This sampler reads from a JSON key-value http endpoint and can calculate
|
| 20 | -# percentile metrics for configured counters and gauges. It is intended to be
|
| 21 | -# used for host-local http endpoints to avoid introducing noise into the
|
| 22 | -# percentiles due to variable request service time.
|
| 23 | -# [samplers.http]
|
| 24 | -# Controls whether to use this sampler
|
| 25 | -# enabled = false
|
| 26 | -
|
| 27 | -# Specify the full URL to read JSON metrics from
|
| 28 | -# url = "http://0.0.0.0:8080/vars.json"
|
| 29 | -
|
| 30 | -# Sampling interval, in milliseconds, for this sampler
|
| 31 | -# interval = 1000
|
| 32 | -
|
| 33 | -# Specify raw metric names that should be treated as counters and have
|
| 34 | -# percentile metrics calculated. The percentiles will be of secondly rates seen
|
| 35 | -# calculated from the difference in consecutive readings and the elapsed time
|
| 36 | -# between those readings.
|
| 37 | -# counters = [
|
| 38 | -# # "some_counter_metric",
|
| 39 | -# ]
|
| 40 | -
|
| 41 | -# Specify raw metric names that should be treated as gauges and have percentile
|
| 42 | -# metrics calculated. The percentiles will be of instantaneous gauge values.
|
| 43 | -# gauges = [
|
| 44 | -# # "some_gauge_metric",
|
| 45 | -# ]
|
| 46 | -
|
| 47 | -# Enable pass-through of raw metric readings. The names will have the reading
|
| 48 | -# suffix appended to them, see the general config section.
|
| 49 | -# passthrough = false
|
| 50 | -
|
| 51 | -# The set of exported percentiles can be controlled by specifying them here
|
| 52 | -# percentiles = [
|
| 53 | -# "p1",
|
| 54 | -# "p10",
|
| 55 | -# "p50",
|
| 56 | -# "p90",
|
| 57 | -# "p99",
|
| 58 | -# ]
|
| 59 | -
|
| 60 | -
|
| 61 | # The interrupt sampler provides telemetry about system interrupts
|
| 62 | [samplers.interrupt]
|
| 63 | # Controls whether to use this sampler
|
| 64 | |
| 65 | |
| 66 | @@ -7,7 +7,6 @@
|
| 67 | use samplers::cpu::CpuConfig;
|
| 68 | use samplers::disk::DiskConfig;
|
| 69 | use samplers::ext4::Ext4Config;
|
| 70 | -use samplers::http::HttpConfig;
|
| 71 | use samplers::interrupt::InterruptConfig;
|
| 72 | use samplers::memcache::MemcacheConfig;
|
| 73 | use samplers::memory::MemoryConfig;
|
| 74 | @@ -31,8 +30,6 @@
|
| 75 | #[serde(default)]
|
| 76 | ext4: Ext4Config,
|
| 77 | #[serde(default)]
|
| 78 | - http: HttpConfig,
|
| 79 | - #[serde(default)]
|
| 80 | interrupt: InterruptConfig,
|
| 81 | #[serde(default)]
|
| 82 | memcache: MemcacheConfig,
|
| 83 | @@ -71,10 +68,6 @@
|
| 84 | &self.ext4
|
| 85 | }
|
| 86 |
|
| 87 | - pub fn http(&self) -> &HttpConfig {
|
| 88 | - &self.http
|
| 89 | - }
|
| 90 | -
|
| 91 | pub fn interrupt(&self) -> &InterruptConfig {
|
| 92 | &self.interrupt
|
| 93 | }
|
| 94 | |
| 95 | |
| 96 | @@ -78,7 +78,6 @@
|
| 97 | Cpu::spawn(common.clone());
|
| 98 | Disk::spawn(common.clone());
|
| 99 | Ext4::spawn(common.clone());
|
| 100 | - Http::spawn(common.clone());
|
| 101 | Interrupt::spawn(common.clone());
|
| 102 | Memcache::spawn(common.clone());
|
| 103 | Memory::spawn(common.clone());
|
| 104 | |
| 105 | |
| 106 | @@ -18,7 +18,6 @@
|
| 107 | pub mod cpu;
|
| 108 | pub mod disk;
|
| 109 | pub mod ext4;
|
| 110 | -pub mod http;
|
| 111 | pub mod interrupt;
|
| 112 | pub mod memcache;
|
| 113 | pub mod memory;
|
| 114 | @@ -35,7 +34,6 @@
|
| 115 | pub use cpu::Cpu;
|
| 116 | pub use disk::Disk;
|
| 117 | pub use ext4::Ext4;
|
| 118 | -pub use http::Http;
|
| 119 | pub use interrupt::Interrupt;
|
| 120 | pub use memcache::Memcache;
|
| 121 | pub use memory::Memory;
|