---
type: concept
x-llmwiki:
  schemaVersion: "0.1"
  contentHash: 2dee22cd549f61690fc778f800362d02cef11a23d10a58695adcca72cfa31302
  pageDirectory: concepts
  sources:
    - tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md
  confidence: 0.95
  provenanceState: extracted
  freshnessStatus: unverified
  aliases:
    - streaming-trace-behavior-in-mlflow
    - STBIM
    - Streaming Trace Behavior
  citations:
    - file: tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md
title: Streaming Trace Behavior in MLflow
description: MLflow tracing for streaming Bedrock calls (converse_stream, invoke_model_with_response_stream) creates a span only when chunks are consumed (e.g., iterated in a for-loop), not when the response object is first returned.
tags:
  - mlflow
  - streaming
  - tracing
timestamp: "2026-06-19T23:08:39.581Z"
---

# Streaming Trace Behavior in [MLflow](/concepts/mlflow.md)

**Streaming Trace Behavior in MLflow** refers to how [MLflow Tracing](/concepts/mlflow-tracing.md) captures and displays [Traces](/concepts/traces.md) generated by streaming calls to large language model (LLM) APIs. When using Amazon Bedrock Integration with MLflow, [MLflow](/concepts/mlflow.md) supports [Automatic Tracing](/concepts/automatic-tracing.md) of streaming responses produced by the `converse_stream` and `invoke_model_with_response_stream` APIs. ^[tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md]

## Trace Recorded as Aggregated Output with Per-Chunk Events

When a streaming LLM call is traced, [MLflow](/concepts/mlflow.md) records the final aggregated output message in the **Chat** tab of the trace UI, while the individual streaming chunks are displayed in the **Events** tab. This allows you to inspect the complete response as well as the sequence of chunks that were received. ^[tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md]

## Span Creation Is Deferred Until Chunks Are Consumed

A crucial behavioral detail is that [MLflow](/concepts/mlflow.md) does **not** create a span immediately when the streaming response is returned by the API. Instead, the span is created only when the streaming chunks are actually **consumed** by the caller — for example, when iterating over the stream in a `for` loop. ^[tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md]

This means that if you obtain a streaming response object but never iterate over its chunks, no trace span will be recorded for that call. The trace is materialised at the point of consumption, not at the point of invocation.

## Chat Tab Availability

The **Chat** tab is available only for the `converse` and `converse_stream` APIs. For other streaming APIs such as `invoke_model_with_response_stream`, [MLflow](/concepts/mlflow.md) displays only the **Inputs / Outputs** tab, showing the raw payload and response. ^[tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md]

## Related Concepts

- [MLflow Tracing](/concepts/mlflow-tracing.md)
- Amazon Bedrock Integration with MLflow
- Span (MLflow Tracing)
- [Traces](/concepts/traces.md)
- Chat Tab (MLflow UI)
- Events Tab (MLflow UI)
- converse_stream API (Bedrock)
- invoke_model_with_response_stream API (Bedrock)
- [Raw Inputs/Outputs Tab (MLflow UI)](/concepts/inputoutput-tracking.md)

## Sources

- tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md

# Citations

1. [tracing-amazon-bedrock-with-mlflow-databricks-on-aws.md](/references/tracing-amazon-bedrock-with-mlflow-databricks-on-aws-2f3942c6.md)
