# Using Better Stack

Better Stack (formerly known as Logtail) is another excellent option for centralized logging and monitoring. To integrate BetterStack with your application:

1. **Enable BetterStack**: Set the `USE_BETTERSTACK` variable to `True`.
2. **Set Source Token**: Set the `BETTERSTACK_SOURCE_TOKEN` variable to the source token provided by BetterStack during setup.

```python
USE_BETTERSTACK = False  # Change to True to enable BetterStack
BETTERSTACK_SOURCE_TOKEN = None  # Set this to your BetterStack source token
```

When BetterStack is enabled, your application will send logs and error data to BetterStack for centralized monitoring and analysis.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shipwithdjango.com/logging/using-better-stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
