These are chat archives for exceptionless/Discuss

15th
Feb 2016
Blake Niemyjski
@niemyjski
Feb 15 2016 15:20
ah just committed to wrong branch @frankebersoll :s for js
guess it will be merged in soon enough
@ejsmith Severity Code Description Project File Line Suppression State
Error CS1503 Argument 1: cannot convert from 'Foundatio.Queues.IQueueEntry<Exceptionless.Core.Queues.Models.EventPost>' to 'Foundatio.Queues.QueueEntry<Exceptionless.Core.Queues.Models.EventPost>' Exceptionless.Core C:\Code\Exceptionless\Source\Core\Jobs\EventPostsJob.cs 145
what I got after upgrading to the latest foundatio release
Eric J. Smith
@ejsmith
Feb 15 2016 15:21
yeah, you need to change your code.
it takes IQueueEntry instead of QueueEntry
Blake Niemyjski
@niemyjski
Feb 15 2016 15:21
        var queueEntry = context.QueueEntry;
should be right
Eric J. Smith
@ejsmith
Feb 15 2016 15:21
look at the method signature
Blake Niemyjski
@niemyjski
Feb 15 2016 15:22
ah yeah my bad
need to wake up
Eric J. Smith
@ejsmith
Feb 15 2016 15:22
Wake up it’s time to make money.
Blake Niemyjski
@niemyjski
Feb 15 2016 15:22
we on the prices right?
Eric J. Smith
@ejsmith
Feb 15 2016 15:23
huh?
Blake Niemyjski
@niemyjski
Feb 15 2016 15:23
was a bad joke
Eric J. Smith
@ejsmith
Feb 15 2016 15:23
yeah, almost as bad as mine that you didn’t get.
wake up it’s time to make money is from a song
Blake Niemyjski
@niemyjski
Feb 15 2016 15:23
oh
Eric J. Smith
@ejsmith
Feb 15 2016 15:24
they been playing it on the radio like every other song
Blake Niemyjski
@niemyjski
Feb 15 2016 15:24
oh
link to youtube
would be cool if we could have a audio link so we could all listen to the same station at the same time (opt in)
Did you see what automapper just did? Got rid of all the static api
Eric J. Smith
@ejsmith
Feb 15 2016 15:29
yeah
so I am thinking that our redis queue impl fucks up if there is a network hiccup.
that is saying that IDatabase is a cheap passthrough object.
the multiplexor is the thing that is supposed to shield you from network outtages.
Blake Niemyjski
@niemyjski
Feb 15 2016 15:31
yeah
Eric J. Smith
@ejsmith
Feb 15 2016 15:31
I am wondering if I am supposed to call GetDatabase() on every single call.
Blake Niemyjski
@niemyjski
Feb 15 2016 15:31
so we should be injecting that and calling GetDatabase a lot
could create an issue and ask
Eric J. Smith
@ejsmith
Feb 15 2016 15:31
yeah, I don’t know.
trying to figure it out.
wondering if the server hiccups does it lose it’s pub/sub
and we lose our notifications
Blake Niemyjski
@niemyjski
Feb 15 2016 15:32
could ask
could also try it
Eric J. Smith
@ejsmith
Feb 15 2016 15:32
really need a benchmark setup that abuses the queues and cache client and see how we do
and then try killing the server in the middle
wish I could find some better samples
Blake Niemyjski
@niemyjski
Feb 15 2016 15:34
yup
would be nice
Jamie Clarke
@jamie94bc
Feb 15 2016 16:19
@niemyjski do you have control over the serilog-sinks-exceptionless repo?
also, I'm thinking ExceptionLess -> Exceptionless in that repo?
case sensitive renames in git are fun on windows! :D
Blake Niemyjski
@niemyjski
Feb 15 2016 16:25
ep
@jamie94bc yep
Jamie Clarke
@jamie94bc
Feb 15 2016 16:25
want to be able to specify the apiKey when adding the sink :)
it's commented out at the moment - is there a reason for that?
Blake Niemyjski
@niemyjski
Feb 15 2016 16:26
not sure
I didn’t initially write it
If you want to do a pull request I’ll accept it or I can make you contributor on there
Jamie Clarke
@jamie94bc
Feb 15 2016 16:26
working on a PR
explains the casing
Blake Niemyjski
@niemyjski
Feb 15 2016 16:28
ok, looks like I can’t add people only org admins
Jamie Clarke
@jamie94bc
Feb 15 2016 16:28
yeah i thought that might be the case
Blake Niemyjski
@niemyjski
Feb 15 2016 16:28
can you update the packages and add anything you think you need as well and I’ll accept it
Jamie Clarke
@jamie94bc
Feb 15 2016 16:29
sure
exceptionless client creation - the configure action, i presume this just overwrites default settings / settings loaded from web.config ?
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:50
hey @niemyjski
Blake Niemyjski
@niemyjski
Feb 15 2016 16:50
hey
@jamie94bc yep
in most of our clients like nlog
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:50
just fetched your changes, should be merged in soon
Blake Niemyjski
@niemyjski
Feb 15 2016 16:50
if you specify an api key for logging, we created a new instance and just used that for all the logging
source is in the .net repo
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:50
i made some changes to the storage api (not pushed yet)
Blake Niemyjski
@niemyjski
Feb 15 2016 16:50
cool
let me know if you want me to take a look at anything
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:52
api looks like this now:
export interface IStorage {
  save(namespace: string, value: any, single?: boolean): boolean;
  get(namespace: string, limit?: number): IStorageItem[];
  remove(item: IStorageItem): void;
}
Blake Niemyjski
@niemyjski
Feb 15 2016 16:52
that’s super simple
what’s single do on save?
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:52
so, we have a namespace (like „q“ or „settings“)
Blake Niemyjski
@niemyjski
Feb 15 2016 16:52
hmm
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:52
single makes it delete all other things in that namespace
Blake Niemyjski
@niemyjski
Feb 15 2016 16:52
I almost think that should be a hidden detail
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:52
that’s for settings
Blake Niemyjski
@niemyjski
Feb 15 2016 16:52
like you specify the namespace when you create the storage.. so it’s scoped
so new storage(optional namespace)
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:53
yes, that would be another simplification, but i didn’t want to go that far yet.
Blake Niemyjski
@niemyjski
Feb 15 2016 16:53
and then you can do new storage (storage, namespace) if you want it scoped
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:53
but now that you say it, i think we could.
get without a limit gets a single item
Blake Niemyjski
@niemyjski
Feb 15 2016 16:53
would make the call to save and get a lot cleaner (high trafficked api call
yeah
what about single? on save?
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:54
that could be removed then
because you would do new storage („settings“, 1) for settings
Blake Niemyjski
@niemyjski
Feb 15 2016 16:54
what do you mean
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:55
single would do the same as max_items = 1
Blake Niemyjski
@niemyjski
Feb 15 2016 16:55
but how does that apply
I’d think save would just overwrite
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:55
no, timestamp generation is done inside the storage now
Blake Niemyjski
@niemyjski
Feb 15 2016 16:55
ok
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:56
before, we had two types of items… q items had a timestamp, settings didn't
now, everything gets a timestamp inside of the storage
for ordering purposes
Blake Niemyjski
@niemyjski
Feb 15 2016 16:56
does it make it a lot slower to get the key?
namespace:key:timestamp?
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:57
there is no key any more
Blake Niemyjski
@niemyjski
Feb 15 2016 16:57
hmm
ok
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:57
key is namespace + timestamp
there can still be a prefix, for the file system it would be „ex-"
Blake Niemyjski
@niemyjski
Feb 15 2016 16:57
guess I’ll have to take a look after your push
k
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:57
and for local storage it would be „com.exceptionless"
but that is storage-specific
Blake Niemyjski
@niemyjski
Feb 15 2016 16:58
ok
for file storage it might be nice to have each namespace be it’s own folder
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:58
yes, i thought of that.
that will make everything much simpler
Blake Niemyjski
@niemyjski
Feb 15 2016 16:59
:)
Frank Ebersoll
@frankebersoll
Feb 15 2016 16:59
timestamps will be milliseconds since epoch
and each storage will cache the last timestamp and do Math.max(lastTimestamp + 1, Date.now()) to get the new timestamp
Blake Niemyjski
@niemyjski
Feb 15 2016 17:01
ok
cool
Jamie Clarke
@jamie94bc
Feb 15 2016 17:03
@frankebersoll will this be able to handle negative timestamps? :laughing: :iphone:
Blake Niemyjski
@niemyjski
Feb 15 2016 17:03
:)
Jamie Clarke
@jamie94bc
Feb 15 2016 17:03
@niemyjski PR submitted - git decided LoggerSinkConfigurationExtensions was a whole new file unfortunately
Frank Ebersoll
@frankebersoll
Feb 15 2016 17:04
@jamie94bc has this something to do with those new gravitational waves?
Jamie Clarke
@jamie94bc
Feb 15 2016 17:04
@niemyjski just going to update dependencies
@frankebersoll could be! :wavy_dash:
Blake Niemyjski
@niemyjski
Feb 15 2016 17:07
@jamie94bc ok, might want to do a null check in that constructor to default it to exceptionlessclient.default
Jamie Clarke
@jamie94bc
Feb 15 2016 17:07

