Skip to content

Commit e34d53d

Browse files
Changing config variable definitions from ObserverWeb.Telemetry to root of observer_web (#34)
1 parent 30a0297 commit e34d53d

File tree

7 files changed

+55
-82
lines changed

7 files changed

+55
-82
lines changed

CHANGELOG.md

Lines changed: 37 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,56 @@
1-
# CHANGELOG (v0.1.X)
1+
# CHANGELOG (v0.2.X)
22

3-
## 0.1.13 ()
3+
## 0.2.0 (:soon:)
44

5-
### Backwards incompatible changes for 0.1.12
6-
* None
7-
8-
### Bug fixes
9-
* None
10-
11-
### Enhancements
12-
* [[`PR-30`](https://github.com/thiagoesteves/observer_web/pull/30)] Adding configurable timeout for fetching specific states.
13-
* [[`PR-31`](https://github.com/thiagoesteves/observer_web/pull/31)] Adding process dictionary information.
14-
* [[`PR-32`](https://github.com/thiagoesteves/observer_web/pull/32)] Adding port/process actions.
15-
16-
## 0.1.12 🚀 (2025-10-12)
17-
18-
### Backwards incompatible changes for 0.1.11
19-
* None
20-
21-
### Bug fixes
22-
* None
23-
24-
### Enhancements
25-
* [[`PR-27`](https://github.com/thiagoesteves/observer_web/pull/27)] Adding Igniter.
26-
* [[`PR-28`](https://github.com/thiagoesteves/observer_web/pull/28)] Updating Tailwind.
27-
* [[`PR-28`](https://github.com/thiagoesteves/observer_web/pull/28)] Adding theme support.
28-
* [[`PR-28`](https://github.com/thiagoesteves/observer_web/pull/28)] Assets organization.
29-
30-
## 0.1.11 🚀 (2025-08-29)
31-
32-
### Backwards incompatible changes for 0.1.10
33-
* None
5+
### ⚠️ Backwards incompatible changes for 0.1.12
346

35-
### Bug fixes
36-
* None
37-
38-
### Enhancements
39-
* [[`ISSUE-19`](https://github.com/thiagoesteves/observer_web/issues/19)] Adding copy to clipboard button to copy tracing text.
40-
* [[`ISSUE-21`](https://github.com/thiagoesteves/observer_web/issues/21)] Add non case sensitive search for modules and functions for tracing.
41-
42-
## 0.1.10 🚀 (2025-05-26)
43-
44-
### Backwards incompatible changes for 0.1.9
45-
* None
46-
47-
### Bug fixes
48-
* None
7+
#### Memory Monitoring GenServer
8+
A new GenServer has been added to handle Process and Port memory monitoring, which is utilized by the OTP distribution layer. **All applications must be updated to this version to maintain memory monitoring capabilities.**
499

50-
### Enhancements
51-
* [[`PR-18`](https://github.com/thiagoesteves/observer_web/pull/18)] Normalizing functions and adding highlight to nodes that are current online for metrics
52-
53-
## 0.1.9 🚀 (2025-05-07)
10+
#### Configuration Restructuring
11+
The following configuration variables have been moved from module-specific configuration to the root `:observer_web` configuration:
5412

55-
### Backwards incompatible changes for 0.1.8
56-
* None
13+
- `data_retention_period`
14+
- `mode`
15+
- `phx_lv_sckt_poller_interval_ms`
16+
- `beam_vm_poller_interval_ms`
5717

58-
### Bug fixes
59-
* None
18+
**Migration Guide:**
6019

61-
### Enhancements
62-
* [[`PR-16`](https://github.com/thiagoesteves/observer_web/pull/16)] Adding Beam VM statistics (ports, atoms and processes)
20+
You may not need to update if you are relying on default values.
6321

64-
## 0.1.8 🚀 (2025-04-03)
22+
```elixir
23+
# Before (v0.1.12)
24+
config :observer_web, ObserverWeb.Telemetry,
25+
mode: :observer,
26+
data_retention_period: :timer.minutes(30),
27+
phx_lv_sckt_poller_interval_ms: 5_000,
28+
beam_vm_poller_interval_ms: 1_000
6529

66-
### Backwards incompatible changes for 0.1.7
67-
* None
30+
# After (v0.2.0)
31+
config :observer_web,
32+
mode: :observer,
33+
data_retention_period: :timer.minutes(30),
34+
phx_lv_sckt_poller_interval_ms: 5_000,
35+
beam_vm_poller_interval_ms: 1_000
36+
```
6837

6938
### Bug fixes
7039
* None
7140

7241
### Enhancements
73-
* [[`PR-13`](https://github.com/thiagoesteves/observer_web/pull/13)] Fixed dialyzer configuration
74-
* [[`PR-14`](https://github.com/thiagoesteves/observer_web/pull/14)] Improvements from code review
75-
and integration
42+
* [[`PR-30`](https://github.com/thiagoesteves/observer_web/pull/30)] Adding configurable timeout for fetching specific states.
43+
* [[`PR-31`](https://github.com/thiagoesteves/observer_web/pull/31)] Adding process dictionary information.
44+
* [[`PR-32`](https://github.com/thiagoesteves/observer_web/pull/32)] Adding port/process actions.
45+
* [[`PR-33`](https://github.com/thiagoesteves/observer_web/pull/33)] Adding port/process memory monitor.
46+
* [[`PR-34`](https://github.com/thiagoesteves/observer_web/pull/34)] Changing config variable definitions from ObserverWeb.Telemetry to root of observer_web
7647

7748
# 🚀 Previous Releases
49+
* [0.1.12 (2025-10-12)](https://github.com/thiagoesteves/observer_web/blob/v0.1.12/CHANGELOG.md)
50+
* [0.1.11 (2025-08-29)](https://github.com/thiagoesteves/observer_web/blob/v0.1.11/CHANGELOG.md)
51+
* [0.1.10 (2025-05-26)](https://github.com/thiagoesteves/observer_web/blob/v0.1.10/CHANGELOG.md)
52+
* [0.1.9 (2025-05-07)](https://github.com/thiagoesteves/observer_web/blob/v0.1.9/CHANGELOG.md)
53+
* [0.1.8 (2025-04-03)](https://github.com/thiagoesteves/observer_web/blob/v0.1.8/CHANGELOG.md)
7854
* [0.1.7 (2025-03-21)](https://github.com/thiagoesteves/observer_web/blob/v0.1.7/CHANGELOG.md)
7955
* [0.1.6 (2025-03-21)](https://github.com/thiagoesteves/observer_web/blob/v0.1.6/CHANGELOG.md)
8056
* [0.1.5 (2025-02-26)](https://github.com/thiagoesteves/observer_web/blob/v0.1.5/CHANGELOG.md)

guides/installation.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can use the `observer_web.install` task without the `igniter.install` escrip
1515
First, add `observer_web` and `igniter` to your deps in `mix.exs`:
1616

1717
```elixir
18-
{:observer_web, "~> 0.1.0"},
18+
{:observer_web, "~> 0.2.0"},
1919
{:igniter, "~> 0.5", only: [:dev]},
2020
```
2121

@@ -49,7 +49,7 @@ Before installing Observer Web, ensure you have:
4949
Add `observer_web` as a dependency for your application. Open `mix.exs` and add the following line:
5050

5151
```elixir
52-
{:observer_web, "~> 0.1.0"}
52+
{:observer_web, "~> 0.2.0"}
5353
```
5454

5555
Now fetch your dependencies:
@@ -186,7 +186,7 @@ a retention time.
186186
To configure the retention period, use the following optional setting:
187187

188188
```elixir
189-
config :observer_web, ObserverWeb.Telemetry,
189+
config :observer_web,
190190
data_retention_period: :timer.minutes(30)
191191
```
192192

@@ -224,7 +224,7 @@ are retained even if any of the monitored applications restart.
224224
To configure applications to broadcast their metrics, use the following setting:
225225

226226
```elixir
227-
config :observer_web, ObserverWeb.Telemetry,
227+
config :observer_web,
228228
mode: :broadcast
229229
```
230230

@@ -238,7 +238,7 @@ config :observer_web, ObserverWeb.Telemetry,
238238
To designate an application as the **central observer (hub)**, use the following setting:
239239

240240
```elixir
241-
config :observer_web, ObserverWeb.Telemetry,
241+
config :observer_web,
242242
mode: :observer,
243243
data_retention_period: :timer.minutes(30)
244244
```
@@ -248,14 +248,16 @@ aggregating metrics from other applications.
248248

249249
#### 3. Metrics Polling Interval
250250

251-
Observer Web allows configuration of two polling intervals:
251+
Observer Web allows configuration of some polling intervals:
252252
* Phoenix Liveview sockets - Default: `5_000` ms
253-
* Beam VM statistics - Default: `1_000` ms
253+
* Beam VM statistics (total memory, queues, etc) - Default: `1_000` ms
254+
* Beam VM Process/Port memory statistics (total, stack, heap, etc) - Default: `1_000` ms
254255

255256
```elixir
256-
config :observer_web, ObserverWeb.Telemetry,
257+
config :observer_web,
257258
phx_lv_sckt_poller_interval_ms: 5_000,
258259
beam_vm_poller_interval_ms: 1_000
260+
beam_vm_process_port_poller_interval_ms: 1_000
259261
```
260262

261263
> #### For applications running by [DeployEx][dye] {: .attention}

lib/mix/tasks/observer_web.install.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if Code.ensure_loaded?(Igniter) do
4242
def info(_argv, _composing_task) do
4343
%Igniter.Mix.Task.Info{
4444
group: :observer_web,
45-
installs: [{:observer_web, "~> 0.1.0"}],
45+
installs: [{:observer_web, "~> 0.2.0"}],
4646
example: __MODULE__.Docs.example()
4747
}
4848
end

lib/observer_web/application.ex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ defmodule ObserverWeb.Application do
3030

3131
defp telemetry_server_config do
3232
[
33-
mode: Application.get_env(:observer_web, ObserverWeb.Telemetry)[:mode] || :local,
34-
data_retention_period:
35-
Application.get_env(:observer_web, ObserverWeb.Telemetry)[:data_retention_period]
33+
mode: Application.get_env(:observer_web, :mode) || :local,
34+
data_retention_period: Application.get_env(:observer_web, :data_retention_period)
3635
]
3736
end
3837
else

lib/observer_web/monitor/process_port.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ defmodule ObserverWeb.Monitor.ProcessPort do
3333
@impl true
3434
def init(_args) do
3535
poll_interval =
36-
Application.get_env(:observer_web, :beam_vm_poller_interval_ms) || @default_poll_interval
36+
Application.get_env(:observer_web, :beam_vm_process_port_poller_interval_ms) ||
37+
@default_poll_interval
3738

3839
:timer.send_interval(poll_interval, :refresh_metrics)
3940

lib/web/telemetry.ex

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,11 @@ defmodule Observer.Web.Telemetry do
3030
{:telemetry_poller,
3131
name: :observer_web_phoenix_liveview_sockets,
3232
measurements: [{PhxLvSocket, :process, []}],
33-
period:
34-
Application.get_env(:observer_web, ObserverWeb.Telemetry)[
35-
:phx_lv_sckt_poller_interval_ms
36-
] || 5_000},
33+
period: Application.get_env(:observer_web, :phx_lv_sckt_poller_interval_ms) || 5_000},
3734
{:telemetry_poller,
3835
name: :observer_web_beam_vm,
3936
measurements: [{BeamVm, :process, []}],
40-
period:
41-
Application.get_env(:observer_web, ObserverWeb.Telemetry)[:beam_vm_poller_interval_ms] ||
42-
1_000}
37+
period: Application.get_env(:observer_web, :beam_vm_poller_interval_ms) || 1_000}
4338
]
4439
else
4540
defp add_telemetry_poller, do: []

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule ObserverWeb.MixProject do
22
use Mix.Project
33

44
@source_url "https://github.com/thiagoesteves/observer_web"
5-
@version "0.1.13"
5+
@version "0.2.0"
66

77
def project do
88
[

0 commit comments

Comments
 (0)