Replies: 8 comments 12 replies
-
This looks promising: we use Sentry at my work and I am a fan of their services. We have written our own Prometheus-middleware for tracking latencies and request success/failure rates, and I had a question about your comment that:
Does this automatically include performance information (I have seen some mention of this in general from Sentry recently) or response times or other interesting data like that? Does Sentry also offer waterfall graphs (a la Jaeger or other opentelemetry tooling) and is that what you meant by spans here? Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Fantastic work. 🌟 One actionable item, and one item for consideration here..
|
Beta Was this translation helpful? Give feedback.
-
Not sure if it's relevant, but on import os
import sentry_sdk
from sentry_sdk.integrations.starlette import StarletteIntegration
from starlette.applications import Starlette
from starlette.routing import WebSocketRoute
from starlette.websockets import WebSocket
SENTRY_DSN = os.getenv("SENTRY_DSN")
sentry_sdk.init(
dsn=SENTRY_DSN,
integrations=[StarletteIntegration()],
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production,
traces_sample_rate=1.0,
)
class CustomWebSocketException(Exception):
...
async def websocket_error(websocket: WebSocket):
await websocket.accept()
raise CustomWebSocketException()
app = Starlette(routes=[WebSocketRoute("/sentry-ws", websocket_error)]) |
Beta Was this translation helpful? Give feedback.
-
Again, not sure if it's relevant... But the |
Beta Was this translation helpful? Give feedback.
-
As a note... If there's an error handler (500 or Exception) on the application, the package still sends the error to Sentry. This is great! This is not the case on Flask when handling |
Beta Was this translation helpful? Give feedback.
-
The "App Only" option doesn't work as expected, I guess? I see the full trace from Starlette. I would expect only the |
Beta Was this translation helpful? Give feedback.
-
That's what I could find on the Error Tracking. The application used: https://github.com/Kludex/starlette-sentry. 🙏 My trial expires in three days, can I have a free plan to do further testing on performance? 👀 |
Beta Was this translation helpful? Give feedback.
-
We had a bug report [1] about an app that has a Starlette middleware and Sentry enabled and when trying to read the request body in the middleware it hangs because Sentry already read the body. What is happening is described in this commit: My question now is: Using the Starlette |
Beta Was this translation helpful? Give feedback.
-
Announcement:
Sentry has delivered a dedicated integration for Starlette!
What is available today?
What we would like to feedback on?
Any and all feedback, issues, PRs are welcome! We will respond in a timely manner on the sentry-python SDK repo
Beta Was this translation helpful? Give feedback.
All reactions