From f23ffa7675a2e6beabd567b4ba4f900c21c6fd5e Mon Sep 17 00:00:00 2001 From: Vincent Emonet Date: Wed, 10 Jan 2024 16:20:13 +0100 Subject: [PATCH] fix opentelemetry --- src/trapi_predict_kit/trapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/trapi_predict_kit/trapi.py b/src/trapi_predict_kit/trapi.py index 62a4fa3..5a692d1 100644 --- a/src/trapi_predict_kit/trapi.py +++ b/src/trapi_predict_kit/trapi.py @@ -312,7 +312,8 @@ def add_opentelemetry(app: FastAPI, service_name: str) -> None: agent_port=jaeger_port, ) trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(jaeger_exporter)) - # tracer = trace.get_tracer(__name__) - FastAPIInstrumentor.instrument_app(app, tracer_provider=trace, excluded_urls="docs,openapi.json") + trace.get_tracer(__name__) + FastAPIInstrumentor.instrument_app(app, excluded_urls="docs,openapi.json") + # FastAPIInstrumentor.instrument_app(app, tracer_provider=trace, excluded_urls="docs,openapi.json") RequestsInstrumentor().instrument() HTTPXClientInstrumentor().instrument()