Short answer
What matters most
Keep prompts, retrieved passages, and tool payloads out of routine traces. Log an opaque run ID, stage status and timing, model and prompt versions, plus opaque source/action references reviewed for sensitive identifiers and the final review outcome. If metadata cannot diagnose a specific failure, capture a redacted example in a separate store with named access, an audit trail, and a clear retention/deletion owner. Check whether provider logging is per run or broader before enabling it.
A logging switch can create a second copy of customer data
A support engineer is asked why an assistant proposed the wrong delivery window. The provider console says the model call succeeded, but the answer may also depend on retrieved shipment data, a prompt version, a validation rule, and an approval. Turning on full request logging could make the incident easier to inspect while copying customer text and tool arguments into another system.
The buyer question is whether to log prompts and, if exact content is needed, where it should live. A trace connects the stages that handled one request. Keep ordinary traces useful for correlation and diagnosis, then route a specific content sample through a separate, controlled path. The diagram shows the boundary: operational metadata goes to the trace store; exact content stays out unless a defined case needs it.
Keep routine traces to metadata
Use an opaque run ID shared by the application, retrieval, model, tool, and review events. Add stage status and duration, retry and error categories, workflow/model/prompt versions, opaque source or action references after checking every exported field for sensitive values, and the final review outcome. Avoid direct identifiers such as a customer's name or email in any trace field, not just the correlation ID.
Those fields answer common questions: which step failed, which prompt or index version ran, whether a tool rejected a write, and whether a person approved the result. They do not promise an exact replay. If one model call already has useful request IDs and error details in the provider's console, start there; add a cross-service trace only when the incident spans boundaries that console cannot connect.
OpenTelemetry's current GenAI span conventions recommend that instrumentation not capture model instructions, inputs, or outputs by default. They describe storing production content externally when needed and placing a reference in the span so it can have separate access controls. The conventions are marked Development, so check the instrumentation and backend you use. OpenTelemetry's sensitive-data guidance also says an implementer must review emitted fields: the Collector can transform or drop configured attributes, but it cannot decide which values are sensitive in your business context.
OpenTelemetry separates trace metadata from content capture
The GenAI span conventions recommend leaving instructions, inputs, and outputs out of default instrumentation. If an investigation needs exact content, the guidance describes an external store with separate access controls. The conventions are still in Development and do not guarantee a vendor's default behavior.
OpenTelemetry: GenAI spans (Development; checked October 19, 2026)Compare capture paths
Choose the path from the diagnostic question and the scope of data it collects. This table is a qualitative decision aid: it does not certify a provider's security controls or promise that a trace can reproduce a model response.
On a small screen, scroll the table to read every column.
| Capture path | When it fits | Boundary to inspect |
|---|---|---|
| Metadata-only application trace | Correlating retrieval, model, action, retry, and review stages. | Useful for diagnosis, but it does not preserve the exact prompt or response. |
| Provider-managed per-run trace | Inspecting a model workflow when the product links the stages you need. | Check captured fields, reader roles, retention, query behavior, and whether content capture can be limited. |
| Account or Region invocation logging | Querying supported model calls across a provider environment. | It may capture full request and response data at broader scope than one selected workflow run. |
| Separate restricted content record | Reviewing one exact case that metadata could not explain. | Limit and redact the sample; assign named readers, access auditing, and a retention/deletion owner. |
Check provider scope and storage
A tracing standard does not set your account's payload scope, reader roles, or retention. Review where records land, which endpoints are covered, who can query them, and how new and old records behave before you enable detailed capture.
Microsoft Foundry documents traces that can include prompts, model inputs and outputs, tool calls, intermediate steps, and execution metadata. The traces are stored in the connected Application Insights resource, so access and retention depend on that resource's configuration. This is product-specific behavior, not an OpenTelemetry default.
The simpler provider console can be enough when it links the stages you need and gives you control over sensitive fields. Custom instrumentation is justified when a specific cross-service correlation or data-boundary gap remains.
Foundry changed where new sensitive trace values are read
By default, for Application Insights data ingested on or after September 30, 2026, values for seven specified GenAI content attributes stop appearing in their old tables and are replaced by a pointer to AppGenAIContent. Registering the preview opt-out feature flag temporarily preserves the prior routing behavior until September 30, 2027. Earlier records remain queryable in their existing tables. Custom queries, alert rules, dashboards, workbooks, and reports that read those values need updating. Confirm the configured behavior before relying on it.
Microsoft Learn: Restrict access to sensitive Foundry trace content (updated October 6, 2026; preview; checked October 19, 2026)Bedrock invocation logging can capture full requests and responses
Amazon Bedrock says model invocation logging is off by default and can capture full request and response data for supported calls across an account and Region. AWS says logs are stored until the logging configuration is deleted; that statement does not establish that already-delivered records are purged, so check the destination's lifecycle separately. The setting covers supported bedrock-runtime calls, not one selected workflow run.
AWS: Monitor model invocation using CloudWatch Logs and Amazon S3 (checked October 19, 2026; no update date shown)Follow one hypothetical failed update
Imagine a logistics operator asks an assistant to change a delivery window. The system reads a shipment record, proposes a new slot, checks a rule, waits for approval, and submits the update. A customer later says the old slot is still showing. This is a hypothetical case, not a client result.
First inspect the metadata trace: opaque run and shipment references, source and prompt versions, validation status, action result category, and approval outcome. Before export, check that every reference is opaque to trace readers and does not expose a customer or operational identifier. If the trace shows a rejected action, the owner can start at that boundary without opening the whole conversation. If those facts do not explain why the proposed slot was wrong, request one redacted content sample through the restricted path and record who accessed it.
My portfolio example of a controlled multi-step workflow shows research, drafting, validation, review, and human checkpoints. It does not claim to demonstrate this logging setup.
Set a boundary for one specific case
NIST's 2024 Generative AI Profile includes an action to establish policies for data collection, retention, and minimum data quality while considering risks such as privacy and information security. It is voluntary risk-management guidance, not a logging specification, a prescribed retention period, or a legal determination. For the next incident, decide whether the metadata table above is enough. If not, name the exact sample, permitted readers, audit trail, and deletion owner before enabling content capture.
Choose the provider's native trace if it links the steps and allows the boundary you need. Add custom instrumentation only for a specific correlation or storage gap. If that gap is real, I can help map the capture path and test what reaches each destination.
Collection and retention need an explicit owner
NIST's 2024 Generative AI Profile includes an action to establish policies for data collection, retention, and minimum data quality while considering risks such as privacy and information security. It is voluntary risk-management guidance, not a logging specification or legal determination, and it does not prescribe a telemetry schema or retention period.
NIST AI 600-1: Generative Artificial Intelligence Profile (July 26, 2024; checked October 19, 2026)