summary refs log tree commit diff
path: root/synapse/metrics/background_process_metrics.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/metrics/background_process_metrics.py')
-rw-r--r--synapse/metrics/background_process_metrics.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py

index 7a1516d3a8..59d956dd9d 100644 --- a/synapse/metrics/background_process_metrics.py +++ b/synapse/metrics/background_process_metrics.py
@@ -42,7 +42,7 @@ from synapse.logging.context import ( LoggingContext, PreserveLoggingContext, ) -from synapse.logging.opentracing import SynapseTags, start_active_span +from synapse.logging.tracing import SynapseTags, start_active_span from synapse.metrics._types import Collector if TYPE_CHECKING: @@ -208,7 +208,7 @@ def run_as_background_process( Args: desc: a description for this background process type func: a function, which may return a Deferred or a coroutine - bg_start_span: Whether to start an opentracing span. Defaults to True. + bg_start_span: Whether to start an tracing span. Defaults to True. Should only be disabled for processes that will not log to or tag a span. args: positional args for func @@ -232,7 +232,8 @@ def run_as_background_process( try: if bg_start_span: ctx = start_active_span( - f"bgproc.{desc}", tags={SynapseTags.REQUEST_ID: str(context)} + f"bgproc.{desc}", + attributes={SynapseTags.REQUEST_ID: str(context)}, ) else: ctx = nullcontext() # type: ignore[assignment]