@niemyjski regarding...

in most of our clients like nlog
Serilog is still pretty new!

Blake Niemyjski
@niemyjski
Feb 15 2016 17:07
that change kinda borke all existing users by moving the api key and server url to the start.
might want to add the original overload back
Jamie Clarke
@jamie94bc
Feb 15 2016 17:07
yeah but so did the rename
Blake Niemyjski
@niemyjski
Feb 15 2016 17:08
yeah
Jamie Clarke
@jamie94bc
Feb 15 2016 17:08
shall I add some obsolete overloads?
Blake Niemyjski
@niemyjski
Feb 15 2016 17:08
most users won’t specify an api key if they are already using exceptionless
na
but I’d add one that has the legacy one because we will fallback to the default client
Jamie Clarke
@jamie94bc
Feb 15 2016 17:08
regarding null check - i don't think it's needed
you either specify a client or use the other overload
hence why I added the argumentexception
:smile:
Blake Niemyjski
@niemyjski
Feb 15 2016 17:08
// TODO: Read this from configuration.
  • //if (String.IsNullOrEmpty(ApiKey) && String.IsNullOrEmpty(ServerUrl))
  • // return;
  • //_client = new ExceptionlessClient(config => {
  • // if (!String.IsNullOrEmpty(ApiKey))
  • // config.ApiKey = ApiKey;
  • // if (!String.IsNullOrEmpty(ServerUrl))
  • // config.ServerUrl = ServerUrl;
  • // config.UseInMemoryStorage();
  • //});
