Skip to content

Commit

Permalink
Remove extra span attrs and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
callumforrester committed Dec 2, 2024
1 parent 377836b commit af50930
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/blueapi/service/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from typing import Any, ParamSpec, TypeVar

from observability_utils.tracing import (
add_span_attributes,
get_context_propagator,
get_tracer,
start_as_current_span,
Expand Down Expand Up @@ -70,7 +69,6 @@ def reload(self):

@start_as_current_span(TRACER)
def start(self):
add_span_attributes({"_use_subprocess": True, "_config": str(self._config)})
try:
self._subprocess = self._subprocess_factory()
self.run(setup, self._config)
Expand Down Expand Up @@ -108,14 +106,12 @@ def run(
**kwargs: P.kwargs,
) -> T:
"""Call the supplied function, passing the current Span ID, if one
exists,from the observability context inro the import_and_run_function
exists,from the observability context into the import_and_run_function
caller function.
When this is deserialized in and run by the subprocess, this will allow
its functions to use the corresponding span as their parent span."""

add_span_attributes({"use_subprocess": True})

if self._subprocess is None:
raise InvalidRunnerStateError("Subprocess runner has not been started")
if not (hasattr(function, "__name__") and hasattr(function, "__module__")):
Expand Down

0 comments on commit af50930

Please sign in to comment.