plain.observer 0.3.4__tar.gz → 0.3.6__tar.gz

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.

Files changed (27) hide show
  1. {plain_observer-0.3.4 → plain_observer-0.3.6}/PKG-INFO +1 -1
  2. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/CHANGELOG.md +22 -0
  3. plain_observer-0.3.6/plain/observer/migrations/0003_span_plainobserv_span_id_e7ade3_idx.py +22 -0
  4. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/models.py +1 -0
  5. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/otel.py +5 -4
  6. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/templates/toolbar/observer_button.html +2 -2
  7. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/views.py +10 -0
  8. {plain_observer-0.3.4 → plain_observer-0.3.6}/pyproject.toml +1 -1
  9. {plain_observer-0.3.4 → plain_observer-0.3.6}/.gitignore +0 -0
  10. {plain_observer-0.3.4 → plain_observer-0.3.6}/LICENSE +0 -0
  11. {plain_observer-0.3.4 → plain_observer-0.3.6}/README.md +0 -0
  12. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/README.md +0 -0
  13. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/__init__.py +0 -0
  14. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/admin.py +0 -0
  15. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/cli.py +0 -0
  16. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/config.py +0 -0
  17. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/core.py +0 -0
  18. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/default_settings.py +0 -0
  19. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/migrations/0001_initial.py +0 -0
  20. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/migrations/0002_trace_share_created_at_trace_share_id_trace_summary_and_more.py +0 -0
  21. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/migrations/__init__.py +0 -0
  22. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/templates/observer/trace.html +0 -0
  23. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/templates/observer/trace_detail.html +0 -0
  24. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/templates/observer/trace_share.html +0 -0
  25. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/templates/observer/traces.html +0 -0
  26. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/templates/toolbar/observer.html +0 -0
  27. {plain_observer-0.3.4 → plain_observer-0.3.6}/plain/observer/urls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.observer
3
- Version: 0.3.4
3
+ Version: 0.3.6
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,5 +1,27 @@
1
1
  # plain-observer changelog
2
2
 
3
+ ## [0.3.6](https://github.com/dropseed/plain/releases/plain-observer@0.3.6) (2025-07-31)
4
+
5
+ ### What's changed
6
+
7
+ - Added database index on `span_id` field in the Span model for improved query performance ([f836542](https://github.com/dropseed/plain/commit/f836542df6))
8
+ - Database tracing is now suppressed when querying for span links to prevent recursive tracing loops ([f836542](https://github.com/dropseed/plain/commit/f836542df6))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - No changes required
13
+
14
+ ## [0.3.5](https://github.com/dropseed/plain/releases/plain-observer@0.3.5) (2025-07-30)
15
+
16
+ ### What's changed
17
+
18
+ - Improved observer toolbar button text clarity for empty states - "Recording" now shows as "Recording (no summary)" and "Summary" shows as "No summary" ([143c2a6](https://github.com/dropseed/plain/commit/143c2a61a7))
19
+ - Fixed observer auto-enable functionality by adding POST handler for summary mode actions ([cc415e0](https://github.com/dropseed/plain/commit/cc415e0af7))
20
+
21
+ ### Upgrade instructions
22
+
23
+ - No changes required
24
+
3
25
  ## [0.3.4](https://github.com/dropseed/plain/releases/plain-observer@0.3.4) (2025-07-30)
4
26
 
5
27
  ### What's changed
@@ -0,0 +1,22 @@
1
+ # Generated by Plain 0.56.1 on 2025-07-31 21:57
2
+
3
+ from plain import models
4
+ from plain.models import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ (
10
+ "plainobserver",
11
+ "0002_trace_share_created_at_trace_share_id_trace_summary_and_more",
12
+ ),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.AddIndex(
17
+ model_name="span",
18
+ index=models.Index(
19
+ fields=["span_id"], name="plainobserv_span_id_e7ade3_idx"
20
+ ),
21
+ ),
22
+ ]
@@ -258,6 +258,7 @@ class Span(models.Model):
258
258
  )
259
259
  ]
260
260
  indexes = [
261
+ models.Index(fields=["span_id"]),
261
262
  models.Index(fields=["trace", "span_id"]),
262
263
  models.Index(fields=["trace"]),
263
264
  models.Index(fields=["start_time"]),
@@ -361,10 +361,11 @@ class ObserverSpanProcessor(SpanProcessor):
361
361
  if link.context.is_valid and link.context.span_id:
362
362
  from .models import Span
363
363
 
364
- if Span.objects.filter(
365
- span_id=f"0x{format_span_id(link.context.span_id)}"
366
- ).exists():
367
- return ObserverMode.PERSIST.value
364
+ with suppress_db_tracing():
365
+ if Span.objects.filter(
366
+ span_id=f"0x{format_span_id(link.context.span_id)}"
367
+ ).exists():
368
+ return ObserverMode.PERSIST.value
368
369
 
369
370
  if not (context := parent_context or context_api.get_current()):
370
371
  return None
@@ -18,9 +18,9 @@
18
18
  {% if observer.get_current_trace_summary() %}
19
19
  {{ observer.get_current_trace_summary() }}
20
20
  {% elif observer.is_persisting() %}
21
- Recording
21
+ Recording (no summary)
22
22
  {% elif observer.is_summarizing() %}
23
- Summary
23
+ No summary
24
24
  {% elif observer.is_enabled() %}
25
25
  Observing
26
26
  {% else %}
@@ -61,6 +61,16 @@ class ObserverTracesView(AuthViewMixin, HTMXViewMixin, ListView):
61
61
  response.headers["HX-Refresh"] = "true"
62
62
  return response
63
63
 
64
+ def post(self):
65
+ """Handle POST requests to set observer mode."""
66
+ action = self.request.data.get("observe_action")
67
+ if action == "summary":
68
+ observer = Observer(self.request)
69
+ response = Response(status_code=204)
70
+ observer.enable_summary_mode(response)
71
+ return response
72
+ return Response("Invalid action", status_code=400)
73
+
64
74
 
65
75
  class ObserverTraceDetailView(AuthViewMixin, HTMXViewMixin, DetailView):
66
76
  """Detail view for a specific trace."""
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plain.observer"
3
- version = "0.3.4"
3
+ version = "0.3.6"
4
4
  description = "On-page telemetry and observability tools for Plain."
5
5
  authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}]
6
6
  license = "BSD-3-Clause"
File without changes
File without changes