|
4 | 4 |
|
5 | 5 | ### Various fixes & improvements
|
6 | 6 |
|
7 |
| -- ref(profiling): Do not send single sample profiles (#1879) by @Zylphrex |
8 |
| -- tests(profiling): Add additional test coverage for profiler (#1877) by @Zylphrex |
9 |
| -- fix(profiling): Always use builtin time.sleep (#1869) by @Zylphrex |
10 |
| -- Fix check for Starlette in FastAPI integration (#1868) by @antonpirker |
11 |
| -- tests: Add py3.11 to test-common (#1871) by @Zylphrex |
12 |
| -- Do not overwrite default for username with email address in FlaskIntegration (#1873) by @homeworkprod |
13 |
| -- feat(profiling): Enable profiling on all transactions (#1797) by @Zylphrex |
14 |
| -- Add Huey Integration (#1555) by @Zhenay |
15 |
| -- ref(profiling): Remove use of threading.Event (#1864) by @Zylphrex |
16 |
| -- Don't log whole event in before_send / event_processor drops (#1863) by @sl0thentr0py |
17 |
| -- fix(profiling): Defaul in_app decision to None (#1855) by @Zylphrex |
| 7 | +- New: Add [Huey](https://huey.readthedocs.io/en/latest/) Integration (#1555) by @Zhenay |
| 8 | + |
| 9 | + This integration will create performance spans when Huey tasks will be enqueued and when they will be executed. |
| 10 | + |
| 11 | + Usage: |
| 12 | + |
| 13 | + Task definition in `demo.py`: |
| 14 | + |
| 15 | + ```python |
| 16 | + import time |
| 17 | + |
| 18 | + from huey import SqliteHuey, crontab |
| 19 | + |
| 20 | + import sentry_sdk |
| 21 | + from sentry_sdk.integrations.huey import HueyIntegration |
| 22 | + |
| 23 | + sentry_sdk.init( |
| 24 | + dsn="...", |
| 25 | + integrations=[ |
| 26 | + HueyIntegration(), |
| 27 | + ], |
| 28 | + traces_sample_rate=1.0, |
| 29 | + ) |
| 30 | + |
| 31 | + huey = SqliteHuey(filename='/tmp/demo.db') |
| 32 | + |
| 33 | + @huey.task() |
| 34 | + def add_numbers(a, b): |
| 35 | + return a + b |
| 36 | + ``` |
| 37 | + |
| 38 | + Running the tasks in `run.py`: |
| 39 | + |
| 40 | + ```python |
| 41 | + from demo import add_numbers, flaky_task, nightly_backup |
| 42 | + |
| 43 | + import sentry_sdk |
| 44 | + from sentry_sdk.integrations.huey import HueyIntegration |
| 45 | + from sentry_sdk.tracing import TRANSACTION_SOURCE_COMPONENT, Transaction |
| 46 | + |
| 47 | + |
| 48 | + def main(): |
| 49 | + sentry_sdk.init( |
| 50 | + dsn="...", |
| 51 | + integrations=[ |
| 52 | + HueyIntegration(), |
| 53 | + ], |
| 54 | + traces_sample_rate=1.0, |
| 55 | + ) |
| 56 | + |
| 57 | + with sentry_sdk.start_transaction(name="testing_huey_tasks", source=TRANSACTION_SOURCE_COMPONENT): |
| 58 | + r = add_numbers(1, 2) |
| 59 | + |
| 60 | + if __name__ == "__main__": |
| 61 | + main() |
| 62 | + ``` |
| 63 | + |
| 64 | +- Profiling: Do not send single sample profiles (#1879) by @Zylphrex |
| 65 | +- Profiling: Add additional test coverage for profiler (#1877) by @Zylphrex |
| 66 | +- Profiling: Always use builtin time.sleep (#1869) by @Zylphrex |
| 67 | +- Profiling: Defaul in_app decision to None (#1855) by @Zylphrex |
| 68 | +- Profiling: Remove use of threading.Event (#1864) by @Zylphrex |
| 69 | +- Profiling: Enable profiling on all transactions (#1797) by @Zylphrex |
| 70 | +- FastAPI: Fix check for Starlette in FastAPI integration (#1868) by @antonpirker |
| 71 | +- Flask: Do not overwrite default for username with email address in FlaskIntegration (#1873) by @homeworkprod |
| 72 | +- Tests: Add py3.11 to test-common (#1871) by @Zylphrex |
| 73 | +- Fix: Don't log whole event in before_send / event_processor drops (#1863) by @sl0thentr0py |
18 | 74 |
|
19 | 75 | ## 1.14.0
|
20 | 76 |
|
|
0 commit comments