it’s better not to
because the api key and server url could already be set on the default instance
we should always fallback to the default instance
Jamie Clarke
@jamie94bc
Feb 15 2016 17:09
ahh okay
so if I make apiKey required for one overload, and client not for the other (which defaults to the default) that should work?
Blake Niemyjski
@niemyjski
Feb 15 2016 17:10
if you are just using serilog then yes you’d need it and it would be better to throw an exceptionbut the vast majority are already integrating with exceptionless for errors and so it will already be configured on the default instance
yeah
Jamie Clarke
@jamie94bc
Feb 15 2016 17:11
cool i'll get that pushed in a sec
Jamie Clarke
@jamie94bc
Feb 15 2016 17:11
what's UseInMemoryStorage ?
should I add that back?
Blake Niemyjski
@niemyjski
Feb 15 2016 17:11
yes
by default we are in memory but if you are only using logging and specifying the api key, we should use it
because it is night and day difference in perf
Jamie Clarke
@jamie94bc
Feb 15 2016 17:18
there we go! :smile:
Blake Niemyjski
@niemyjski
Feb 15 2016 17:21
added some very quick feedback :)
looks good otherwise :)
wanna update that quick and I’ll accept it
would love to hear your feedback on it
Jamie Clarke
@jamie94bc
Feb 15 2016 17:24
some good feedback! :smile:
client overload definitely makes sense
i've done the rest too
Blake Niemyjski
@niemyjski
Feb 15 2016 17:26
should I click the button?
thanks :)
Jamie Clarke
@jamie94bc
Feb 15 2016 17:30
np
Jamie Clarke
@jamie94bc
Feb 15 2016 17:35
nuget stats for nlog vs serilog... nlog: 2,557,097, serilog: 306,637
might explain the difference in usage you're seeing!
Frank Ebersoll
@frankebersoll
Feb 15 2016 17:41
@jamie94bc are u involved in serilog?
Jamie Clarke
@jamie94bc
Feb 15 2016 17:41
nope
Frank Ebersoll
@frankebersoll
Feb 15 2016 17:42
We're considering a move from semantic logging application block to serilog at work. SLAN is a pita
Jamie Clarke
@jamie94bc
Feb 15 2016 18:03
never used that - the logging framework in asp.net core doesn't look terrible!
but I like the structured event properties
Blake Niemyjski
@niemyjski
Feb 15 2016 18:39
so just came up with an issue with the .net client
is serializing properties
so @user is json and is not a user object
@ejsmith think we should special case it or just copy it right to indexer
only thing is
Blake Niemyjski
@niemyjski
Feb 15 2016 18:44
what about data exclusions (should still get applied?), and depth
Frank Ebersoll
@frankebersoll
Feb 15 2016 19:07
jsonception.
Blake Niemyjski
@niemyjski
Feb 15 2016 19:09
thing is you don’t really think set property is going to serialize something
sigh
Frank Ebersoll
@frankebersoll
Feb 15 2016 19:11
Every day all this IT stuff.
Blake Niemyjski
@niemyjski
Feb 15 2016 19:11
don’t know if we want to special case it to just copy over our known property types
yeah
foreach (var data in context.Client.Configuration.DefaultData) {
if (!context.Event.Data.ContainsKey(data.Key)) {
if (data.Key.StartsWith("@"))
context.Event.Data[data.Key] = data.Value;
else
context.Event.SetProperty(data.Key, data.Value, client: context.Client);
}
}
don’t really like that
thinking maybe we should just straight copy it
if you are an idiot and put something big in there
it’s your fault
Frank Ebersoll
@frankebersoll
Feb 15 2016 19:21
a string is a string.
i would be surprised if it was treated differently
Blake Niemyjski
@niemyjski
Feb 15 2016 19:22
ahh
founbd something better :)
Eric J. Smith
@ejsmith
Feb 15 2016 19:51
Whats the question?
Blake Niemyjski
@niemyjski
Feb 15 2016 19:59
exceptionless/Exceptionless.Net@cd818a4
pushing that
eh data properties are being serialized to strings at the first step in the pipeline
and users might not be expecting that
maybe I should add a data extension method
if (ev == null || !ev.Data.ContainsKey(Event.KnownDataKeys.UserInfo))
return null;
        try {
            return ev.Data.GetValue<UserInfo>(Event.KnownDataKeys.UserInfo, serializer);
        } catch (Exception) { }
