2020from __future__ import annotations
2121
2222import logging
23- import os
2423from typing import TYPE_CHECKING , List , Optional
2524
2625if TYPE_CHECKING :
@@ -158,10 +157,12 @@ def enable(
158157
159158 # Propagators (W3C TraceContext + Baggage)
160159 set_global_textmap (
161- CompositePropagator ([
162- TraceContextTextMapPropagator (),
163- W3CBaggagePropagator (),
164- ])
160+ CompositePropagator (
161+ [
162+ TraceContextTextMapPropagator (),
163+ W3CBaggagePropagator (),
164+ ]
165+ )
165166 )
166167
167168 logger .info ("Botanu SDK tracing initialized" )
@@ -190,7 +191,9 @@ def _enable_auto_instrumentation() -> None:
190191 _try_instrument (enabled , failed , "httpx" , "opentelemetry.instrumentation.httpx" , "HTTPXClientInstrumentation" )
191192 _try_instrument (enabled , failed , "requests" , "opentelemetry.instrumentation.requests" , "RequestsInstrumentor" )
192193 _try_instrument (enabled , failed , "urllib3" , "opentelemetry.instrumentation.urllib3" , "URLLib3Instrumentor" )
193- _try_instrument (enabled , failed , "aiohttp" , "opentelemetry.instrumentation.aiohttp_client" , "AioHttpClientInstrumentor" )
194+ _try_instrument (
195+ enabled , failed , "aiohttp" , "opentelemetry.instrumentation.aiohttp_client" , "AioHttpClientInstrumentor"
196+ )
194197
195198 # Web frameworks
196199 _try_instrument (enabled , failed , "fastapi" , "opentelemetry.instrumentation.fastapi" , "FastAPIInstrumentor" )
@@ -216,7 +219,9 @@ def _enable_auto_instrumentation() -> None:
216219 _try_instrument (enabled , failed , "openai" , "opentelemetry.instrumentation.openai_v2" , "OpenAIInstrumentor" )
217220 _try_instrument (enabled , failed , "anthropic" , "opentelemetry.instrumentation.anthropic" , "AnthropicInstrumentor" )
218221 _try_instrument (enabled , failed , "vertexai" , "opentelemetry.instrumentation.vertexai" , "VertexAIInstrumentor" )
219- _try_instrument (enabled , failed , "google_genai" , "opentelemetry.instrumentation.google_genai" , "GoogleGenAiInstrumentor" )
222+ _try_instrument (
223+ enabled , failed , "google_genai" , "opentelemetry.instrumentation.google_genai" , "GoogleGenAiInstrumentor"
224+ )
220225 _try_instrument (enabled , failed , "langchain" , "opentelemetry.instrumentation.langchain" , "LangchainInstrumentor" )
221226
222227 # Runtime
0 commit comments