fix: function

This commit is contained in:
Project_IO 2024-10-10 15:33:57 +09:00
parent 70bc590b0c
commit b787891c27

4
app.py
View file

@ -43,11 +43,11 @@ app.include_router(router=balance)
if get_otld(): if get_otld():
import logging import logging
from otlp_tracing import configure_otel_otlp from otlp_tracing import configure_oltp_grpc_tracing
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
tracer = configure_otel_otlp() tracer = configure_oltp_grpc_tracing()
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
FastAPIInstrumentor.instrument_app(app) FastAPIInstrumentor.instrument_app(app)