Imporve monitoring 2
This commit is contained in:
@@ -68,7 +68,7 @@ def setup_otel_logging(
|
||||
if otel_endpoint is None:
|
||||
otel_endpoint = os.getenv(
|
||||
"OTEL_EXPORTER_OTLP_ENDPOINT",
|
||||
os.getenv("OTEL_COLLECTOR_ENDPOINT", "http://signoz-otel-collector.signoz:4318")
|
||||
os.getenv("OTEL_COLLECTOR_ENDPOINT", "http://signoz-otel-collector.bakery-ia:4318")
|
||||
)
|
||||
|
||||
# Ensure endpoint has /v1/logs path for HTTP
|
||||
|
||||
@@ -69,7 +69,7 @@ def setup_otel_metrics(
|
||||
if otel_endpoint is None:
|
||||
otel_endpoint = os.getenv(
|
||||
"OTEL_EXPORTER_OTLP_ENDPOINT",
|
||||
os.getenv("OTEL_COLLECTOR_ENDPOINT", "http://signoz-otel-collector.signoz:4318")
|
||||
os.getenv("OTEL_COLLECTOR_ENDPOINT", "http://signoz-otel-collector.bakery-ia:4318")
|
||||
)
|
||||
|
||||
# Ensure endpoint has /v1/metrics path for HTTP
|
||||
|
||||
@@ -22,7 +22,7 @@ def setup_tracing(
|
||||
app,
|
||||
service_name: str,
|
||||
service_version: str = "1.0.0",
|
||||
otel_endpoint: str = "http://signoz-otel-collector.signoz:4318"
|
||||
otel_endpoint: str = "http://signoz-otel-collector.bakery-ia:4318"
|
||||
):
|
||||
"""
|
||||
Setup OpenTelemetry distributed tracing for a FastAPI service.
|
||||
|
||||
@@ -151,7 +151,7 @@ class BaseFastAPIService:
|
||||
try:
|
||||
otel_endpoint = os.getenv(
|
||||
"OTEL_COLLECTOR_ENDPOINT",
|
||||
"http://signoz-otel-collector.signoz:4318"
|
||||
"http://signoz-otel-collector.bakery-ia:4318"
|
||||
)
|
||||
setup_tracing(self.app, self.service_name, self.version, otel_endpoint)
|
||||
self.logger.info(f"Distributed tracing enabled for {self.service_name}")
|
||||
|
||||
Reference in New Issue
Block a user