How export works
- The proxy finishes the request (including streamed responses).
- A background worker builds a structured event (metadata; bodies are not in the default metadata stream).
- The event is exported as an OpenTelemetry log record to the configured collector endpoint.
- Downstream systems (NeuralTrust metadata store, your SIEM, billing pipelines) consume the collector output.
Configuration
Telemetry is configured globally by environment and can be refined per gateway.
Per gateway,
telemetry can define exporters, static
extra_params appended to every event, trace toggles, and a header_mapping that copies
inbound headers into event fields. Process-level OTEL_EXPORTER_OTLP_* values supply
defaults when a gateway opts into OpenTelemetry export.
Exporters
A gateway’stelemetry.exporters[] selects where its events go:
On NeuralTrust Hybrid / SaaS, the control plane wires the collector endpoint for you
(see Deployment overview). For self-managed
collectors, set
OTEL_EXPORTER_OTLP_ENDPOINT (and headers) to your OpenTelemetry Collector.
What the event carries
Events are versioned (schema_version) and carry a kind of llm or mcp. Each includes,
among others:
Attributes follow OpenTelemetry HTTP and GenAI conventions where applicable
(
http.request.method, gen_ai.request.model, gen_ai.usage.*, …), plus trustgate.*
extensions for gateway-specific fields. Prompt and response bodies are not included in
the default metadata export used by alerts and analytics.
Using the data
The
attempts and policy_chain data make it possible to reconstruct how each request was
routed and which policies fired.