AntoineGa / Seq.App.Teams

Seq application for Microsoft Teams
MIT License
13 stars 10 forks source link

"Click here to open in Seq" not working #8

Closed xantari closed 4 years ago

xantari commented 5 years ago

When we click on "Click here to open in seq" it brings us to our Seq URL with the following pre-populated:

@Id == "event-8215165619ea08d70000000000000000"

However that doesn't display anything.

It seems to be picking up non-existent event id's...

nblumhardt commented 5 years ago

Hi! I'm not sure if this is the root cause, but @id is case-sensitive and should be @Id.

HTH!

xantari commented 5 years ago

@nblumhardt It appears to be putting the query in correctly. However it isn't the correct Id, which is strange. I did find the event, but it's a different Id altogether. image

xantari commented 5 years ago

@nblumhardt One thing to know, is that this alert is getting sent from the dashboard there are two events that would trigger the alert in rapid succession.

image

xantari commented 5 years ago

image

xantari commented 5 years ago

I've added a suppression time of 1 minute incase that might be causing problems

nblumhardt commented 5 years ago

Ah, I see - thanks, I think I've figured out what's going on.

Alerts are sent to the app as events, but they're not events from the Seq log stream. I.e. if an alert fires with count(*) > 10, then a single event is sent to the alert, and it's a virtual one describing the alert that fired (it's not the 10 or more individual events).

We implemented alerts this way so that they'd work reasonably with all existing apps for notifications - but, where possible, apps are being updated to recognize alerts and display them/handle them differently.

For example, the Slack app conditionally formats events that are recognized as alerts: https://github.com/bytenik/Seq.App.Slack/blob/master/src/Seq.App.Slack/SlackReactor.cs#L191 - and the email app uses a different template for them: https://github.com/datalust/seq-apps/blob/master/src/Seq.App.EmailPlus/Resources/DefaultBodyTemplate.html#L33 .

Ideally, the Teams app will do something similar. I can help guide this if anyone is able to implement/test, but unfortunately we're deep in other tasks right now so there's no one from the Seq Team able to get to it in the immediate future.

In the short term, switching the hyperlink text and location based on the event type might be enough of a workaround to get this unblocked - what do you think?

Hope this helps! Nick

xantari commented 5 years ago

@nblumhardt I see! Thank you for figuring this out!!!

If I get some time I will try do a pull request. Or if @AntoineGa Is reading this and has time to put in a patch that would be great!

@AntoineGa If you want me to do this let me know. Also, if we could get a .yml setup on this project for auto-deploys to nuget, I can help with that...

AntoineGa commented 4 years ago

fix has been released with 1.0.17 version