Packages

A distributed, compacting, multidimensional, telemetry-powered time series datastore

Current section

9 Versions

Jump to

Compare versions

4 files changed
+21 additions
-8 deletions
  @@ -1,5 +1,12 @@
1 1 # Changelog for Oban Met v1.0
2 2
3 + ## v1.0.3 — 2025-05-06
4 +
5 + - [Examiner] Use parallel execution for health checks.
6 +
7 + Minimize total time taken to scrape checks from producers by parallelizing calls. The worst case
8 + time is now O(1) rather than O(n) when producers are busy.
9 +
3 10 ## v1.0.2 — 2025-03-14
4 11
5 12 This release requires Oban v2.19 because of a dependency on the new JSON module.
  @@ -4,12 +4,10 @@
4 4 <<"https://github.com/oban-bg/oban_met/blob/main/CHANGELOG.md">>},
5 5 {<<"GitHub">>,<<"https://github.com/oban-bg/oban_met">>}]}.
6 6 {<<"name">>,<<"oban_met">>}.
7 - {<<"version">>,<<"1.0.2">>}.
7 + {<<"version">>,<<"1.0.3">>}.
8 8 {<<"description">>,
9 9 <<"A distributed, compacting, multidimensional, telemetry-powered time series datastore">>}.
10 10 {<<"elixir">>,<<"~> 1.15">>}.
11 - {<<"app">>,<<"oban_met">>}.
12 - {<<"licenses">>,[<<"Apache-2.0">>]}.
13 11 {<<"files">>,
14 12 [<<"lib">>,<<"lib/oban">>,<<"lib/oban/met">>,<<"lib/oban/met/examiner.ex">>,
15 13 <<"lib/oban/met/reporter.ex">>,<<"lib/oban/met/recorder.ex">>,
  @@ -19,6 +17,8 @@
19 17 <<"lib/oban/met/listener.ex">>,<<"lib/oban/met/application.ex">>,
20 18 <<"lib/met.ex">>,<<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>,
21 19 <<"CHANGELOG.md">>,<<"LICENSE.txt">>]}.
20 + {<<"app">>,<<"oban_met">>}.
21 + {<<"licenses">>,[<<"Apache-2.0">>]}.
22 22 {<<"requirements">>,
23 23 [[{<<"name">>,<<"oban">>},
24 24 {<<"app">>,<<"oban">>},
  @@ -106,9 +106,11 @@ defmodule Oban.Met.Examiner do
106 106 checks =
107 107 Oban.Registry
108 108 |> Registry.select(match)
109 - |> Enum.map(&safe_check(&1, state))
110 - |> Enum.filter(&is_map/1)
111 - |> Enum.map(&sanitize_name/1)
109 + |> Task.async_stream(&safe_check(&1, state), on_timeout: :kill_task, ordered: false)
110 + |> Enum.reduce([], fn
111 + {:ok, check}, acc when is_map(check) -> [check | acc]
112 + _, acc -> acc
113 + end)
112 114
113 115 if Enum.any?(checks), do: Notifier.notify(state.conf, :gossip, %{checks: checks})
114 116
  @@ -156,7 +158,11 @@ defmodule Oban.Met.Examiner do
156 158 # Checking
157 159
158 160 defp safe_check(pid, state) do
159 - if Process.alive?(pid), do: GenServer.call(pid, :check, state.interval)
161 + if Process.alive?(pid) do
162 + pid
163 + |> GenServer.call(:check, state.interval)
164 + |> sanitize_name()
165 + end
160 166 catch
161 167 :exit, _ -> :error
162 168 end
  @@ -2,7 +2,7 @@ defmodule Oban.Met.MixProject do
2 2 use Mix.Project
3 3
4 4 @source_url "https://github.com/oban-bg/oban_met"
5 - @version "1.0.2"
5 + @version "1.0.3"
6 6
7 7 def project do
8 8 [