TraceGate: An LLM Agent Observability Gate
Passing a demo doesn't mean an AI agent is production-ready. I've seen agents return the correct answer while silently retrying a tool three times or failing to log critical cost metadata. These aren't functional bugs—they're observability failures. To solve this, I built TraceGate, a release gate that uses OpenTelemetry and SigNoz to ensure an agent satisfies an "observability contract" before it ever hits production.
The Core Concept
The goal is to move beyond "did it get the right answer?" to "did it get the answer for the right reasons, and is it traceable?" If an agent run doesn't produce the required telemetry evidence, TraceGate blocks the release.
I define these requirements in a YAML contract. For example, I can set strict budgets for latency, cost, and tool retries:
name: TraceGate AI Agent Release Contract
serviceName: tracegate-demo-agent
budgets:
maxRunCostUsd: 0.005
maxP95LatencyMs: 2000
maxToolRetries: 1
checks:
- id: span-agent-run
type: required-span
spanName: agent.run
severity: critical
- id: span-llm-call
type: required-span
spanName: llm.call
severity: critical
- id: attr-llm-model
type: required-attribute
spanName: llm.call
attribute: gen_ai.request.model
severity: critical
- id: retry-budget-trace-lookup
type: max-tool-retries
toolName: trace.lookup
maxRetries: 1
severity: critical
If a tool like trace.lookup retries three times but the contract limit is one, TraceGate flags a critical failure and blocks the deployment.
Technical Implementation
This is essentially a deep dive into an AI workflow integrated with a monitoring stack. The pipeline follows this sequence:
Scenario → Agent runner → OpenTelemetry → SigNoz → TraceGate contract evaluator → Pass/Block.
The backend is Node.js, using OTLP HTTP exporters to push spans and metrics to SigNoz. Here is the OpenTelemetry SDK configuration I used for the deployment:
const endpoint =
process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? "http://localhost:4318";
const sdk = new NodeSDK({
traceExporter: new OTLPTraceExporter({
url: `${endpoint}/v1/traces`
}),
logRecordProcessor: new BatchLogRecordProcessor(
new OTLPLogExporter({
url: `${endpoint}/v1/logs`
})
),
metricReader: new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({
url: `${endpoint}/v1/metrics`
}),
exportIntervalMillis: 1000
})
});
By tracking spans like llm.call and tool.policy.search, I can verify that the agent is following the intended logic path rather than stumbling upon the right answer by accident. For anyone building an LLM agent, treating observability as a deployment requirement—rather than an afterthought—is the only way to avoid production nightmares.
All Replies (4)
Absolute nightmare seeing my agent loop for minutes on one task despite getting the answer right.

Curious if this supports async tool calls or if it's just sequential for now?