plain.observer 0.3.5__py3-none-any.whl → 0.3.6__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.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
+
3
14
  ## [0.3.5](https://github.com/dropseed/plain/releases/plain-observer@0.3.5) (2025-07-30)
4
15
 
5
16
  ### 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
+ ]
plain/observer/models.py CHANGED
@@ -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"]),
plain/observer/otel.py CHANGED
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.observer
3
- Version: 0.3.5
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,4 +1,4 @@
1
- plain/observer/CHANGELOG.md,sha256=-xQJV_8LKGIx8SpCjiJ2uLHRHsjD7NgXddolsnyDHMw,5091
1
+ plain/observer/CHANGELOG.md,sha256=NWvfWKdJKWHQBvl0sfuH2lBty2JWmqedlwSr8p0UtDQ,5573
2
2
  plain/observer/README.md,sha256=39RA17fgcyOkqeIWBOAg4Be6YZjoiDzK5PVOG-nseuY,988
3
3
  plain/observer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  plain/observer/admin.py,sha256=Csvd5V9F5u0zksWpbpISY_NlBJa-0TptSX_Kn652WRc,2719
@@ -6,12 +6,13 @@ plain/observer/cli.py,sha256=oP_aeno-xYQ2YemQVNFwhmLevDdkf1uLRk-wpOUxqdU,20640
6
6
  plain/observer/config.py,sha256=FuJi1jiDSvOTcmP-6Ea4OlGZt5cRf4iTp1e0dgpJ45E,1494
7
7
  plain/observer/core.py,sha256=D9vX0GP8JBB8-NFAKrOwPSHl_wdZo1h0A5C6xKsJVjA,2245
8
8
  plain/observer/default_settings.py,sha256=JN2jT2wfa6f80EqU0p4Ox_47xyxL-Ym5-_pftY7xj2U,197
9
- plain/observer/models.py,sha256=uVmytQHCYilMfULGJHk63l48APOHqEcbcRtYoE7L_RU,13072
10
- plain/observer/otel.py,sha256=nr4BYQb6rWF7uXsOVmBWV-8z5jLTPbDnYi6VSdVvUnE,14585
9
+ plain/observer/models.py,sha256=ZHu5SLWEpb4wOqQelGqAFmwSORCLH2H7T9GUYAoeLN0,13118
10
+ plain/observer/otel.py,sha256=9OUvAJfEXBVuFIIs3CZZ8IYHu-QxRFklbPBtEVHHz54,14645
11
11
  plain/observer/urls.py,sha256=oLJoDjB7YMUx8z-MGql_xXSXkfacVKFp-aHNXaKzs38,376
12
12
  plain/observer/views.py,sha256=bPBByjs1ZlsN-9wgiO4OqQYR9uPXBYnasqV2ZZLJU0Q,4626
13
13
  plain/observer/migrations/0001_initial.py,sha256=HVoSrd5V-IOqD1adADIAzqMH8xMlPwyLOFH6JcGFniI,3312
14
14
  plain/observer/migrations/0002_trace_share_created_at_trace_share_id_trace_summary_and_more.py,sha256=lgFqdn66zq7AoCvkC3MIvLXiE_Omup5EEMDSe1jpKOg,1765
15
+ plain/observer/migrations/0003_span_plainobserv_span_id_e7ade3_idx.py,sha256=54G8GXi-PiFbcTU-HrXO14UN9PxhjDCY05TA9HHkkmk,527
15
16
  plain/observer/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
17
  plain/observer/templates/observer/trace.html,sha256=42yuvqAH7poRMFbueXT-MeSIClmUaLSHohG9LF0sepk,27098
17
18
  plain/observer/templates/observer/trace_detail.html,sha256=86-YGCpg9gy31Pd2vDHB3LYRkJile-DsGD1Enjx9s5Y,943
@@ -19,7 +20,7 @@ plain/observer/templates/observer/trace_share.html,sha256=HrYLti5BpX96-6Bm_37OOb
19
20
  plain/observer/templates/observer/traces.html,sha256=cFnlIuCf6XJEpHRD2_yfVmPDGZfiqMq6Cg-iMlT3CWY,22184
20
21
  plain/observer/templates/toolbar/observer.html,sha256=uaDKiWR7EYqC1kEXE-uHDlE7nfFEMR_zmOgvlKwQHJ4,1365
21
22
  plain/observer/templates/toolbar/observer_button.html,sha256=FMBJHKMGqpHWs-3Ei2PBCdVYZ_6vFw6-eKH_i4jQu-Q,1215
22
- plain_observer-0.3.5.dist-info/METADATA,sha256=bc3x8wVM3wnBmXV47w_l5JB5LDraDx8oo5-rF8rQnB0,1386
23
- plain_observer-0.3.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
- plain_observer-0.3.5.dist-info/licenses/LICENSE,sha256=YZdq6Pz8ivjs97eSVLRmoGDI1hjEikX6N49DfM0DWio,1500
25
- plain_observer-0.3.5.dist-info/RECORD,,
23
+ plain_observer-0.3.6.dist-info/METADATA,sha256=DYTIH8zQUCyy6EyVidmy8GfbBEeK7t1HbRhHmOj1ljg,1386
24
+ plain_observer-0.3.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
25
+ plain_observer-0.3.6.dist-info/licenses/LICENSE,sha256=YZdq6Pz8ivjs97eSVLRmoGDI1hjEikX6N49DfM0DWio,1500
26
+ plain_observer-0.3.6.dist-info/RECORD,,