-
Notifications
You must be signed in to change notification settings - Fork 808
Open
Description
Which component is this bug for?
Bedrock Instrumentation
📜 Description
It bugs out when streaming is enabled. 'text' field is not always available.
The code in opentelemetry-instrumentation-bedrock/opentelemetry/instrumentation/bedrock/init.py line 393 - 394 needs to be fixed with condition.
From
if "contentBlockDelta" in event:
response_msg.append(event["contentBlockDelta"]["delta"]["text"])
To
if "contentBlockDelta" in event:
if "delta" in event["contentBlockDelta"] and "text" in event["contentBlockDelta"]["delta"]:
response_msg.append(event["contentBlockDelta"]["delta"]["text"])
👟 Reproduction steps
when converse streaming and traceloop are enabled at the same time.
👍 Expected behavior
N/A
👎 Actual Behavior with Screenshots
N/A
🤖 Python Version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
None
Metadata
Metadata
Assignees
Labels
No labels