These are chat archives for exceptionless/Discuss

19th
Feb 2016
Frank Ebersoll
@frankebersoll
Feb 19 2016 00:10
typeof NaN === guess what
Blake Niemyjski
@niemyjski
Feb 19 2016 00:10
Can't do it
Frank Ebersoll
@frankebersoll
Feb 19 2016 00:11
number
Blake Niemyjski
@niemyjski
Feb 19 2016 00:11
Gotta do isNaN()
Only way to check it
Frank Ebersoll
@frankebersoll
Feb 19 2016 00:12
or just !!
Frank Ebersoll
@frankebersoll
Feb 19 2016 00:44
Now I’m happy with it
It wasn’t a Safari issue but rather my fault
Should I merge it?
Frank Ebersoll
@frankebersoll
Feb 19 2016 00:54
What user agent header do we Node want to send?
Eric J. Smith
@ejsmith
Feb 19 2016 01:37
what are the other ones?
Blake Niemyjski
@niemyjski
Feb 19 2016 06:41
Ah replace js with node
Blake Niemyjski
@niemyjski
Feb 19 2016 15:00
get: function () {
return 'exceptionless-js/1.3.1';
},
maybe do
exceptionless-node/1.3.1
I know we replace that as part of the build
Blake Niemyjski
@niemyjski
Feb 19 2016 18:56
@skoub you around?
I just did a bunch of work on the branch and did some research and talked to @billhenning
Bill owns http://www.actiprosoftware.com/ and has a lot of experience with parsers / lexers..
I started diving into those methods and quickly realizes that the method name could contain this
my.long.namespace.methodname<generics<that<never<end>>>(Blah<moreGenerics>(OtherFunctionName()) , 1)
as an example
and all of those namespaces and types have long namespaces
and we need to populate generic info as well as parameter with generic info
which is a BEATING multiplied by X Languages.
Blake Niemyjski
@niemyjski
Feb 19 2016 19:01
so I looked really quickly at antlr and that appears to be a mess and hasn’t been updated on .net..
I’ve come to the conclusion that it’s just better to use SimpleError() and build out the stack traces
it’s a stop gap and gets you into our system from a platform we don’t yet support
we can then work on writing a seperate api end point (service) in the future that uses java or some x language with a ton of awesome grammers to parse stack traces..
the other thing we might just do is put
Name = stackTrace.MethodName,
Blake Niemyjski
@niemyjski
Feb 19 2016 19:06
but that’s going to lead to formatting issues client side
let me know what you think but I think the simpleerror is the best way to go.
I’d like to believe that raygun wouldn’t be so stupid to do what they did but they did
Blake Niemyjski
@niemyjski
Feb 19 2016 19:18
exceptionless/Exceptionless#194
@frankebersoll good job on that'
@jamie94bc Have you seen this azure error before: https://ci.appveyor.com/project/Exceptionless/foundatio/build/4.0.685/tests
We ran that test locally and it works
we logged onto the box and ran it and it faild on the first try then worked on every test run after that.
Jamie Clarke
@jamie94bc
Feb 19 2016 19:53
haven't seen that before - i'll try to have a look over the weekend :)
Blake Niemyjski
@niemyjski
Feb 19 2016 20:00
thanks, would be a huge help
Eric J. Smith
@ejsmith
Feb 19 2016 20:01
I think something is weird with my waitforcounter code.
these flakey tests are pissing me off… I need to get some better skills. :-)
Blake Niemyjski
@niemyjski
Feb 19 2016 20:01
he said it :D
I need to get better at them too
Eric J. Smith
@ejsmith
Feb 19 2016 20:05
yeah, don’t see you fixing them either.
Blake Niemyjski
@niemyjski
Feb 19 2016 20:05
working on something else :(
Eric J. Smith
@ejsmith
Feb 19 2016 20:06
need some damn help. :-)
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:08
can I help with unit tests? :-)
Eric J. Smith
@ejsmith
Feb 19 2016 20:08
would love any help I can get. :-)
need to have the azure storage emulator
and just run the tests
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:10
just finishing up the node user agent thing
Blake Niemyjski
@niemyjski
Feb 19 2016 20:11
nice :)
was that geo locale thing an issue
kinda curious
might also be an issue for setValue() as well
Eric J. Smith
@ejsmith
Feb 19 2016 20:11
of course they pass locally, but not on the build server.
driving me insane
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:12
@ejsmith can you send me a link to the tests that don’t pass
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:13
ah
is it only CanHandleErrorInWorker?
Eric J. Smith
@ejsmith
Feb 19 2016 20:17
yes
that one seems to fail a lot.
Blake Niemyjski
@niemyjski
Feb 19 2016 20:18
all pass for me
Eric J. Smith
@ejsmith
Feb 19 2016 20:18
pass locally for me too
have you done much with Foundatio @frankebersoll ?
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:19
about… nothing yet.
Eric J. Smith
@ejsmith
Feb 19 2016 20:19
lol
ok
gotta have redis running locally and the azure storage emulator.
I tend to write integration tests.
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:20
i wish i had :-)
Eric J. Smith
@ejsmith
Feb 19 2016 20:20
how do you feel about integration vs unit tests?
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:21
we do both. we develop units in a test driven manner, abstracting away things that make testing hard
Blake Niemyjski
@niemyjski
Feb 19 2016 20:22
@jamie94bc could it be failing because our wait is only waiting 10 milliseconds?
and there is a latency issue?
Eric J. Smith
@ejsmith
Feb 19 2016 20:22
I do some unit tests… mostly when it helps with developing components.
Blake Niemyjski
@niemyjski
Feb 19 2016 20:22
but then again we are waiting for a counter for up to a second
var success = await metrics.WaitForCounterAsync("simpleworkitem.hello.abandoned", async () => await queue.EnqueueAsync(new SimpleWorkItem {
Data = "Hello"
}), cancellationToken: TimeSpan.FromSeconds(1).ToCancellationToken());
await Task.Delay(10);
Assert.True(success);
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:22
yes. but the same is true for integration testing… it’s easier if you do it from the beginning
Eric J. Smith
@ejsmith
Feb 19 2016 20:23
yeah, I tend to write tests early, but can never have enough. :-)
not sure why the Task.Delay is in there… but the wait for counter should be triggered when the abandoned counter gets incremented.
which it is locally
but for some reason not on the build server.
maybe we should try increasing the 1 second timeout for the counter.
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:28
so, if it works sometimes and sometimes it doesn’t, it should be a timing issue
either becuase tests are run in parallel or unordered and share some global state
Eric J. Smith
@ejsmith
Feb 19 2016 20:28
yeah, but the real question is why? :-)
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:29
or because there is timers involved. this looks like timers :-)
Eric J. Smith
@ejsmith
Feb 19 2016 20:29
the metrics are buffered with a timer normally, but that is disabled.
it’s got to be deadlocking somehow.
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:34
do we have a SynchronizationContext here?
or is it using ThreadPool threads
Eric J. Smith
@ejsmith
Feb 19 2016 20:35
don’t think so… unless C# does a default one. I think those come from higher level frameworks like WPF and MVC, no?
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:36
yes, but could have been that you use one in the tests for async-await
we do so in our app server, because having a main thread helps tremendously with shared state
Eric J. Smith
@ejsmith
Feb 19 2016 20:36
not on purpose. :-)
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:38
i ask, because capturing the sync context on await might lead to deadlocks. as it does in WPF sometimes
Eric J. Smith
@ejsmith
Feb 19 2016 20:39
also we do configure await(false) on everything
so it shouldn’t be deadlocking on context sync
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:40
that’s right. the 1-second cancellation token is the timeout for the test?
Eric J. Smith
@ejsmith
Feb 19 2016 20:40
yeah, its waiting 1 second for that counter to be incremented.
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:41
how fast is WaitForCounterAsync on your local machine?
maybe this just lags on AppVeyor
Blake Niemyjski
@niemyjski
Feb 19 2016 20:42
I updated it to 2 seconds
and it made no diff
Eric J. Smith
@ejsmith
Feb 19 2016 20:42
we tried changing it to higher
it runs instantly locally
gotta be deadlocking
just no clue how
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:43
but you said that happens intermittently?
Eric J. Smith
@ejsmith
Feb 19 2016 20:44
I haven’t had it happen locally
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:44
but it happens always in the cloud?
Eric J. Smith
@ejsmith
Feb 19 2016 20:44
I even rdp’d to the build server and tried it there.
and it worked
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:44
so maybe it’s a heisenbug.
Eric J. Smith
@ejsmith
Feb 19 2016 20:44
maybe specific to running it under the xunit command line test runner?
lol
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:45
that usually applies to timing issues and deadlocks...
Eric J. Smith
@ejsmith
Feb 19 2016 20:45
if it’s not 100%, it’s real damn close.
Blake Niemyjski
@niemyjski
Feb 19 2016 20:47
can’t believe someone marked it as skip
Sander Rijken
@srijken
Feb 19 2016 20:48
hi
Blake Niemyjski
@niemyjski
Feb 19 2016 20:48
hey
Eric J. Smith
@ejsmith
Feb 19 2016 20:48
hello
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:48
hallo
Eric J. Smith
@ejsmith
Feb 19 2016 20:48
you came to join the deadlock party? :-)
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:51
not happening much at the deadlock party.
Eric J. Smith
@ejsmith
Feb 19 2016 20:52
the deadlock party is where all the goth kids hang out and talk about how much everything sucks. :-)
is goth even a thing any more?
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:58
so, WaitForCounterAsync does never complete. WaitForCounterAsync itself consists of many tasks which are run and awaited
so the actual task would be to figure out which tasks are run and which aren’t?
Eric J. Smith
@ejsmith
Feb 19 2016 20:59
yeah, you mean which tasks are awaited inside of the waitforcounter?
Frank Ebersoll
@frankebersoll
Feb 19 2016 20:59
if logging alone doesn’t help, can we build some kind of TaskScheduler that logs each scheduled task and each continuation?
so we can figure out where the deadlock occurs
Eric J. Smith
@ejsmith
Feb 19 2016 21:00
thats the fun thing… the damn xunit 2.0 runner makes it hard to log.
had to hack the ability to do logging in there.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:01
wait, that’s wrong :-)
it just made it „different"
it has this ITestOutputHelper thing that you can get injected
Eric J. Smith
@ejsmith
Feb 19 2016 21:01
they don’t want you doing logging, because they want you to run the tests in parallel.
yes, we are using it.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:01
okay :-)
Eric J. Smith
@ejsmith
Feb 19 2016 21:02
problem is… how do you flow that through the entire app architecture?
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:02
logging framework?
Eric J. Smith
@ejsmith
Feb 19 2016 21:03
yes, but our loggers are all Logger.Error().Message()
they are all static calls.
hate having to have a logger instance everywhere, but maybe that’s what needs to happen.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:04
we have switched to logging interfaces and inject them
Eric J. Smith
@ejsmith
Feb 19 2016 21:05
yeah, guess thats what needs to happen… just seems rediculous to have to inject a log interface into every single class.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:05
yes, but that’s what our world has become?
Eric J. Smith
@ejsmith
Feb 19 2016 21:05
haha
the world is going to shit! :-)
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:06
  1. inject it, or 2. make it static and swear some time later when testing it
