Skip to content

Commit

Permalink
DEVOP: Add Sentry monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tarto-dev committed Feb 15, 2024
1 parent 95c5c06 commit c362f8d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Fly Deploy
on:
push:
branches:
- master # change to main if needed
jobs:
docker-build:
name: Build & pubish Docker images
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

# This step creates real Sentry releases for the action itself:
# https://sentry-ecosystem.sentry.io/releases/?project=6576594
- name: Sentry Release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_LOG_LEVEL: debug
with:
environment: 'production'
ignore_missing: true
13 changes: 13 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
)
from configs import BOT_TOKEN

import sentry_sdk

sentry_sdk.init(
dsn="https://92a13f27d4650d93ea30e11bd3db649f@o472921.ingest.sentry.io/4506748874129408",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
# Set profiles_sample_rate to 1.0 to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production.
profiles_sample_rate=1.0,
)

bot = InteractionBot()
products = get_all_products_from_api()

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
requests==2.31.0
disnake==2.9.1
python-dotenv==0.21.0
sentry-sdk==1.40.4

0 comments on commit c362f8d

Please sign in to comment.