trodo-python 3.0.5__py3-none-any.whl → 3.0.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.
trodo/__init__.py CHANGED
@@ -813,8 +813,9 @@ def feedback(
813
813
  feedback: Optional[str] = None,
814
814
  distinct_id: Optional[str] = None,
815
815
  metadata: Optional[Dict[str, Any]] = None,
816
+ span_id: Optional[str] = None,
816
817
  ) -> ApiResult:
817
- """Attach feedback to a completed run."""
818
+ """Attach feedback to a run, or with ``span_id`` to one span of it."""
818
819
  return _get_client().feedback(
819
820
  run_id,
820
821
  satisfaction=satisfaction,
@@ -823,6 +824,7 @@ def feedback(
823
824
  feedback=feedback,
824
825
  distinct_id=distinct_id,
825
826
  metadata=metadata,
827
+ span_id=span_id,
826
828
  )
827
829
 
828
830
 
trodo/_version.py CHANGED
@@ -1 +1 @@
1
- SDK_VERSION = "3.0.5"
1
+ SDK_VERSION = "3.0.6"
trodo/client.py CHANGED
@@ -608,8 +608,9 @@ class TrodoClient:
608
608
  feedback: Optional[str] = None,
609
609
  distinct_id: Optional[str] = None,
610
610
  metadata: Optional[Dict[str, Any]] = None,
611
+ span_id: Optional[str] = None,
611
612
  ) -> ApiResult:
612
- """Attach feedback to a completed run."""
613
+ """Attach feedback to a run, or with ``span_id`` to one span of it (3.0.6)."""
613
614
  if satisfaction is None and rating is None and not (comment or feedback):
614
615
  raise ValueError(
615
616
  "At least one of 'satisfaction', 'rating', or 'comment' is required"
@@ -621,6 +622,8 @@ class TrodoClient:
621
622
  "distinct_id": distinct_id,
622
623
  "attributes": metadata or {},
623
624
  }
625
+ if span_id:
626
+ payload["span_id"] = span_id
624
627
  # Queued behind the run it belongs to (2.24): never waits on the
625
628
  # network, survives an outage, and lands after its run.
626
629
  self._sender.enqueue({"run_id": run_id, "feedback": payload})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trodo-python
3
- Version: 3.0.5
3
+ Version: 3.0.6
4
4
  Summary: Trodo Analytics SDK for Python — server-side event tracking
5
5
  License: ISC
6
6
  Keywords: analytics,tracking,trodo,server-side
@@ -1,6 +1,6 @@
1
- trodo/__init__.py,sha256=OE5ErInLQm9iN6oX_ETlczzlspO4SpPSHs-j3iCJ0PA,27144
2
- trodo/_version.py,sha256=AAGdjvNyabDxySs9eTKJfIMjZBBUwP1_1LalzfmJcjo,22
3
- trodo/client.py,sha256=eaZtHMtOI-VLgfoqM_KVWMuP_I5Ivs7VFnR0oU96Yqk,23743
1
+ trodo/__init__.py,sha256=0x6Zrt4j0wpRaGSxvVzJW8lh_2DNRHcBiVKrMM8mUEk,27233
2
+ trodo/_version.py,sha256=qKwdJvcO3P8QjaYxAoRx_NCIZfhAAd-DtBQpYCR4_Wc,22
3
+ trodo/client.py,sha256=I6SRllM6LbEj4XPoT8UD47lRglI7jhKxgOdYKYs_x-c,23880
4
4
  trodo/types.py,sha256=eySgUvCXROG2TxtxgiU0MNr5iH0DEcduK8bmYtTKG44,3138
5
5
  trodo/user_context.py,sha256=uHCI2WYoOI3cNwdIUEuZdX4VYSu14pzm348ksn6hn_c,8195
6
6
  trodo/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -40,7 +40,7 @@ trodo/session/server_session.py,sha256=McsudEiq33XDq3nqxgzBcUvIjQxCMscwEuAPnYXrT
40
40
  trodo/session/session_manager.py,sha256=7ht5LeeZX1HLLfPeNV_a8NkXGbHl3up0CRtCGr3EzjQ,2995
41
41
  trodo/util/__init__.py,sha256=Z9c4rPPdKg06Kk3byKheDqksSgR4WNvS475oQ5sNljc,54
42
42
  trodo/util/lru.py,sha256=QIsM7s6J_E9ZjiXatSyReZIEeGypTAcgrPWWy8YsRa4,2465
43
- trodo_python-3.0.5.dist-info/METADATA,sha256=5sygq2YuSYOSITqSD8bZGtLj0YbfGzpLuf-ls8-5GlU,25307
44
- trodo_python-3.0.5.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
45
- trodo_python-3.0.5.dist-info/top_level.txt,sha256=VCQu1CJWFmNsqTs1YxMcw4Mq35Tc3z3uI9RwHEXAayQ,6
46
- trodo_python-3.0.5.dist-info/RECORD,,
43
+ trodo_python-3.0.6.dist-info/METADATA,sha256=vX_4eP5iK-7twSVt1H3g-MxznSLTdbipCK9E1WJxlAg,25307
44
+ trodo_python-3.0.6.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
45
+ trodo_python-3.0.6.dist-info/top_level.txt,sha256=VCQu1CJWFmNsqTs1YxMcw4Mq35Tc3z3uI9RwHEXAayQ,6
46
+ trodo_python-3.0.6.dist-info/RECORD,,