LogSentinel is a lightweight SDK for monitoring and analyzing logs in Python applications. It automatically captures request and response data, builds detailed metadata, and sends them to the LogSentinel AI platform for analysis.
pip install logsentinel- Go to the LogSentinel Dashboard and create an API key.
- Add it to your environment variables:
export LOGSENTINEL_API_KEY="your_api_key_here"from fastapi import FastAPI
from logosentinel import LogSentinelASGIMiddleware
app = FastAPI()
app.add_middleware(LogSentinelASGIMiddleware)
@app.post("/hello")
async def hello(data: dict):
return {"message": "Hello, world!", "received": data}Logs will automatically be captured and sent to your LogSentinel dashboard for AI analysis.
MIT License