Skip to content

distributed-metrics v1.4.6

Latest

Choose a tag to compare

@bitping-releaser bitping-releaser released this 29 Sep 22:11

Install

Homebrew (macOS & Linux)

brew install --cask BitpingApp/tap/distributed-metrics

Debian / Ubuntu

# x86_64
curl -LO https://github.com/BitpingApp/distributed-metrics/releases/download/v1.4.6/distributed-metrics_1.4.6_amd64.deb
sudo dpkg -i distributed-metrics_1.4.6_amd64.deb

# arm64
curl -LO https://github.com/BitpingApp/distributed-metrics/releases/download/v1.4.6/distributed-metrics_1.4.6_arm64.deb
sudo dpkg -i distributed-metrics_1.4.6_arm64.deb

Fedora / RHEL

sudo rpm -i https://github.com/BitpingApp/distributed-metrics/releases/download/v1.4.6/distributed-metrics-1.4.6-1.x86_64.rpm
# or aarch64:
sudo rpm -i https://github.com/BitpingApp/distributed-metrics/releases/download/v1.4.6/distributed-metrics-1.4.6-1.aarch64.rpm

Alpine

curl -LO https://github.com/BitpingApp/distributed-metrics/releases/download/v1.4.6/distributed-metrics_1.4.6_x86_64.apk
sudo apk add --allow-untrusted distributed-metrics_1.4.6_x86_64.apk

Tarball (any Linux/macOS)

Pick the right archive for your OS/arch from the assets below, then:

tar -xJf distributed-metrics-1.4.6-<os>-<arch>.tar.xz
cd distributed-metrics-1.4.6-<os>-<arch>
./distributed-metrics --help

What's new

Improvements

  • Setup problems stop distributed-metrics straight away, with exit code 1. Before anything else starts, distributed-metrics now checks that BITPING_API_KEY is set and can be sent as an HTTP header, and that Metrics.yaml and any BITPING_* settings load. If a check fails, it prints the error and exits with code 1, without opening port 3000. It does not check the key with Bitping, so a wrong or revoked key still shows up as failed probes. Before, a config it couldn't load crashed it with exit code 101. A missing key also crashed it with exit code 101, but only when the first probe ran.
    • An empty or blank BITPING_API_KEY now counts as missing. Before, distributed-metrics started with it and sent every probe without a usable key.
    • A key is now needed even when Metrics.yaml lists no probes.
    • These errors, and the error when port 3000 is already in use (which still exits with code 1), now print on stderr as plain text starting with Error:, for example Error: ApiClient(MissingApiKey) or Error: ScrapeServer(Os { ..., kind: AddrInUse, ... }). They are not log lines, so they are not JSON when LOG_FMT=json is set, and the port error no longer starts with HTTP server failed.
  • A crash in one probe no longer stops the others. If a probe or a remote-write destination ever crashes, distributed-metrics now logs background task ended abnormally and keeps everything else running. Before, the whole process exited with code 101, and a restart brought every probe back. Now the crashed probe or destination stays stopped until you restart distributed-metrics, so watch for that log line if you relied on restarts.

Fixes

  • API keys with a trailing newline now work. Spaces and line breaks around BITPING_API_KEY are now ignored. Before, a trailing newline, such as one left by a secret file, crashed distributed-metrics on its first probe.
  • Asset sampling no longer piles up when a page's assets are slow. After an HTTP probe gets an HTML page, distributed-metrics also checks up to sample_assets.max_assets of the assets the page loads (5 by default; 0 turns asset checks off). Each HTTP entry in Metrics.yaml now runs one round of asset checks at a time. If the last round is still going when the page is probed again, that probe's assets are skipped and a warning is logged: previous asset sweep still running; skipping this probe's assets. Before, if a page's asset checks were still running when the page was probed again, a new round started alongside the old one, and each round sent its own asset jobs through the Bitping API. On those pages the http_asset_* metrics now update less often. http_page_assets_sampled still counts the assets found, even on a probe whose checks were skipped. Warnings show when RUST_LOG is set to warn or more detailed.
  • A stuck asset no longer holds up the rest. Each asset check now gives up after 30 seconds, logs asset sample probe timed out as a warning, and moves on to the page's next asset. Before, asset checks had no time limit, so one slow or stuck asset held up every asset after it on that page for as long as it took. A timed-out asset shows only in that warning, not in the http_asset_* metrics.
  • DNS lookup times are recorded once per probe. When a label_whitelist left out dns_server, dns_server_lookup_duration_ms recorded the same lookup time once for each resolver provider the node reported. That inflated its count, its sum and any rate over them, and pulled its averages and percentiles towards nodes with several resolvers. It now records one value per probe. Nothing changes if you keep dns_server or don't use a whitelist.

Verify your download against the bundled checksum file:

curl -LO https://github.com/BitpingApp/distributed-metrics/releases/download/v1.4.6/distributed-metrics-1.4.6_SHA256SUMS
sha256sum -c distributed-metrics-1.4.6_SHA256SUMS

Full changelog: ...v1.4.6