github getsentry/sentry-python 1.15.0

latest releases: 2.15.0, 2.14.0, 2.13.0...
20 months ago

Various fixes & improvements

  • New: Add Huey Integration (#1555) by @Zhenay

    This integration will create performance spans when Huey tasks will be enqueued and when they will be executed.

    Usage:

    Task definition in demo.py:

    import time
    
    from huey import SqliteHuey, crontab
    
    import sentry_sdk
    from sentry_sdk.integrations.huey import HueyIntegration
    
    sentry_sdk.init(
        dsn="...",
        integrations=[
            HueyIntegration(),
        ],
        traces_sample_rate=1.0,
    )
    
    huey = SqliteHuey(filename='/tmp/demo.db')
    
    @huey.task()
    def add_numbers(a, b):
        return a + b

    Running the tasks in run.py:

    from demo import add_numbers, flaky_task, nightly_backup
    
    import sentry_sdk
    from sentry_sdk.integrations.huey import HueyIntegration
    from sentry_sdk.tracing import TRANSACTION_SOURCE_COMPONENT, Transaction
    
    
    def main():
        sentry_sdk.init(
            dsn="...",
            integrations=[
                HueyIntegration(),
            ],
            traces_sample_rate=1.0,
        )
    
        with sentry_sdk.start_transaction(name="testing_huey_tasks", source=TRANSACTION_SOURCE_COMPONENT):
            r = add_numbers(1, 2)
    
    if __name__ == "__main__":
        main()
  • Profiling: Do not send single sample profiles (#1879) by @Zylphrex

  • Profiling: Add additional test coverage for profiler (#1877) by @Zylphrex

  • Profiling: Always use builtin time.sleep (#1869) by @Zylphrex

  • Profiling: Defaul in_app decision to None (#1855) by @Zylphrex

  • Profiling: Remove use of threading.Event (#1864) by @Zylphrex

  • Profiling: Enable profiling on all transactions (#1797) by @Zylphrex

  • FastAPI: Fix check for Starlette in FastAPI integration (#1868) by @antonpirker

  • Flask: Do not overwrite default for username with email address in FlaskIntegration (#1873) by @homeworkprod

  • Tests: Add py3.11 to test-common (#1871) by @Zylphrex

  • Fix: Don't log whole event in before_send / event_processor drops (#1863) by @sl0thentr0py

Don't miss a new sentry-python release

NewReleases is sending notifications on new releases.