Skip to content

feat(gcp): Add span streaming support to GCP Cloud Functions integration

c6f834d
Select commit
Loading
Failed to load commit list.
Merged

feat(gcp): Add span streaming support to GCP Cloud Functions integration #6440

feat(gcp): Add span streaming support to GCP Cloud Functions integration
c6f834d
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed May 28, 2026 in 20m 27s

1 issue

find-bugs: Found 1 issue (1 medium)

Medium

Unhandled UnicodeDecodeError in query_string.decode() crashes GCP function invocations - `sentry_sdk/integrations/gcp.py:103-106`

If gcp_event.query_string contains non-UTF-8 bytes (e.g. ?q=foo%80bar), the .decode("utf-8") call raises an unhandled UnicodeDecodeError that propagates outside the try/except block and the capture_internal_exceptions context, causing the entire GCP function invocation to fail due to Sentry instrumentation. Use decode("utf-8", errors="replace") to be safe.


⏱ 20m 7s · 2.7M in / 88.3k out · $2.95

Annotations

Check warning on line 106 in sentry_sdk/integrations/gcp.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: find-bugs

Unhandled UnicodeDecodeError in query_string.decode() crashes GCP function invocations

If `gcp_event.query_string` contains non-UTF-8 bytes (e.g. `?q=foo%80bar`), the `.decode("utf-8")` call raises an unhandled `UnicodeDecodeError` that propagates outside the `try/except` block and the `capture_internal_exceptions` context, causing the entire GCP function invocation to fail due to Sentry instrumentation. Use `decode("utf-8", errors="replace")` to be safe.