Fix Grafana tempo and observability config (#1161)

* Add database and queue observability

* Update prometheus

* Delete the wrong changes

* Fix Grafana tempo and observability config
This commit is contained in:
Wu Clan
2026-04-26 13:09:47 +08:00
committed by GitHub
parent 576b2fc5d0
commit b60c9ab17c
5 changed files with 31 additions and 38 deletions
+1 -4
View File
@@ -9,17 +9,14 @@ from opentelemetry.instrumentation.celery import CeleryInstrumentor
from backend.app.task.tasks.beat import LOCAL_BEAT_SCHEDULE
from backend.common.enums import DataBaseType
from backend.common.observability.otel import init_resource, init_tracer
from backend.core.conf import settings
from backend.core.path_conf import BASE_PATH
@worker_process_init.connect(weak=False)
def init_celery_worker_tracing(*args, **kwargs) -> None:
def init_celery_tracing(*args, **kwargs) -> None:
"""初始化 Celery 追踪"""
if settings.GRAFANA_METRICS_ENABLE:
resource = init_resource('fba_celery_worker')
init_tracer(resource)
CeleryInstrumentor().instrument()