trodo-python 2.10.0__py3-none-any.whl → 2.10.2__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
@@ -40,7 +40,7 @@ Downstream microservice (join the caller's run instead of making a new one):
40
40
 
41
41
  from __future__ import annotations
42
42
 
43
- __version__ = "2.10.0"
43
+ __version__ = "2.10.2"
44
44
 
45
45
  from typing import Any, Callable, Dict, List, Optional, Union
46
46
 
@@ -263,11 +263,24 @@ def _register_instrumentors() -> None:
263
263
  LlamaIndexInstrumentor().instrument()
264
264
 
265
265
  def _google_generativeai() -> Any:
266
- from opentelemetry.instrumentation.google_generativeai import ( # type: ignore
267
- GoogleGenerativeAIInstrumentor,
266
+ import opentelemetry.instrumentation.google_generativeai as _m # type: ignore
267
+
268
+ # The exported class name varies by version: GoogleGenerativeAiInstrumentor
269
+ # (current — note the lowercase 'i'), GoogleGenerativeAIInstrumentor, or
270
+ # GenAIInstrumentor. Importing the wrong casing silently disabled Gemini
271
+ # auto-instrumentation. (This instrumentation patches the new @google/genai
272
+ # SDK, i.e. the `google-genai` package, not legacy google-generativeai.)
273
+ instr = (
274
+ getattr(_m, "GoogleGenerativeAiInstrumentor", None)
275
+ or getattr(_m, "GoogleGenerativeAIInstrumentor", None)
276
+ or getattr(_m, "GenAIInstrumentor", None)
268
277
  )
269
-
270
- GoogleGenerativeAIInstrumentor().instrument()
278
+ if instr is None:
279
+ raise ImportError(
280
+ "no GoogleGenerativeAi/GenAI Instrumentor in "
281
+ "opentelemetry.instrumentation.google_generativeai"
282
+ )
283
+ instr().instrument()
271
284
 
272
285
  def _vertexai() -> Any:
273
286
  from opentelemetry.instrumentation.vertexai import VertexAIInstrumentor # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trodo-python
3
- Version: 2.10.0
3
+ Version: 2.10.2
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,4 +1,4 @@
1
- trodo/__init__.py,sha256=qkeqpKx-jNb_bkLxbo-JmFR6tfMrc3QAuVvKRdJSMgk,16679
1
+ trodo/__init__.py,sha256=3qF2ct1F37njSx6VbFhoa6QjXWtB7UhJ3ZwBTQjZPRE,16679
2
2
  trodo/client.py,sha256=8DsKoLh_eaNxj93qkHynfeee-QsdomB_kXfUQjGnWDk,18607
3
3
  trodo/types.py,sha256=eySgUvCXROG2TxtxgiU0MNr5iH0DEcduK8bmYtTKG44,3138
4
4
  trodo/user_context.py,sha256=9la6azzwEanVmdP4ps_xMoufbeWVeIGU-M8ychmgajg,7859
@@ -12,7 +12,7 @@ trodo/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  trodo/managers/group_manager.py,sha256=ki3Se3qEoSZfREX63oeDeBmEfZF-ISHLE8azEtLg0tM,3542
13
13
  trodo/managers/people_manager.py,sha256=mMVnx40Mlifx6NGgChvohC9ViK6dQu2mkXNHbV8pK1E,2882
14
14
  trodo/otel/__init__.py,sha256=yiRFXWUU45bAM2CV37XeO7zf1hmnmjufdP4XO50yEyE,624
15
- trodo/otel/auto_instrument.py,sha256=gym90cYD6NzVDVsNtUjKHdKANy17t4AnU4lYGEGHyo8,12866
15
+ trodo/otel/auto_instrument.py,sha256=QlMQ_Ru9km82uZRi30F8nkqMLD-m-ZY9pRCm8KoL_a0,13614
16
16
  trodo/otel/context.py,sha256=iJ1rE42-SbO8VZHAxhIl2ZJXgNwLIVps5xLg8GKgfFc,1165
17
17
  trodo/otel/helpers.py,sha256=4HsjMOrE-7zuvaRSiGXxV7ZyfXQ5gLxtR3HdpLut9sk,20054
18
18
  trodo/otel/processor.py,sha256=aqcTmzTw9cESgIp829pu_XCa5_dG_2MaeJNsqJZeqQU,7495
@@ -25,7 +25,7 @@ trodo/queue/event_queue.py,sha256=EVFZrhlq_kwC3jJ2GK0wMhHISf9UzLCZNDnT_aZ2I2A,87
25
25
  trodo/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  trodo/session/server_session.py,sha256=McsudEiq33XDq3nqxgzBcUvIjQxCMscwEuAPnYXrTjs,2136
27
27
  trodo/session/session_manager.py,sha256=JrgH1VeicmtlxPR4dXEuJbxhi23OelkgwW3-9Slv80o,2525
28
- trodo_python-2.10.0.dist-info/METADATA,sha256=ygRdfLxMzy896pqXhPsUEHeAULJ2P2BopImCjynGC08,20483
29
- trodo_python-2.10.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
30
- trodo_python-2.10.0.dist-info/top_level.txt,sha256=VCQu1CJWFmNsqTs1YxMcw4Mq35Tc3z3uI9RwHEXAayQ,6
31
- trodo_python-2.10.0.dist-info/RECORD,,
28
+ trodo_python-2.10.2.dist-info/METADATA,sha256=rzorkzDsPPU9U0SfujfvBuHfxeou77iKLIzzMb62YrA,20483
29
+ trodo_python-2.10.2.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
30
+ trodo_python-2.10.2.dist-info/top_level.txt,sha256=VCQu1CJWFmNsqTs1YxMcw4Mq35Tc3z3uI9RwHEXAayQ,6
31
+ trodo_python-2.10.2.dist-info/RECORD,,