Current section

43 Versions

Jump to

Compare versions

21 files changed
+216 additions
-93 deletions
  @@ -1,5 +1,12 @@
1 1 # CHANGELOG
2 2
3 + ## v0.2.7 (2020-07-07)
4 +
5 + * Add hooks for historical data on metrics dashboard
6 + * Limit chart data via `:prune_threshold` reporter option
7 + * Do not crash the application tab if `which_children` fails
8 + * Several visual improvements
9 +
3 10 ## v0.2.6 (2020-06-03)
4 11
5 12 * Support tags on summary metrics
  @@ -3,52 +3,55 @@
3 3 {<<"description">>,<<"Real-time performance dashboard for Phoenix">>}.
4 4 {<<"elixir">>,<<"~> 1.7">>}.
5 5 {<<"files">>,
6 - [<<"lib">>,<<"lib/phoenix">>,<<"lib/phoenix/live_dashboard.ex">>,
6 + [<<"lib">>,<<"lib/.DS_Store">>,<<"lib/phoenix">>,<<"lib/phoenix/.DS_Store">>,
7 7 <<"lib/phoenix/live_dashboard">>,
8 - <<"lib/phoenix/live_dashboard/application.ex">>,
9 8 <<"lib/phoenix/live_dashboard/layout_view.ex">>,
10 - <<"lib/phoenix/live_dashboard/telemetry_listener.ex">>,
9 + <<"lib/phoenix/live_dashboard/.DS_Store">>,
10 + <<"lib/phoenix/live_dashboard/system_info.ex">>,
11 + <<"lib/phoenix/live_dashboard/logger_pubsub_backend.ex">>,
12 + <<"lib/phoenix/live_dashboard/web.ex">>,
13 + <<"lib/phoenix/live_dashboard/request_logger.ex">>,
14 + <<"lib/phoenix/live_dashboard/router.ex">>,
15 + <<"lib/phoenix/live_dashboard/info">>,
16 + <<"lib/phoenix/live_dashboard/info/app_info_component.ex">>,
17 + <<"lib/phoenix/live_dashboard/info/process_info_component.ex">>,
18 + <<"lib/phoenix/live_dashboard/info/socket_info_component.ex">>,
19 + <<"lib/phoenix/live_dashboard/info/port_info_component.ex">>,
20 + <<"lib/phoenix/live_dashboard/info/ets_info_component.ex">>,
21 + <<"lib/phoenix/live_dashboard/components">>,
22 + <<"lib/phoenix/live_dashboard/components/modal_component.ex">>,
23 + <<"lib/phoenix/live_dashboard/components/title_bar_component.ex">>,
24 + <<"lib/phoenix/live_dashboard/components/color_bar_component.ex">>,
25 + <<"lib/phoenix/live_dashboard/components/card_usage_component.ex">>,
26 + <<"lib/phoenix/live_dashboard/components/color_bar_legend_component.ex">>,
27 + <<"lib/phoenix/live_dashboard/components/chart_component.ex">>,
28 + <<"lib/phoenix/live_dashboard/reingold_tifford.ex">>,
29 + <<"lib/phoenix/live_dashboard/live">>,
30 + <<"lib/phoenix/live_dashboard/live/menu_live.ex">>,
31 + <<"lib/phoenix/live_dashboard/live/home_live.ex">>,
32 + <<"lib/phoenix/live_dashboard/live/os_mon_live.ex">>,
33 + <<"lib/phoenix/live_dashboard/live/sockets_live.ex">>,
34 + <<"lib/phoenix/live_dashboard/live/.DS_Store">>,
35 + <<"lib/phoenix/live_dashboard/live/ports_live.ex">>,
36 + <<"lib/phoenix/live_dashboard/live/applications_live.ex">>,
37 + <<"lib/phoenix/live_dashboard/live/ets_live.ex">>,
38 + <<"lib/phoenix/live_dashboard/live/processes_live.ex">>,
39 + <<"lib/phoenix/live_dashboard/live/request_logger_live.ex">>,
40 + <<"lib/phoenix/live_dashboard/live/metrics_live.ex">>,
11 41 <<"lib/phoenix/live_dashboard/templates">>,
12 42 <<"lib/phoenix/live_dashboard/templates/layout">>,
13 43 <<"lib/phoenix/live_dashboard/templates/layout/live.html.leex">>,
14 44 <<"lib/phoenix/live_dashboard/templates/layout/dash.html.eex">>,
15 - <<"lib/phoenix/live_dashboard/info">>,
16 - <<"lib/phoenix/live_dashboard/info/ets_info_component.ex">>,
17 - <<"lib/phoenix/live_dashboard/info/socket_info_component.ex">>,
18 - <<"lib/phoenix/live_dashboard/info/process_info_component.ex">>,
19 - <<"lib/phoenix/live_dashboard/info/port_info_component.ex">>,
20 - <<"lib/phoenix/live_dashboard/info/app_info_component.ex">>,
21 - <<"lib/phoenix/live_dashboard/web.ex">>,
45 + <<"lib/phoenix/live_dashboard/application.ex">>,
46 + <<"lib/phoenix/live_dashboard/telemetry_listener.ex">>,
22 47 <<"lib/phoenix/live_dashboard/helpers">>,
23 - <<"lib/phoenix/live_dashboard/helpers/live_helpers.ex">>,
48 + <<"lib/phoenix/live_dashboard/helpers/.DS_Store">>,
24 49 <<"lib/phoenix/live_dashboard/helpers/table_helpers.ex">>,
25 - <<"lib/phoenix/live_dashboard/router.ex">>,
26 - <<"lib/phoenix/live_dashboard/components">>,
27 - <<"lib/phoenix/live_dashboard/components/title_bar_component.ex">>,
28 - <<"lib/phoenix/live_dashboard/components/color_bar_legend_component.ex">>,
29 - <<"lib/phoenix/live_dashboard/components/modal_component.ex">>,
30 - <<"lib/phoenix/live_dashboard/components/chart_component.ex">>,
31 - <<"lib/phoenix/live_dashboard/components/color_bar_component.ex">>,
32 - <<"lib/phoenix/live_dashboard/components/card_usage_component.ex">>,
33 - <<"lib/phoenix/live_dashboard/system_info.ex">>,
34 - <<"lib/phoenix/live_dashboard/request_logger.ex">>,
35 - <<"lib/phoenix/live_dashboard/logger_pubsub_backend.ex">>,
36 - <<"lib/phoenix/live_dashboard/reingold_tifford.ex">>,
37 - <<"lib/phoenix/live_dashboard/live">>,
38 - <<"lib/phoenix/live_dashboard/live/ets_live.ex">>,
39 - <<"lib/phoenix/live_dashboard/live/os_mon_live.ex">>,
40 - <<"lib/phoenix/live_dashboard/live/applications_live.ex">>,
41 - <<"lib/phoenix/live_dashboard/live/menu_live.ex">>,
42 - <<"lib/phoenix/live_dashboard/live/ports_live.ex">>,
43 - <<"lib/phoenix/live_dashboard/live/metrics_live.ex">>,
44 - <<"lib/phoenix/live_dashboard/live/sockets_live.ex">>,
45 - <<"lib/phoenix/live_dashboard/live/home_live.ex">>,
46 - <<"lib/phoenix/live_dashboard/live/processes_live.ex">>,
47 - <<"lib/phoenix/live_dashboard/live/request_logger_live.ex">>,<<"priv">>,
48 - <<"priv/static">>,<<"priv/static/css">>,<<"priv/static/css/app.css">>,
49 - <<"priv/static/js">>,<<"priv/static/js/app.js">>,
50 - <<"priv/static/js/app.js.LICENSE.txt">>,<<"CHANGELOG.md">>,<<"LICENSE.md">>,
51 - <<"mix.exs">>,<<"README.md">>]}.
50 + <<"lib/phoenix/live_dashboard/helpers/live_helpers.ex">>,
51 + <<"lib/phoenix/live_dashboard.ex">>,<<"priv">>,<<"priv/static">>,
52 + <<"priv/static/css">>,<<"priv/static/css/app.css">>,<<"priv/static/js">>,
53 + <<"priv/static/js/app.js.LICENSE.txt">>,<<"priv/static/js/app.js">>,
54 + <<"CHANGELOG.md">>,<<"LICENSE.md">>,<<"mix.exs">>,<<"README.md">>]}.
52 55 {<<"licenses">>,[<<"MIT">>]}.
53 56 {<<"links">>,
54 57 [{<<"github">>,
  @@ -59,7 +62,7 @@
59 62 {<<"name">>,<<"phoenix_live_view">>},
60 63 {<<"optional">>,false},
61 64 {<<"repository">>,<<"hexpm">>},
62 - {<<"requirement">>,<<"~> 0.13.1">>}],
65 + {<<"requirement">>,<<"~> 0.14.0">>}],
63 66 [{<<"app">>,<<"telemetry_metrics">>},
64 67 {<<"name">>,<<"telemetry_metrics">>},
65 68 {<<"optional">>,false},
  @@ -70,4 +73,4 @@
70 73 {<<"optional">>,false},
71 74 {<<"repository">>,<<"hexpm">>},
72 75 {<<"requirement">>,<<"~> 2.14.1 or ~> 2.15">>}]]}.
73 - {<<"version">>,<<"0.2.6">>}.
76 + {<<"version">>,<<"0.2.7">>}.
  @@ -4,4 +4,19 @@ defmodule Phoenix.LiveDashboard do
4 4 |> File.read!()
5 5 |> String.split("<!-- MDOC !-->")
6 6 |> Enum.fetch!(1)
7 +
8 + @doc """
9 + Extracts a datapoint for the given metric.
10 +
11 + Receives a `Telemetry.Metric` as `metric`, alongside the `measurements`
12 + and `metadata` from the Telemetry event, and an optional `time` and
13 + returns an extracted datapoint or `nil` if the event is not part of
14 + the metric.
15 +
16 + Note that it is expected that the event name was already validated as
17 + part of the metric.
18 + """
19 + @spec extract_datapoint_for_metric(Telemetry.Metric.t, map(), map(), pos_integer | nil) ::
20 + %{label: binary(), measurement: number, time: pos_integer} | nil
21 + defdelegate extract_datapoint_for_metric(metric, measurements, metadata, time \\ nil), to: Phoenix.LiveDashboard.TelemetryListener
7 22 end
Loading more files…