Metrune engineering

Choosing what to log without storing sensitive prompts

How to preserve useful AI production telemetry with deliberate capture, redaction, sampling, and retention controls.

6 min readSecurity / Observability

Useful AI telemetry does not require collecting every prompt and response. A deliberate capture model can preserve operational evidence while reducing the amount of sensitive content that leaves the application boundary.

Begin with metadata

Status, duration, model, token counts, tool name, release, environment, and outcome provide substantial debugging value without storing message content.

Redact before export

Apply field-level rules in the SDK or gateway so secrets and regulated identifiers are removed before telemetry is transmitted. Server-side masking is a second line of defense, not the only one.

Sample content intentionally

When content is required for evaluation or debugging, scope sampling by environment, workload, or incident window. Record why the sample exists and apply an appropriate retention period.

Make access visible

Content-bearing traces should use role-based access, audit history, and clear indicators in the interface. Operational convenience should not make sensitive data feel ordinary.

Continue reading

Related engineering notes

Aug 8, 2026

Tracing AI agents across models and tools

A practical trace model for understanding multi-step agent runs without losing the relationship between user intent and production outcomes.