mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 04:36:31 +08:00
Update api/extensions/otel/runtime.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
4f5af0b43c
commit
942729ba48
@ -51,8 +51,10 @@ def flush_telemetry() -> None:
|
||||
|
||||
metric_provider = metrics.get_meter_provider()
|
||||
if hasattr(metric_provider, "force_flush"):
|
||||
with contextlib.suppress(Exception):
|
||||
try:
|
||||
metric_provider.force_flush()
|
||||
except Exception:
|
||||
logger.exception("otel: failed to flush metric provider")
|
||||
|
||||
|
||||
def is_celery_worker():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user