Skip to content

Commit 8222074

Browse files
NiteshDhanpalclaude
andcommitted
observability: log resolved span-start mode at processor init
The end-only skip is governed by AGENTEX_TRACING_SKIP_SPAN_START (default ON) but was silent — an operator could only infer it from the absence of start-export metrics. Emit a one-time INFO at processor init stating whether span-start upsert is enabled or skipped, so the deployment's tracing mode is visible in logs. Off the hot path (once per construction). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d6791fa commit 8222074

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ def __init__(self, config: SGPTracingProcessorConfig):
9898
disabled=disabled,
9999
)
100100
self.env_vars = EnvironmentVariables.refresh()
101+
logger.info(
102+
"SGP tracing span-start upsert %s (%s)",
103+
"disabled — end-only ingest" if _skip_span_start_enabled() else "enabled",
104+
_SKIP_SPAN_START_ENV,
105+
)
101106

102107
@override
103108
def on_span_start(self, span: Span) -> None:
@@ -134,6 +139,11 @@ def __init__(self, config: SGPTracingProcessorConfig):
134139
asyncio.AbstractEventLoop, AsyncSGPClient
135140
] = weakref.WeakKeyDictionary()
136141
self.env_vars = EnvironmentVariables.refresh()
142+
logger.info(
143+
"SGP tracing span-start upsert %s (%s)",
144+
"disabled — end-only ingest" if _skip_span_start_enabled() else "enabled",
145+
_SKIP_SPAN_START_ENV,
146+
)
137147

138148
def _build_client(self) -> AsyncSGPClient:
139149
import httpx

0 commit comments

Comments
 (0)