
If this is your first time working with logging, we recommend starting with our Logging guides.
Better Stack allows you to collect logs across your stack, be it from your node.js app or a Kubernetes cluster, and centralize them into one place. But it's not just storage. With Better Stack, you can live tail and query your logs with blazing speeds using SQL. You can build actionable dashboards and explore all the insights your logs have to give.
On top of that, you can configure presence/absence alerts and get notified whenever there is an issue. All that while collaborating with your colleagues by commenting on specific log fragments and sharing links.
If this is your first time working with logging, we recommend starting with our Logging guides.
To start logging, we need to connect a source to our Better Stack account. A source is a service that generates logs which are then sent to Better Stack, for example, an application or a web server.
You can now test the pipes to see if the Logs are arriving correctly. For this, you will need a source token. Every source has a unique source token that identifies it and is used to connect the actual source to Better Stack.
curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $SOURCE_TOKEN' \
-d '{"dt":"'"$(date -u +'%Y-%m-%d %T UTC')"'","message":"Hello from Better Stack!"}' \
-k \
https://in.logs.betterstack.com
{
"dt":"2022-06-15 11:24:09.000 UTC",
"message_string":"Hello from Better Stack!"
}
Amazing job! π You have just sent your first log message.
Now that Better Stack is set up to receive your logs, you can integrate it into your application.
The integration setup depends on the source. Here are guides for the most popular ones:
Source not listed here? Go to Log Sources to see the integration guides for all the available sources.