Comments (9)
I find it weird that we see:
number of Attemps = 8
: this implies that_backo._attempt
= 8Has Backed reached max = true
: this implies that_currentAttemptTime >= _max
which is the same as_currentAttemptTime >= 10000
.
I am not sure that I understand the code correctly but it lets me think that you will wait/retry for at most 10 seconds. This may be a little short if you eventually hit an http timeout.
from analytics.net.
In case it can help, I have attached somme logs coming from Analytics.Net before/after the error.
loggly_grid_2021-03-30 12_20_25.408029.log
from analytics.net.
The batch that failed to be sent is the one with id 44eb04cb-3947-4c35-b817-ba91f28ac983
. I searched in my logs for this specific ID and I only found this:
It therefore looks to me like it was only retried once and not 8 times.
from analytics.net.
Once again, I suggest that you add logs here.
This is probably hidding something.
from analytics.net.
@mabead May I ask if you have any custom settings for the configuration of the client or are you just using the default values of the configuration?
from analytics.net.
@juliette-ruchel Here's how we initialize the segment client:
using SegmentSdk = Segment;
// ...
private void Initialize()
{
var segmentConfig = new SegmentSdk.Config()
.SetAsync(_configuration.SendMessagesAsynchronously); // SendMessagesAsynchronously = true
if (!string.IsNullOrEmpty(_configuration.DotNetBackEndSourceKey))
{
LandrMusicClient = new SegmentSdk.Client(_configuration.DotNetBackEndSourceKey, segmentConfig);
LandrMusicClient.Failed += LogFailure;
}
SegmentSdk.Logger.Handlers += LogSegmentEvent;
}
private void LogFailure(SegmentSdk.Model.BaseAction action, Exception e)
{
string details = null;
if (e != null)
{
details = e.Message;
}
_logger.LogError(LoggingEvents.SegmentFailure, e, $"Failed to send analytic event {action.Type} for user {action.UserId} and message {action.MessageId} to segment.io server. Details: {details}");
}
private void LogSegmentEvent(SegmentSdk.Logger.Level level, string message, IDictionary<string, object> args)
{
var fullMessage = message;
if (args != null)
{
fullMessage += " " + string.Join(", ", args.Select(x => $"{x.Key}: {x.Value}"));
}
switch (level)
{
case SegmentSdk.Logger.Level.DEBUG:
_logger.LogDebug(LoggingEvents.SegmentLog, fullMessage);
break;
case SegmentSdk.Logger.Level.INFO:
_logger.LogInformation(LoggingEvents.SegmentLog, fullMessage);
break;
case SegmentSdk.Logger.Level.WARN:
_logger.LogWarning(LoggingEvents.SegmentLog, fullMessage);
break;
case SegmentSdk.Logger.Level.ERROR:
_logger.LogError(LoggingEvents.SegmentLog, fullMessage);
break;
default:
_logger.LogError(LoggingEvents.SegmentLog, $"Unknown segment logging level {level} => {fullMessage}");
break;
}
}
We are therefore using the default values.
from analytics.net.
Thanks for the information!
I believe the issue may be related to the response being null thus the status code is returned is 0.
This may mean that we are entering either the HttpRequestException
o TaskCancelledException
catch. We are working on adding a few more logs to determine the exact issue.
from analytics.net.
hey @mabead, would you mind doing a quick sanity check of this #164 to confirm it solves this issue?
from analytics.net.
@pooyaj I could give it a try but I don't see a new version of Analytics.net available on nuget. As soon as you have a new version, I will be able to try it out.
from analytics.net.
Related Issues (20)
- `Defaults` class removed with no way to access values elsewhere HOT 1
- Create config.yml for circle ci in .net solution HOT 1
- Question: Is this suitable for Xamarin integration? HOT 3
- Changing fields of Concrete implementations of BaseAction to Properties HOT 1
- Versioning Question Due to Error HOT 4
- Support for .NET 5.0 framework
- Events not sent to Segment servers: The operation was canceled. HOT 6
- Update e2e CircleCi config due to image problem
- e2e Testing failing in circleci
- AsyncIntervalFlushHandler deadlock HOT 3
- Encounter System.ObjectDisposedException after Dispose is called HOT 3
- Expose Message Id as a configurable option HOT 1
- Snyk.io reports issue with referenced Newtonsoft.Json package HOT 1
- Allow a mocked Client to be used for the Analytics singleton
- Remove dependency on Json.Net HOT 3
- Make it easier to get 'hidden' errors when trying to send data to Segment HOT 1
- Calling Analytics.Client.Flush() when there are pending events can cause deadlock HOT 8
- Why is the NuGet package unlisted? HOT 5
- Analytics.NET Midleware HOT 1
- My event is not being tracked, how do I troubleshoot it? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics.net.