1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-11 08:50:45 +03:00

Record part of the response into the span

This commit is contained in:
Alexander Presnyakov
2025-09-05 13:15:41 +00:00
parent a2e9d5b3cc
commit 647d9ae651
7 changed files with 52 additions and 39 deletions

View File

@@ -2,6 +2,7 @@ import logging
import time
from typing import Any, Dict, Optional
from mcs_node_control.models.node_config import NodeConfig
from tracing.tracer import TracerBackend, TraceSpan
from tracing.utils import swallow_exceptions
@@ -11,6 +12,10 @@ json_logger = logging.getLogger("json_trace")
class TraceparentBackend(TracerBackend):
"""Default backend that logs span lifecycle and mirrors events/status."""
def __init__(self):
my_addresses = list(NodeConfig().get_network_addresses())
logger.info("My addresses: %s", my_addresses)
json_logger.info("my_addresses", extra={"my_addresses": my_addresses})
@swallow_exceptions
def on_span_start(self, span: TraceSpan) -> None: