Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 20:15
    ejsmith edited #530
  • 20:07
    ejsmith edited #530
  • 17:00
    ejsmith commented #530
  • 17:00
    ejsmith commented #530
  • 16:54
    ejsmith opened #530
  • Feb 25 23:00
    Edreih opened #529
  • Feb 25 15:04
    dependabot-preview[bot] commented #501
  • Feb 25 15:04
    niemyjski commented #501
  • Feb 25 15:04
    claassistantio commented #501
  • Feb 25 15:04
    niemyjski synchronize #501
  • Feb 25 15:04

    niemyjski on nuget

    Updated to latest asp.net core revert to older asp.net core Update README.md and 7 more (compare)

  • Feb 25 15:03
    niemyjski commented #475
  • Feb 25 15:02
    niemyjski closed #463
  • Feb 25 15:02
    niemyjski commented #463
  • Feb 25 08:10
    claassistantio commented #528
  • Feb 25 08:10
    dependabot-preview[bot] labeled #528
  • Feb 25 08:10
    dependabot-preview[bot] opened #528
Blake Niemyjski
@niemyjski
Can you paste a snippet of the code here
Everything is an event now and that could be the issue
Lukas Wöhrl
@woehrl01
saving is this step:

var error = e.ToExceptionless();

string path = Process.GetCurrentProcess().MainModule.FileName;

var version = FileVersionInfo.GetVersionInfo(path);

error.AddObject(version, "ExeVersion");

string errorAsString = JsonConvert.SerializeObject(error.Target);
var log = new ExceptionLogEntry
{
Log = errorAsString,
OccurenceTime = DateTime.Now
};
_dao.Create(log);

and the sending is doing this:
string log = _dao.First();
var error = JsonConvert.DeserializeObject<Error>(log);
var builder = new ErrorBuilder(error);
builder.Submit();
Blake Niemyjski
@niemyjski
Why not let us handle submission?
Where is dao writing these to?
Lukas Wöhrl
@woehrl01
the dao is storing them in the database
Blake Niemyjski
@niemyjski
And what determines when they are sent
Lukas Wöhrl
@woehrl01
the reason we can't use exceptionless directly are restrictions on the network. not every client is allowed to connect to the internet
so we have an agent which polls the database table end sends them
Blake Niemyjski
@niemyjski
Ah
So give me a few minutes (waking up)
Lukas Wöhrl
@woehrl01
take your time ;)
Blake Niemyjski
@niemyjski
But there's a much better way to do this now :)
Lukas Wöhrl
@woehrl01
by the way, another reason to do this, is that we can are also able to send exceptions which occure in c++. The agent assembls an exceptionless error from parsing a errorreport from a cpp library and sends those over the wire into exceptionless. (so no need to update the clients when we change the parsing ;) )
I know that all of this is easier with 2.x ;)
Lukas Wöhrl
@woehrl01
by the way: the Event Type is error and Error type is unknown
Blake Niemyjski
@niemyjski
So I think your best thing to do would be to implement your own queue
and get rid of all of your custom logic
I'd open our source and take a look at DefaultEventQueue
Then remove the process logic and the enqueue should just store the event to your database..
then remove the process logic :)
Lukas Wöhrl
@woehrl01
hm, sad. because it worked perfectly fine with 1.x :-/
Blake Niemyjski
@niemyjski
we'll you were doing kind of a massive hack around 1.x
in 2.0 everything is dependency injected
so this would be really clean
and work a lot better
with no overhead of serialzing to disk.. it would go straight to the database.
serializer.Serialize(events);
so you'd just need to implement EnQueue and then call dao.Save(serializer.Serialize(ev)); and your done
one line of code
Then on your logic that pulls....
you could do the same thing but implement process that pulls it from the database and deserializes it to type of event and then post it :)
you should be able to do this in about 20 lines of code or less (With the class)
for both sides of it
if you need some help quick I could jump on a meeting with you and help you quick
Lukas Wöhrl
@woehrl01
ok, I'll have a look into this. I hoped I could do this without requiring to change something on the clients ;)
Blake Niemyjski
@niemyjski
second thing you could do is create a relay server
and make no changes
Lukas Wöhrl
@woehrl01
any idea what could be the root of the problem?
Blake Niemyjski
@niemyjski
string errorAsString = JsonConvert.SerializeObject(error.Target);
var log = new ExceptionLogEntry
{
Log = errorAsString,
OccurenceTime = DateTime.Now
};
_dao.Create(log);
Lukas Wöhrl
@woehrl01
just for information purposes ;)
Blake Niemyjski
@niemyjski
your giving it the error.Target as the error string instead of passing in the whole event
cleanest / safest / fastest way to do this would be with what I said
it takes away any serialization issues
and makes for code reuse on the puller and submission clients
not submission but clients in general
Lukas Wöhrl
@woehrl01
jep, I think this would be the cleanest to use the serialisation of 2.x