examples: added sentry-metrics example

This commit is contained in:
Aleix Conchillo Flaqué
2025-02-06 10:43:10 -08:00
parent c5d5ca8232
commit c4be07693f
9 changed files with 524 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# Sentry Metrics
This app connects you to a chatbot powered by GPT-4. It provides TTFB (Time-To-First-Byte) and processing metrics to Sentry.
## Get started
```python
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp env.example .env # and add your credentials
```
## Run the server
```bash
python server.py
```
Then, visit `http://localhost:7860/` in your browser to start a chatbot session.
## Build and test the Docker image
```
docker build -t chatbot .
docker run --env-file .env -p 7860:7860 chatbot
```