Skip to content

Commit

Permalink
fix opentelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Jan 10, 2024
1 parent eeefe9d commit f23ffa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/trapi_predict_kit/trapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit f23ffa7

Please sign in to comment.