plain.observer 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of plain.observer might be problematic. Click here for more details.

@@ -1,5 +1,16 @@
1
1
  # plain-observer changelog
2
2
 
3
+ ## [0.5.0](https://github.com/dropseed/plain/releases/plain-observer@0.5.0) (2025-09-03)
4
+
5
+ ### What's changed
6
+
7
+ - Extended observer summary mode cookie duration from 1 day to 1 week for improved user experience ([bbe8a8a](https://github.com/dropseed/plain/commit/bbe8a8ad54))
8
+ - Changed admin navigation icon for Spans from "diagram-3" to "activity" ([2aac07d](https://github.com/dropseed/plain/commit/2aac07de4e))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - No changes required
13
+
3
14
  ## [0.4.0](https://github.com/dropseed/plain/releases/plain-observer@0.4.0) (2025-08-27)
4
15
 
5
16
  ### What's changed
plain/observer/admin.py CHANGED
@@ -36,7 +36,7 @@ class TraceViewset(AdminViewset):
36
36
  class SpanViewset(AdminViewset):
37
37
  class ListView(AdminModelListView):
38
38
  nav_section = "Observer"
39
- nav_icon = "diagram-3"
39
+ nav_icon = "activity"
40
40
  model = Span
41
41
  fields = [
42
42
  "name",
plain/observer/cli.py CHANGED
@@ -5,7 +5,7 @@ import urllib.request
5
5
  import click
6
6
 
7
7
  from plain.cli import register_cli
8
- from plain.cli.agent import prompt_agent
8
+ from plain.cli.agent.prompt import prompt_agent
9
9
  from plain.observer.models import Span, Trace
10
10
 
11
11
 
plain/observer/core.py CHANGED
@@ -13,7 +13,8 @@ class Observer:
13
13
  """Central class for managing observer state and operations."""
14
14
 
15
15
  COOKIE_NAME = "observer"
16
- COOKIE_DURATION = 60 * 60 * 24 # 1 day in seconds
16
+ SUMMARY_COOKIE_DURATION = 60 * 60 * 24 * 7 # 1 week in seconds
17
+ PERSIST_COOKIE_DURATION = 60 * 60 * 24 # 1 day in seconds
17
18
 
18
19
  def __init__(self, request):
19
20
  self.request = request
@@ -41,19 +42,25 @@ class Observer:
41
42
  def enable_summary_mode(self, response):
42
43
  """Enable summary mode (real-time monitoring, no DB export)."""
43
44
  response.set_signed_cookie(
44
- self.COOKIE_NAME, ObserverMode.SUMMARY.value, max_age=self.COOKIE_DURATION
45
+ self.COOKIE_NAME,
46
+ ObserverMode.SUMMARY.value,
47
+ max_age=self.SUMMARY_COOKIE_DURATION,
45
48
  )
46
49
 
47
50
  def enable_persist_mode(self, response):
48
51
  """Enable full persist mode (real-time monitoring + DB export)."""
49
52
  response.set_signed_cookie(
50
- self.COOKIE_NAME, ObserverMode.PERSIST.value, max_age=self.COOKIE_DURATION
53
+ self.COOKIE_NAME,
54
+ ObserverMode.PERSIST.value,
55
+ max_age=self.PERSIST_COOKIE_DURATION,
51
56
  )
52
57
 
53
58
  def disable(self, response):
54
59
  """Disable observer by setting cookie to disabled."""
55
60
  response.set_signed_cookie(
56
- self.COOKIE_NAME, ObserverMode.DISABLED.value, max_age=self.COOKIE_DURATION
61
+ self.COOKIE_NAME,
62
+ ObserverMode.DISABLED.value,
63
+ max_age=self.PERSIST_COOKIE_DURATION,
57
64
  )
58
65
 
59
66
  def get_current_trace_summary(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.observer
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: On-page telemetry and observability tools for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -1,10 +1,10 @@
1
- plain/observer/CHANGELOG.md,sha256=L7fXyg6SnsDYpkefMWe1l91IdYx5_hk45cIdSqZI118,6273
1
+ plain/observer/CHANGELOG.md,sha256=dY_jT_IisTqQOzhirekm0fNhsJQcx6MrGML5OhCuHYo,6735
2
2
  plain/observer/README.md,sha256=39RA17fgcyOkqeIWBOAg4Be6YZjoiDzK5PVOG-nseuY,988
3
3
  plain/observer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- plain/observer/admin.py,sha256=Ku3fEeV3ftuGpLyXY3segKZ_9BJNqapIT3XI-gz9i2c,2097
5
- plain/observer/cli.py,sha256=oP_aeno-xYQ2YemQVNFwhmLevDdkf1uLRk-wpOUxqdU,20640
4
+ plain/observer/admin.py,sha256=AsX6uGjIHN7EWu1Ez4VY8yYHiCydZ6bv7HCig9W9SI4,2096
5
+ plain/observer/cli.py,sha256=Jh5OwTtKmV6TTymfS9xv1R_tQL1tgfKKUS__19Wcnbk,20647
6
6
  plain/observer/config.py,sha256=FuJi1jiDSvOTcmP-6Ea4OlGZt5cRf4iTp1e0dgpJ45E,1494
7
- plain/observer/core.py,sha256=D9vX0GP8JBB8-NFAKrOwPSHl_wdZo1h0A5C6xKsJVjA,2245
7
+ plain/observer/core.py,sha256=ZHwQAXlqKa1BvHh3Xr6R0iOgkSNTEJ_Wg2lUlgMzWsE,2420
8
8
  plain/observer/default_settings.py,sha256=JN2jT2wfa6f80EqU0p4Ox_47xyxL-Ym5-_pftY7xj2U,197
9
9
  plain/observer/models.py,sha256=ZHu5SLWEpb4wOqQelGqAFmwSORCLH2H7T9GUYAoeLN0,13118
10
10
  plain/observer/otel.py,sha256=9OUvAJfEXBVuFIIs3CZZ8IYHu-QxRFklbPBtEVHHz54,14645
@@ -21,7 +21,7 @@ plain/observer/templates/observer/trace_share.html,sha256=HrYLti5BpX96-6Bm_37OOb
21
21
  plain/observer/templates/observer/traces.html,sha256=cFnlIuCf6XJEpHRD2_yfVmPDGZfiqMq6Cg-iMlT3CWY,22184
22
22
  plain/observer/templates/toolbar/observer.html,sha256=uaDKiWR7EYqC1kEXE-uHDlE7nfFEMR_zmOgvlKwQHJ4,1365
23
23
  plain/observer/templates/toolbar/observer_button.html,sha256=FMBJHKMGqpHWs-3Ei2PBCdVYZ_6vFw6-eKH_i4jQu-Q,1215
24
- plain_observer-0.4.0.dist-info/METADATA,sha256=hEIkYkPwnI3sKUTCP6_bP37n7Rq17E9IntyPl_bVt4w,1386
25
- plain_observer-0.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
- plain_observer-0.4.0.dist-info/licenses/LICENSE,sha256=YZdq6Pz8ivjs97eSVLRmoGDI1hjEikX6N49DfM0DWio,1500
27
- plain_observer-0.4.0.dist-info/RECORD,,
24
+ plain_observer-0.5.0.dist-info/METADATA,sha256=wpz5Pi6iYS5jpWgbusejdnoPrQir1nZ2VQiRZt4BOnE,1386
25
+ plain_observer-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ plain_observer-0.5.0.dist-info/licenses/LICENSE,sha256=YZdq6Pz8ivjs97eSVLRmoGDI1hjEikX6N49DfM0DWio,1500
27
+ plain_observer-0.5.0.dist-info/RECORD,,