You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
When using Analytics.NET version 3.4.2-beta, I found out thta a few analytics events per hour are not successfully sent to the segment servers. To troubleshoot this, I configured the Segment.Client.Failed callback:
privatevoidLogFailure(SegmentSdk.Model.BaseAction action,Exceptione){
_logger.LogError(e,$"Failed to send analytic event {action.Type} for user {action.UserId} to segment.io server");}
myClient.Failed +=LogFailure;
With this in-place, I now see this error log pop-up a few times per hour. Here's what the error looks like this (The response ended prematurely):
Failed to send analytic event track for user c08cb1fb-f963-4238-b075-570f08a88892 to segment.io server
System.Net.Http.HttpRequestException: An error occurred while sending the request.
---> System.IO.IOException: The response ended prematurely.
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at Segment.Request.BlockingRequestHandler.MakeRequest(Batch batch)
From what I can see, the events are then completely lost. The consequence of this are pretty bad for us:
we do an Identify to set a few traits on the user.
these traits are then used by the customer.io destination to send some promotional messages and communications
since some events are lost, it means that customer.io sends the wrong communications to a few of our users
Chameleon is also used to create some on-boarding flows. Since the traits are not always sent correctly, it means that some users see the wrong on-boarding flows.
After looking at the Analytics.NET code, I can see that all unexpected exceptions are not retried:
When using
Analytics.NET
version 3.4.2-beta, I found out thta a few analytics events per hour are not successfully sent to the segment servers. To troubleshoot this, I configured theSegment.Client.Failed
callback:With this in-place, I now see this error log pop-up a few times per hour. Here's what the error looks like this (
The response ended prematurely
):From what I can see, the events are then completely lost. The consequence of this are pretty bad for us:
Identify
to set a few traits on the user.Chameleon is also used to create some on-boarding flows. Since the traits are not always sent correctly, it means that some users see the wrong on-boarding flows.
After looking at the Analytics.NET code, I can see that all unexpected exceptions are not retried:
Analytics.NET/Analytics/Request/BlockingRequestHandler.cs
Line 289 in 1e0d510
So my question is:
This would clearly help in having more accurate analytics.
Regards,
Maxime
The text was updated successfully, but these errors were encountered: