Wedvich/structured-log-seq-sink

Add support for exceptions

Closed this issue · 7 comments

structured-log puts exceptions in the LogEvent's error field. This should be pushed to Seq's Exception field.

See http://docs.getseq.net/docs/posting-raw-events

@xwipeoutx It does this already if using structured-log >= 0.1.0 with the latest version of this sink (0.3.3). Isn't this working for you?

I'm running latest of each (just pulled them today), and I had a quick squiz at the source before raising it.

It works with the console sink - see the JS error stack trace displays
image

But not in the Seq sink
image

I believe the payload to Seq needs to include an Exception property (@x in compact mode)

Ah sorry @Wedvich, I was running from master not from HEAD - the 0.3.3 tag isn't in the master branch!

I have no idea how it happened, but it looks like the tagged commit got orphaned somehow, and I don't have the original branch anywhere. It was more or less impossible to retrieve from GitHub to connect it back to master. Since the tagged commit was still here though, I just created a new commit (d288595) from the same source files and moved the v0.3.3 tag up to that, so you should be able to find it in master now. Sorry for the mess!

That works I guess. FWIW, next you can switch to the master branch and just merge the commit (which was cf4ef56 ) into master with fast-forward. That would just move the master branch up to that commit.

Yep, I was trying to that, but I couldn't fetch that commit to my local repo from GitHub in any way - not by tag, or the commit hash itself. I have no idea why, and I wasn't really in the mood to fight with Git 😄