Skip to content

Breadcrumb timestamp serialization from JSON #5666

Closed

Description

Package

Sentry

.NET Flavor

.NET

.NET Version

10.0.302

OS

Any (not platform specific)

OS Version

Windows 11 Pro 25H2 26200.9457

Development Environment

Visual Studio Code (Windows)

Other Error Monitoring Solution

No

Other Error Monitoring Solution Name

No response

SDK Version

6.11.1

Self-Hosted Sentry Version

No response

Workload Versions

N/A (not using .net core)

UseSentry or SentrySdk.Init call

N/A

Steps to Reproduce

I didn't think an actual reproduction case here is necessary since this is almost identical to #3108. Let me know if thats not the case.

This issue is identical to #3108 , with the exception that this is for Breadcrumb timestamp serialization from JSON and not Event timestamp serialization form JSON.

You can see here

var timestamp = json.GetPropertyOrNull("timestamp")?.GetDateTimeOffset();

GetDateTimeOffset is called, which will throw an InvalidOperationException (https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonelement.getdatetimeoffset?view=net-11.0-pp#exceptions) if it doesn't receive a string.

Expected Result

A breadcrumb timestamp can be specified as an iso string or a unix number as specified by the documentation.

Actual Result

InvalidOperationException when calling GetDateTimeOffset on a breadcrumb timestamp since it's a number and not an ISO string.

Activity

  1. added
    Bug
    .NET
    on Oct 2, 2026
  2. linear-code commented on Oct 2, 2026

    @linear-code
  3. robert-westenberger-mpulse commented on Oct 2, 2026

    @robert-westenberger-mpulse
    Author

    I'd be happy to open a pull request but it would just be me copy pasting the suggestion here, but in src\Sentry\Breadcrumb.cs instead of src\Sentry\SentryEvent.cs ( I am not overly familiar with dotnet development)

  4. jamescrosswell commented on Oct 5, 2026

    @jamescrosswell
    Collaborator
  5. added a commit that references this issue on Oct 8, 2026
    e899308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETBug

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions