getsentry / getsentry/sentry-python

Set `gen_ai.response.streaming = false` for non-streaming calls

Open
#5,823 1 comment 0 reactions 0 assignees View on GitHub
Improvement Python Spans
Dominant language
Python
Stars
2.2k
Forks
669
Avg merge
1d 1h
Merged PRs (30d)
213

Description

## Problem

Streaming calls explicitly set `GEN_AI_RESPONSE_STREAMING = True`, but non-streaming calls don't set it at all. Setting it explicitly to `False` would make it easier to filter and query spans by streaming vs non-streaming.

## Files

* `sentry_sdk/integrations/google_genai/__init__.py` — `_wrap_generate_content()`, `_wrap_async_generate_content()`

## Acceptance Criteria

* Non-streaming `generate_content` spans have `gen_ai.response.streaming = false`
* Test updated to verify the attribute value

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.