better naming

This commit is contained in:
Adil Hafeez 2024-11-07 15:05:20 -08:00
parent 460d978f8a
commit 6632428909
2 changed files with 7 additions and 3 deletions

View file

@ -42,10 +42,14 @@ app = FastAPI()
FastAPIInstrumentor().instrument_app(app)
# DEFAULT_OTLP_HOST = "http://localhost:4317"
DEFAULT_OTLP_HOST = "none"
# Configure the OTLP exporter (Jaeger, Zipkin, etc.)
otlp_exporter = OTLPSpanExporter(
endpoint=os.getenv("OLTP_HOST", "http://localhost:4317") # noqa: F821
endpoint=os.getenv("OTLP_HOST", DEFAULT_OTLP_HOST) # noqa: F821
)
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(otlp_exporter))