summaryrefslogtreecommitdiff
path: root/zuul/executor/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'zuul/executor/server.py')
-rw-r--r--zuul/executor/server.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 89f93b8c5..9c7ed158c 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -45,6 +45,7 @@ from zuul.lib.config import get_default
from zuul.lib.logutil import get_annotated_logger
from zuul.lib.monitoring import MonitoringServer
from zuul.lib.statsd import get_statsd
+from zuul.lib import tracing
from zuul.lib import filecomments
from zuul.lib.keystorage import KeyStorage
from zuul.lib.varnames import check_varnames
@@ -1099,6 +1100,13 @@ class AnsibleJob(object):
self.thread.join()
def execute(self):
+ with tracing.startSpanInContext(
+ self.build_request.span_context,
+ 'JobExecution',
+ attributes={'hostname': self.executor_server.hostname}):
+ self.do_execute()
+
+ def do_execute(self):
try:
self.time_starting_build = time.monotonic()
@@ -3132,6 +3140,7 @@ class ExecutorServer(BaseMergeServer):
self.monitoring_server = MonitoringServer(self.config, 'executor',
self.component_info)
self.monitoring_server.start()
+ self.tracing = tracing.Tracing(self.config)
self.log_streaming_port = log_streaming_port
self.governor_lock = threading.Lock()
self.run_lock = threading.Lock()
@@ -3425,6 +3434,7 @@ class ExecutorServer(BaseMergeServer):
super().stop()
self.stopRepl()
self.monitoring_server.stop()
+ self.tracing.stop()
self.log.debug("Stopped")
def join(self):