Skip to content

Commit

Permalink
sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
Zochory committed Sep 1, 2024
1 parent e08de11 commit b940d59
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 2 deletions.
23 changes: 22 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
import numpy as np
from app.utils import convert_numpy
from app.api import _reformat_context_data
import sentry_sdk


sentry_sdk.init(
dsn="https://741dc950f3465d2db0b8f869832dabc0@o4507875835314176.ingest.de.sentry.io/4507875863429200",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
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,
)


logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -120,4 +134,11 @@ async def generate_questions(search_query: SearchQuery):
async def root():
return {"message": "Welcome to GraphFleet API"}

main = app

@app.get("/sentry-debug")
async def trigger_error():
division_by_zero = 1 / 0
return {"message": "This should never be reached"}


main = app
54 changes: 53 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ networkx = "^3.0"
pydantic-settings = "^2.4.0"
streamlit-nightly = "^1.38.1.dev20240828"
sseclient-py = "^1.8.0"
sentry-sdk = {extras = ["fastapi"], version = "^2.13.0"}



Expand Down

0 comments on commit b940d59

Please sign in to comment.