Closed jamescrosswell closed 2 weeks ago
Resolves https://github.com/getsentry/sentry-dotnet/issues/3209
This is only a problem when using the CachingTransport. The issue is in two parts. Firstly here: https://github.com/getsentry/sentry-dotnet/blob/59f31642c10f8c8159d8294e0a48536b14ad4cd0/src/Sentry/Http/HttpTransportBase.cs#L129-L130
CachingTransport
If the length header has not been set then the envelope item is not correctly identified as being too big... the result is that we only get an exception when we try to send the attachment in the envelope to Sentry.
length
The second factor contributing to the issue is that when deserializing an envelope from the cache, this header gets removed: https://github.com/getsentry/sentry-dotnet/blob/59f31642c10f8c8159d8294e0a48536b14ad4cd0/src/Sentry/Protocol/Envelopes/EnvelopeItem.cs#L446
Resolves https://github.com/getsentry/sentry-dotnet/issues/3209
Problem summary
This is only a problem when using the
CachingTransport
. The issue is in two parts. Firstly here: https://github.com/getsentry/sentry-dotnet/blob/59f31642c10f8c8159d8294e0a48536b14ad4cd0/src/Sentry/Http/HttpTransportBase.cs#L129-L130If the
length
header has not been set then the envelope item is not correctly identified as being too big... the result is that we only get an exception when we try to send the attachment in the envelope to Sentry.The second factor contributing to the issue is that when deserializing an envelope from the cache, this header gets removed: https://github.com/getsentry/sentry-dotnet/blob/59f31642c10f8c8159d8294e0a48536b14ad4cd0/src/Sentry/Protocol/Envelopes/EnvelopeItem.cs#L446