Seq Documentation and Support

Welcome to the Seq documentation hub. You'll find comprehensive guides and documentation to help you start working with Seq as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    


Ask A Question

Docker-.Net Core-Mac vs Linux

Hello, I would like to use seq in a .net core api. I use this code to configure uri: .WriteTo.Seq("http://<ubuntuip>:5341") First I started the seq in docker at my digitalocean droplet (<ubuntuip>) at port 5341. I can reach the ui from chrome. Then I built a docker image from my .net core app and run this image at my local computer and the logging working fine. Then I pushed this image to dockerhub and run it at my droplet and the logging not working. So I run the same docker image at my droplet and on my computer, the seq run at my droplet and if I run app on my local computer the logging fine but when on droplet that's not working. Can anyone help me? And this is the seq logging error message: Exception while emitting periodic batch from Serilog.Sinks.Seq.SeqSink: System.Threading.Tasks.TaskCanceledException: The operation was canceled. at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Serilog.Sinks.Seq.SeqSink.EmitBatchAsync(IEnumerable`1 events) at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick()

Posted by Tom about a year ago


Query Syntax - Using Aggregate Function 'Distinct' performance on large datasets?

Hello Support, In my NET Core project I am building a log report template UI so users can query logs from within my own WebApp. One of the nifty concepts i came up with in my previous project (before i started using Seq) was searching the MS Sql database where the logs were stored and for each log event property, I would scan the whole table column in SQL using a distinct query in order to return the results of the actual values. These values I would then list within a drop down list in the web form, so that the user could select their own choice of event property values to use as part of their search when querying the logs database. The beauty of doing this is the logs event property values can change/evolve over time without having to hard code anything in the software i.e If I start writing new property values in my C# code, these will be pulled through to the dropdown list. I've looked at how to do this using an Seq query through your SDK, and noticed a couple of things I would appreciate some input on: Q. It looks like we have to set a start DateTime for the Seq query to work. In this scenario, I would simply set a start date back far enough that we always know we're querying the dataset from the very beginning of time. It seems to work doing this with a fairly small dataset, is this going to viable as the logs start growing with big data stored? As the logs database starts to fill up, in an enterprise environment, we could imagine that potentially millions of log events might be stored in Seq. Q. What impact on query time/performance would we likely have in performing a 'Distinct' query on a property column in Seq DB? For this to continue being a viable solution, we would need a fairly quick turnaround so the user is not waiting forever before they can select the dropdown lists that are populated with distinct property values. Thanks in advance.

Posted by OLIVER BENTLEY about a year ago


Paging backwards using lastReadEventId is not working

Hello, I'm using your SDK to fetch events from Seq into our own WebApp front end (net core 3.1 Razor) I'm able to page in one direction using a 'Next' button by using the lastReadEventId variable which is returned from the API after each iteration. The result of this is I'm able to click the 'Next' button to produce a list of results that are older in time by timestamp given we display the most recent event first by default (note i'm using the count var as well to do this so I return a set of say 100 rows at a time and show them in a razor page list view) Each time a new unique lastReadEventId value is returned, i'm storing it in a javascript array so i keep track of the page iterations by direction in which way we iterate through the array (forwards or backwards) If the user wants to page backwards i.e. return results that were newer than the previous request, then using javascript logic we pass a previously stored lastReadEventId variable to the API in an attempt to fetch a previous set of results. But this is not returning the newer results as expected. From VS 2019 c# debugging I can see we are passing the correct lastReadEventId in order to return the events from a previous round, but the server does not return correct set. It seems that this lastReadEventId variable is being cached somewhere in Seq and decides for itself what the value should be, as opposed to a more logical cause & affect in simply giving us the results we're asking for. It seems we cannot this var to re-produce a set of results that are more recent in time than the last iteration. Paging only in one direction is not going to give us a workable solution. Could you please advise how we get around this? thanks.

Posted by OLIVER BENTLEY about a year ago