Multi-tenant agent telemetry needs an enforced tenant context before data reaches shared processors or exporters. Never trust a tenant identifier supplied only by the instrumented workload.
Collector path
- Authenticate the workload and derive tenant, workspace, service, and environment from trusted deployment metadata.
- Reject or overwrite conflicting client-supplied boundary fields.
- Apply content redaction and attribute allowlists before shared storage.
- Enforce per-tenant rate, memory, queue, and export limits.
- Route to tenant-approved regions and destinations.
Cardinality and sampling
Keep tenant, workflow, agent version, operation, model, tool, status, and risk tier queryable. Store session and request identifiers for correlation but do not use them as unbounded metric dimensions. Tail-sample errors, denied actions, high-impact tools, fallbacks, and slow traces; retain a controlled baseline of successful runs.
Failure behavior
Monitor dropped spans, queue saturation, exporter errors, clock skew, and missing sequence intervals by tenant. High-impact actions should fail closed or enter an approved degraded mode when mandatory evidence cannot be written.
Isolation test
Attempt cross-tenant queries and exports, flood one tenant, inject forged resource attributes, and capture sensitive tool arguments. Verify isolation, fairness, redaction, and visible gap alerts.
Map these controls to the BlueBear agent field model.
Questions people actually search for
- how do you isolate opentelemetry data for multiple ai tenants
Resolve tenant and workspace identity from the authenticated execution context, attach controlled identifiers to telemetry, authorize exports by destination, and enforce separation again in storage and query paths. Do not trust a tenant label supplied by a prompt or request body.
- should ai agent traces include a tenant id
Yes, when the identifier is controlled, stable, non-secret, and derived from trusted identity. It enables scoped troubleshooting and cost allocation, but it must not expose customer names or become the only tenant-isolation control.
- how do you keep prompts and tool arguments out of telemetry
Default to structural fields such as model, tool name, status, latency, token counts, policy result, and correlation IDs. Capture content only for an explicit purpose, with redaction, separate access, short retention, and tests that detect secrets and sensitive data.
- how should you sample ai agent traces
Keep complete records for denied, failed, high-impact, and incident-linked actions while sampling lower-risk successful traffic by a documented policy. Sampling must never create an apparent success by dropping the failure or approval event needed to interpret a run.