sentry

Decorators to configure Sentry error and trace rates?

Decorators to configure Sentry error and trace rates? Question: I am using Sentry and sentry_sdk to monitor errors and traces in my Python application. I want to configure the error and trace rates for different routes in my FastAPI API. To do this, I want to write two decorators called sentry_error_rate and sentry_trace_rate that will …

Total answers: 1

sentry sdk custom performance integration for python app

sentry sdk custom performance integration for python app Question: Sentry can track performance for celery tasks and API endpoints https://docs.sentry.io/product/performance/ I have custom script that are lunching by crone and do set of similar tasks I want to incorporated sentry_sdk into my script to get performance tracing of my tasks Any advise how to do …

Total answers: 1

Need help to understand the documentation of Sentry API

Need help to understand the documentation of Sentry API Question: I am making an API request to the sentry API, like this: _URL = "https://sentry.io/api/0/projects/aaaa-7y/aaaa/issues/" headers = {‘Authorization’: ‘Bearer 11111111111111111111111’, ‘Content-Type’: ‘application/json’} params = {"statsPeriod":"24h", ‘cursor’:’100:-1:1′} r = requests.get(url = _URL, headers = headers, params=params, verify=False) data = r.json() and I realized that I am …

Total answers: 2

How to send a logging attachment to Sentry in Python?

How to send a logging attachment to Sentry in Python? Question: I have been trying to send a ".log" file attachment to sentry from python every time an error/ exception occurs but so far without success. Sentry does not provide attachments documentation for python, so I have been reading the java attachments example (https://docs.sentry.io/platforms/java/enriching-events/attachments/), which …

Total answers: 1

How can I prevent sentry from capturing events for some uncaught exceptions and logging messages?

How can I prevent sentry from capturing events for some uncaught exceptions and logging messages? Question: As recommended by Sentry’s docs [1][2] for their new unified python sdk (sentry_sdk), I’ve configured it with my Django application to capture events on all exceptions or “error”-level logs: import sentry_sdk import logging from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.logging …

Total answers: 5