paid-python 0.2.1__py3-none-any.whl → 0.3.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.
- paid/tracing/autoinstrumentation.py +24 -1
- {paid_python-0.2.1.dist-info → paid_python-0.3.0.dist-info}/METADATA +2 -1
- {paid_python-0.2.1.dist-info → paid_python-0.3.0.dist-info}/RECORD +5 -5
- {paid_python-0.2.1.dist-info → paid_python-0.3.0.dist-info}/LICENSE +0 -0
- {paid_python-0.2.1.dist-info → paid_python-0.3.0.dist-info}/WHEEL +0 -0
|
@@ -56,6 +56,13 @@ try:
|
|
|
56
56
|
except ImportError:
|
|
57
57
|
LANGCHAIN_AVAILABLE = False
|
|
58
58
|
|
|
59
|
+
try:
|
|
60
|
+
from openinference.instrumentation.google_genai import GoogleGenAIInstrumentor
|
|
61
|
+
|
|
62
|
+
GOOGLE_GENAI_AVAILABLE = True
|
|
63
|
+
except ImportError:
|
|
64
|
+
GOOGLE_GENAI_AVAILABLE = False
|
|
65
|
+
|
|
59
66
|
|
|
60
67
|
# Track which instrumentors have been initialized
|
|
61
68
|
_initialized_instrumentors: List[str] = []
|
|
@@ -77,6 +84,7 @@ def paid_autoinstrument(libraries: Optional[List[str]] = None) -> None:
|
|
|
77
84
|
- "openai-agents": OpenAI Agents SDK
|
|
78
85
|
- "bedrock": AWS Bedrock
|
|
79
86
|
- "langchain": LangChain library
|
|
87
|
+
- "google-genai": Google GenAI library
|
|
80
88
|
If None, all supported libraries that are installed will be instrumented.
|
|
81
89
|
|
|
82
90
|
Note:
|
|
@@ -106,7 +114,7 @@ def paid_autoinstrument(libraries: Optional[List[str]] = None) -> None:
|
|
|
106
114
|
|
|
107
115
|
# Default to all supported libraries if none specified
|
|
108
116
|
if libraries is None:
|
|
109
|
-
libraries = ["anthropic", "gemini", "openai", "openai-agents", "bedrock", "langchain"]
|
|
117
|
+
libraries = ["anthropic", "gemini", "openai", "openai-agents", "bedrock", "langchain", "google-genai"]
|
|
110
118
|
|
|
111
119
|
for library in libraries:
|
|
112
120
|
if library in _initialized_instrumentors:
|
|
@@ -125,6 +133,8 @@ def paid_autoinstrument(libraries: Optional[List[str]] = None) -> None:
|
|
|
125
133
|
_instrument_bedrock()
|
|
126
134
|
elif library == "langchain":
|
|
127
135
|
_instrument_langchain()
|
|
136
|
+
elif library == "google-genai":
|
|
137
|
+
_instrument_google_genai()
|
|
128
138
|
else:
|
|
129
139
|
logger.warning(
|
|
130
140
|
f"Unknown library '{library}' - supported libraries: anthropic, gemini, openai, openai-agents, bedrock, langchain"
|
|
@@ -222,3 +232,16 @@ def _instrument_langchain() -> None:
|
|
|
222
232
|
|
|
223
233
|
_initialized_instrumentors.append("langchain")
|
|
224
234
|
logger.info("LangChain auto-instrumentation enabled")
|
|
235
|
+
|
|
236
|
+
def _instrument_google_genai() -> None:
|
|
237
|
+
"""
|
|
238
|
+
Instrument Google GenAI using openinference-instrumentation-google-genai.
|
|
239
|
+
"""
|
|
240
|
+
if not GOOGLE_GENAI_AVAILABLE:
|
|
241
|
+
logger.warning("Google GenAI instrumentation library not available, skipping instrumentation")
|
|
242
|
+
return
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
GoogleGenAIInstrumentor().instrument(tracer_provider=tracing.paid_tracer_provider)
|
|
246
|
+
_initialized_instrumentors.append("google-genai")
|
|
247
|
+
logger.info("Google GenAI auto-instrumentation enabled")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: paid-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.9,<3.14
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -20,6 +20,7 @@ Classifier: Typing :: Typed
|
|
|
20
20
|
Requires-Dist: httpx (>=0.21.0)
|
|
21
21
|
Requires-Dist: mutagen (>=1.47.0)
|
|
22
22
|
Requires-Dist: openinference-instrumentation-bedrock (>=0.1.0)
|
|
23
|
+
Requires-Dist: openinference-instrumentation-google-genai (>=0.1.8)
|
|
23
24
|
Requires-Dist: openinference-instrumentation-openai-agents (>=1.0.0)
|
|
24
25
|
Requires-Dist: opentelemetry-api (>=1.23.0)
|
|
25
26
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.23.0)
|
|
@@ -37,7 +37,7 @@ paid/orders/lines/raw_client.py,sha256=KZN_yBokCOkf1lUb4ZJtX_NZbqmTqCdJNoaIOdWar
|
|
|
37
37
|
paid/orders/raw_client.py,sha256=650e1Sj2vi9KVJc15M3ENXIKYoth0qMz66dzvXy1Sb4,16245
|
|
38
38
|
paid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
paid/tracing/__init__.py,sha256=Pe55koIwqJ6Vv5-9Wqi8xIdwCS2BbxZds-MK5fD-F5Y,506
|
|
40
|
-
paid/tracing/autoinstrumentation.py,sha256=
|
|
40
|
+
paid/tracing/autoinstrumentation.py,sha256=LNZJ8wXCu4g8sgd7DkWJCLBljsePr2D0E06scJfXG9g,8470
|
|
41
41
|
paid/tracing/context_data.py,sha256=UFCZxX6zGa9w5lGLQK5tXdMM69aV52nReUkxwfN9S6A,2378
|
|
42
42
|
paid/tracing/context_manager.py,sha256=ZQtsJ9JPxTwn2t4AW26WpYboaOEZdI2T1Sw0Rwsbf-E,8470
|
|
43
43
|
paid/tracing/distributed_tracing.py,sha256=XCUGFBB2lksrR19Mry10cTZRFSCSztUbUjE_sKCwjX8,3995
|
|
@@ -99,7 +99,7 @@ paid/usage/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
|
99
99
|
paid/usage/client.py,sha256=280WJuepoovk3BAVbAx2yN2Q_qBdvx3CcPkLu8lXslc,3030
|
|
100
100
|
paid/usage/raw_client.py,sha256=2acg5C4lxuZodZjepU9QYF0fmBxgG-3ZgXs1zUJG-wM,3709
|
|
101
101
|
paid/version.py,sha256=QIpDFnOrxMxrs86eL0iNH0mSZ1DO078wWHYY9TYAoew,78
|
|
102
|
-
paid_python-0.
|
|
103
|
-
paid_python-0.
|
|
104
|
-
paid_python-0.
|
|
105
|
-
paid_python-0.
|
|
102
|
+
paid_python-0.3.0.dist-info/LICENSE,sha256=Nz4baY1zvv0Qy7lqrQtbaiMhmEeGr2Q7A93aqzpml4c,1071
|
|
103
|
+
paid_python-0.3.0.dist-info/METADATA,sha256=uwDSnsVHDB_IrUSbds61pzA6udH1VxceYb445lSfoAM,22411
|
|
104
|
+
paid_python-0.3.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
105
|
+
paid_python-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|