Skip to content

Commit

Permalink
Add Sentry flask integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-z committed Jan 21, 2024
1 parent 67e2cfd commit a822451
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repo is derived from the [official example](https://github.com/getsentry/ex

```bash
docker build -t sentry-tunnel .
docker run --rm --name sentry-tunnel -e ALLOWED_SENTRY_HOSTS=o123123123.ingest.sentry.io -e ALLOWED_SENTRY_PROJECT_IDS=456456456 -e PORT=5001 -p 5001:5001 sentry-tunnel
docker run --rm -it --name sentry-tunnel -v $(pwd):/app -e ALLOWED_SENTRY_HOSTS=o123123123.ingest.sentry.io -e ALLOWED_SENTRY_PROJECT_IDS=456456456 -e PORT=5001 -p 5001:5001 sentry-tunnel
```

Below is the original README:
Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def sentry_traces_sampler(sampling_context):
return sampling_context["parent_sampled"]

# Don't need to sample health checks
if sampling_context.get("asgi_scope", {}).get("path", "").startswith("/health"):
if sampling_context.get("wsgi_environ", {}).get("PATH_INFO", "") == "/health":
return 0

# Sample everything else
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ flask>=3.0.0
flask-cors>=3.0.10
requests>=2.26.0
waitress>=2.1.2
sentry-sdk>=1.32.0
sentry-sdk[flask]>=1.32.0

0 comments on commit a822451

Please sign in to comment.