Blake Niemyjski
@niemyjski
Feb 19 2016 21:06
eric swears all the time
we won’t know what went wrong :)
Eric J. Smith
@ejsmith
Feb 19 2016 21:07
haha
yeah, it appears we are in for another major refactoring.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:07
you don’t know us. often we’re unhappy to not have women at the workplace, but sometimes, we are happy so they don’t hear our swearing.
Eric J. Smith
@ejsmith
Feb 19 2016 21:08
I need to look at what they are doing for .net core so it will be easy to switch out when we move to that.
haha, that’s awesome frank! Sounds like my kind of place.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:10
this manual reset event looks like it could be the problem?
Eric J. Smith
@ejsmith
Feb 19 2016 21:10
could be
someone told me there is a better way to do that.
you know how to do it better?
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:11
what is this trying to do?
could it be replaced with a TaskCompletionSource<T>?
Eric J. Smith
@ejsmith
Feb 19 2016 21:15
it’s just sending a signal every time the counter is incremented.
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:17
AsyncManualResetEvent is from Nito?
Eric J. Smith
@ejsmith
Feb 19 2016 21:17
yeah
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:18
you could try ConcurrentDictionary<string, TaskCompletionSource<bool>>()
Eric J. Smith
@ejsmith
Feb 19 2016 21:18
can that be reset and triggered multiple times?
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:19
oh. no. you would need to create a new instance every time.
Eric J. Smith
@ejsmith
Feb 19 2016 21:19
yeah, don’t think that would work.
Blake Niemyjski
@niemyjski
Feb 19 2016 21:26
:(
in other news did some testing on the new stats stuff..
think we will be able to delete a few hundred lines of code
Frank Ebersoll
@frankebersoll
Feb 19 2016 21:27
on the other hand, i really like the Nito lib and don’t think it’s a problem in there
Eric J. Smith
@ejsmith
Feb 19 2016 21:57
been digging into the logging stuff
trying to figure out what approach I am going to use that will make it easy to switch to the .net core logging
Blake Niemyjski
@niemyjski
Feb 19 2016 22:01
I think no matter what it might be a pita
due to typing
migth just have to copy there interface completely and reference it in the same namespace and all
then just exclude it in coreclr releases
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:01
@ejsmith we have log interfaces that just describe what has happened
```csharp
Eric J. Smith
@ejsmith
Feb 19 2016 22:02
I think I might try and just bring in the ones from .net core and then #if DEF them out when Foundatio targets .net core.
Blake Niemyjski
@niemyjski
Feb 19 2016 22:03
yup
Eric J. Smith
@ejsmith
Feb 19 2016 22:03
all of their stuff boils down to a couple interfaces.
but all of the packages are pre-release
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:04
interface ICustomerControllerLog
{
   void CustomerCreated(Customer c);
   void CustomerDeleted(Customer c);
   …
}
Then we have implementations that call the actual log framework
Eric J. Smith
@ejsmith
Feb 19 2016 22:04
ahh… so you have a bunch of specific interfaces
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:04
yes, and it makes it super easy
because you don’t have logging framework stuff all over your implementation
Eric J. Smith
@ejsmith
Feb 19 2016 22:04
hmm… was just gonna say that I feel it makes it a bunch of work
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:05
and the main advantage: you can easily switch out how something is logged in one single place
Blake Niemyjski
@niemyjski
Feb 19 2016 22:05
yeah
but you can do that in your di container too
Eric J. Smith
@ejsmith
Feb 19 2016 22:05
how can you do that with so many specific logging interfaces?
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:05
you can even test that something should be logged: mock it and expect it to be called
Eric J. Smith
@ejsmith
Feb 19 2016 22:05
are they all boiling down to something shared?
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:06
the implementations use the logging framework, but that moves the decision if something is an error or a warning or how something is formatted away from the actual code
Eric J. Smith
@ejsmith
Feb 19 2016 22:06
right
so the .net core ones are doing interesting things to avoid allocations and make the logging really fast.
they create delegates
very similar to what you are doing
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:08
well, it was a pragmatic approach to avoid problems that we had earlier
and it worked for us
with resharper it’s not much work either
Eric J. Smith
@ejsmith
Feb 19 2016 22:09
yeah, seems like a good approach.
Blake Niemyjski
@niemyjski
Feb 19 2016 22:10
guess it’s a good thing I didn’t create the 4.0 release in github yet :S
Eric J. Smith
@ejsmith
Feb 19 2016 22:29
well, it deploys to nuget automatically anyway.
hrmm… I just had an idea… what if we normally deployed to nuget as pre-release, but on tag we deployed as final?
Frank Ebersoll
@frankebersoll
Feb 19 2016 22:39
sounds good to me?
Eric J. Smith
@ejsmith
Feb 19 2016 22:39
yeah, need to stop deploying every successful master build.
gonna piss people off. :-)
Blake Niemyjski
@niemyjski
Feb 19 2016 23:21
Yup
Blake Niemyjski
@niemyjski
Feb 19 2016 23:58
What are you all up to this weekend?