Skip to content

fix: accept breadcrumbs as {"values": [...]} when deserializing events and transactions - #5673

Merged
jamescrosswell merged 1 commit into
mainfrom
fix/breadcrumbs-values-object
Oct 6, 2026
Merged

jamescrosswell merged 1 commit into
mainfrom
fix/breadcrumbs-values-object

Conversation

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Summary

SentryEvent.FromJson and SentryTransaction.FromJson read breadcrumbs with EnumerateArray(), so they only accept a bare array. The breadcrumbs protocol gives {"breadcrumbs": {"values": [...]}} as the primary form, with the bare array as an alternative. On the object form EnumerateArray() throws InvalidOperationException, so Envelope.DeserializeAsync fails on events from SDKs that send it. The Python SDK is one: event.setdefault("breadcrumbs", {}).setdefault("values", []) in sentry_sdk/scope.py.

Both parse sites now go through a small internal JsonExtensions.GetValuesArrayOrNull helper that accepts either shape. Serialization doesn't change; we still write the bare array.

Notes

🤖 Generated with Claude Code

…s and transactions

The protocol's primary form for breadcrumbs is an object with a `values`
array; a bare array is the alternative. SentryEvent.FromJson and
SentryTransaction.FromJson only handled the array, so EnumerateArray()
threw InvalidOperationException on events from SDKs that send the object
form, such as the Python SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamescrosswell
jamescrosswell marked this pull request as ready for review October 5, 2026 22:45
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 5, 2026
@jamescrosswell
jamescrosswell merged commit 8973c9b into main Oct 6, 2026
51 checks passed
@jamescrosswell
jamescrosswell deleted the fix/breadcrumbs-values-object branch October 6, 2026 21:43
This was referenced Oct 13, 2026
This was referenced Oct 18, 2026
gunndabad pushed a commit to DFE-Digital/teaching-record-system that referenced this pull request Oct 21, 2026
Updated [Sentry.AspNetCore](https://github.com/getsentry/sentry-dotnet)
from 6.12.0 to 6.12.1.

<details>
<summary>Release notes</summary>

_Sourced from [Sentry.AspNetCore's
releases](https://github.com/getsentry/sentry-dotnet/releases)._

## 6.12.1

### Fixes 🐛

- fix: builds no longer fail when symbol upload or release creation is
enabled but no Sentry auth token is available by @​jamescrosswell in
[#​5705](getsentry/sentry-dotnet#5705)
- fix: count exception filter and exception processor failures as
callback_error, and stop dropping events when an SDK processor fails by
@​jamescrosswell in
[#​5688](getsentry/sentry-dotnet#5688)
- fix: SentryCreateRelease uses the assembly's informational version and
no longer requires UseSentryCLI by @​jamescrosswell in
[#​5679](getsentry/sentry-dotnet#5679)
- fix: accept breadcrumbs as {"values": [...]} when deserializing events
and transactions by @​jamescrosswell in
[#​5673](getsentry/sentry-dotnet#5673)
- fix: capturing with a configureScope callback no longer re-runs
BeforeBreadcrumb or re-syncs the scope to native SDKs by
@​jamescrosswell in
[#​5653](getsentry/sentry-dotnet#5653)
- fix: accept Unix epoch timestamps when deserializing breadcrumbs,
transactions, spans and client reports by @​jamescrosswell in
[#​5672](getsentry/sentry-dotnet#5672)

### Dependencies ⬆️

#### Deps

- chore(deps): update Java SDK to v8.60.0 by @​github-actions in
[#​5696](getsentry/sentry-dotnet#5696)
- chore(deps): update Cocoa SDK to v9.30.1 by @​github-actions in
[#​5697](getsentry/sentry-dotnet#5697)
- chore(deps): update Native SDK to v0.17.2 by @​github-actions in
[#​5680](getsentry/sentry-dotnet#5680)
- chore(deps): update Java SDK to v8.59.0 by @​github-actions in
[#​5661](getsentry/sentry-dotnet#5661)

### Other

- perf: counting discarded telemetry for client reports no longer
allocates by @​jamescrosswell in
[#​5687](getsentry/sentry-dotnet#5687)
- ci: upgrade ubuntu 20.04/22.04 runners to 24.04 by @​joshuarli in
[#​5667](getsentry/sentry-dotnet#5667)

Commits viewable in [compare
view](getsentry/sentry-dotnet@6.12.0...6.12.1).
</details>

Updated
[Sentry.Extensions.Logging](https://github.com/getsentry/sentry-dotnet)
from 6.12.0 to 6.12.1.

<details>
<summary>Release notes</summary>

_Sourced from [Sentry.Extensions.Logging's
releases](https://github.com/getsentry/sentry-dotnet/releases)._

## 6.12.1

### Fixes 🐛

- fix: builds no longer fail when symbol upload or release creation is
enabled but no Sentry auth token is available by @​jamescrosswell in
[#​5705](getsentry/sentry-dotnet#5705)
- fix: count exception filter and exception processor failures as
callback_error, and stop dropping events when an SDK processor fails by
@​jamescrosswell in
[#​5688](getsentry/sentry-dotnet#5688)
- fix: SentryCreateRelease uses the assembly's informational version and
no longer requires UseSentryCLI by @​jamescrosswell in
[#​5679](getsentry/sentry-dotnet#5679)
- fix: accept breadcrumbs as {"values": [...]} when deserializing events
and transactions by @​jamescrosswell in
[#​5673](getsentry/sentry-dotnet#5673)
- fix: capturing with a configureScope callback no longer re-runs
BeforeBreadcrumb or re-syncs the scope to native SDKs by
@​jamescrosswell in
[#​5653](getsentry/sentry-dotnet#5653)
- fix: accept Unix epoch timestamps when deserializing breadcrumbs,
transactions, spans and client reports by @​jamescrosswell in
[#​5672](getsentry/sentry-dotnet#5672)

### Dependencies ⬆️

#### Deps

- chore(deps): update Java SDK to v8.60.0 by @​github-actions in
[#​5696](getsentry/sentry-dotnet#5696)
- chore(deps): update Cocoa SDK to v9.30.1 by @​github-actions in
[#​5697](getsentry/sentry-dotnet#5697)
- chore(deps): update Native SDK to v0.17.2 by @​github-actions in
[#​5680](getsentry/sentry-dotnet#5680)
- chore(deps): update Java SDK to v8.59.0 by @​github-actions in
[#​5661](getsentry/sentry-dotnet#5661)

### Other

- perf: counting discarded telemetry for client reports no longer
allocates by @​jamescrosswell in
[#​5687](getsentry/sentry-dotnet#5687)
- ci: upgrade ubuntu 20.04/22.04 runners to 24.04 by @​joshuarli in
[#​5667](getsentry/sentry-dotnet#5667)

Commits viewable in [compare
view](getsentry/sentry-dotnet@6.12.0...6.12.1).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants