Serilog-Sinks-Loki | Serilog Sink for Loki , Grafana 's new Prometheus | Dashboard library
kandi X-RAY | Serilog-Sinks-Loki Summary
kandi X-RAY | Serilog-Sinks-Loki Summary
A Serilog Sink for Loki, Grafana's new Prometheus inspired log aggregator
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Serilog-Sinks-Loki
Serilog-Sinks-Loki Key Features
Serilog-Sinks-Loki Examples and Code Snippets
Community Discussions
Trending Discussions on Serilog-Sinks-Loki
QUESTION
I am trying to send my logs from .netcore 3.1 API to Loki server. For doing that I'm using Serilog-Sinks-Loki nugget package. When I run my code, logs are sent immediately and I can see them in Grafana. As time past, logs are coming with delay which growing bigger and bigger. Eventually I see my logs arriving after delay of 10 minutes to Loki. I read about that and understand that Serilog-Sinks-Loki sits on top of Serilog-Sinks-Http so I need to configure something over there to make my logs arrive faster but not sure how, can someone help me with that please? My goal is to send my logs immediately, with no delay.
Here is my program.cs code
...ANSWER
Answered 2020-Oct-21 at 23:27Although Serilog.Sinks.Loki
wraps a Serilog.Sinks.Http
sink, it doesn't expose any of the settings that would allow you to configure how often messages are sent (batchPostingLimit
, period
, etc.)
That said, the default period of Sinks.Sink.Http
is 2 seconds, thus 10 minutes is too long for messages to be sent with the default settings. You're likely having connection issues that are blocking the sink from sending the messages or blocking the server from receiving them.
Have you tried enabling the SelfLog
to see if any errors are being caught by the sink?
If not, you can monitor the network traffic to see if you can find failed attempts and/or timeouts when the sink tries to send the log events.
You can also extend the LokiHttpClient and write some debug messages to a file or something to see how often / how many messages are being sent.
For reference here is a recent issue in the Serilog.Sinks.Loki
repo (perhaps you created it?)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Serilog-Sinks-Loki
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page