that does that
    public static T GetDataValue<T>(this Event ev, string key, IJsonSerializer serializer = null) {
        if(ev == null || String.IsNullOrEmpty(key) || !ev.Data.ContainsKey(key))
            return default(T);

        try {
            return ev.Data.GetValue<T>(key, serializer);
        } catch (Exception) { }

        return default(T);
    }
Blake Niemyjski
@niemyjski
Feb 15 2016 20:09
should help people
exceptionless/Exceptionless.Net@0002bd8
ahhh so much cleaner :D
Blake Niemyjski
@niemyjski
Feb 15 2016 20:26
I think we need to get rid of clahub
it’s no longer maintained and it looks like no one can sign our cla they have to email us
looks like a good replacement and we can insert our existing cla
Eric J. Smith
@ejsmith
Feb 15 2016 20:27
yeah, that looks nice
Blake Niemyjski
@niemyjski
Feb 15 2016 20:27
wonder if there are any others
Eric J. Smith
@ejsmith
Feb 15 2016 20:28
that one looks nice
Blake Niemyjski
@niemyjski
Feb 15 2016 20:28
want me to just do that one
Eric J. Smith
@ejsmith
Feb 15 2016 20:29
yeah
Blake Niemyjski
@niemyjski
Feb 15 2016 20:56
kinda stinks each repo has a contributor list
I just imported all of ours
we only get the github user name
nothing else
Eric J. Smith
@ejsmith
Feb 15 2016 21:28
fine with me
what else do we want?
Blake Niemyjski
@niemyjski
Feb 15 2016 21:28
address
be kinda cool to send out random stuff if needed :)
Eric J. Smith
@ejsmith
Feb 15 2016 21:29
true
and ask for shirt size maybe :-)
Blake Niemyjski
@niemyjski
Feb 15 2016 22:20
Screen Shot 2016-02-15 at 4.19.48 PM.png
too gray
Eric J. Smith
@ejsmith
Feb 15 2016 22:21
Ask Bill it was his idea. :-)
Blake Niemyjski
@niemyjski
Feb 15 2016 22:22
yeah
learned something new today