Observability is obviously the thing for next couple of years. It is one of system's attributes, which differs modern system from legacy.
The starting point for every project's observability is our old friend - logging. Major problem with logs is that Developers usually do not like adding logs to their code, the business, in its turn, doesn't see a value of it and topic usually gets deprioritized.
Everyone recalls of logs when something bad happens. To avoid this sort of adventures, logs should be in code from day one and maintained as project grows.
Another, but not less dramatic problem is that amount of log data is huge, specially for microservices solutions. Developers do have a hard time to find something valuable in such data chaos. Konso is about to address this exact problem.
We created Konso based on our internal product we developed and maintained for years as development team. Konso allows easily explore logs and integration is super fast without an agent installation.
Here in this post I would like to show how can you quickly integrate with konso and start receiving and explore data.
Create konso account, it has free plan :)
Create a new bucket
- Add Logging functionality to your bucket
- Clone source or install nuget package to your project
Repository from github
git clone https://github.com/konsoio/konso-logs-clients-dotnet .
Nuget usage
Install-Package Konso.Clients.Logging
- Configuration
Go to Settings -> API access for obtaining api-key and bucket id
Add configuration to your appsettings.json
"Konso": {
"Logging": {
"Endpoint": "https://apis.konso.io",
"BucketId": "<your bucket id>",
"ApiKey": "<bucket's access key>",
"App": "api",
"Level": "Information"
}
}
Then configure logging
.ConfigureLogging(logging => {
logging.ClearProviders();
logging.AddKonsoLogger();
})
.ConfigureServices((hostContext, services) =>
{
var _logsConfig = new KonsoLoggerConfig();
_logsConfig.Endpoint = hostContext.Configuration.GetValue<string>("Konso:Logging:Endpoint");
_logsConfig.BucketId = hostContext.Configuration.GetValue<string>("Konso:Logging:BucketId");
_logsConfig.AppName = hostContext.Configuration.GetValue<string>("Konso:Logging:App");
_logsConfig.ApiKey = hostContext.Configuration.GetValue<string>("Konso:Logging:ApiKey");
services.AddSingleton(_logsConfig);
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
})
Now you can run your project
- Navigate to Observability -> Logs -> Overview to find logging dashboard
Next, you can navigate to the Explore screen to search for, filter, and delve into the detailed information about the project's logs.
Detailed API referense can be found https://docs.konso.io/api/logs
Debugging microservices is always tricky and time consuming specially without proper code level logging in place.
Meet Konso. It's developed as a solution for this challenge and can help with saving development effort for your team up to 30%. 🎯🎉
The key functions are:
🔥 Centralized logging for your microservices
🔥 Tracing with metrics and value tracking events
🔥 Ad-Hoc events exploration
🔥 Saving your queries
🔥 Create alerts and get notified
You can start collecting you project's logs in 5 minutes. 🕐💪
To Learn more about logging tool, book a free demo.
To get started for free, Create your free account now
No comments are allowed for this post