|
21 | 21 | Your existing implementation: |
22 | 22 | ```python |
23 | 23 | transaction = sentry_sdk.transaction(...) |
24 | | - |
| 24 | + |
25 | 25 | # later in the code execution: |
26 | 26 |
|
27 | 27 | with sentry_sdk.configure_scope() as scope: |
|
31 | 31 | needs to be changed to this: |
32 | 32 | ```python |
33 | 33 | transaction = sentry_sdk.transaction(...) |
34 | | - |
| 34 | + |
35 | 35 | # later in the code execution: |
36 | 36 |
|
37 | 37 | scope = sentry_sdk.Scope.get_current_scope() |
|
83 | 83 | - Passing a function to `sentry_sdk.init`'s `transport` keyword argument has been deprecated. If you wish to provide a custom transport, please pass a `sentry_sdk.transport.Transport` instance or a subclass. |
84 | 84 | - The parameter `propagate_hub` in `ThreadingIntegration()` was deprecated and renamed to `propagate_scope`. |
85 | 85 |
|
| 86 | +## 1.42.0 |
| 87 | + |
86 | 88 | ### Various fixes & improvements |
87 | 89 |
|
88 | | -- Expose `socket_options` (#2786) by @sentrivana |
89 | | -- AWS Lambda: xfail broken tests for now (#2794) by @sentrivana |
90 | | -- Docs: Add gRPC note to migration guide (a03108f5) by @sentrivana |
91 | | -- Pin `grpcio` versions in CI (#2776) by @arr-ee |
92 | | -- Dependencies: bump types-protobuf from 4.24.0.20240129 to 4.24.0.20240302 (#2782) by @dependabot |
93 | | -- Dependencies: bump checkouts/data-schemas from `eb941c2` to `ed078ed` (#2781) by @dependabot |
94 | | -- Removed print statements because it messes with the tests (#2789) by @antonpirker |
95 | | -- Type hinting for start_transaction kwargs (#2796) by @szokeasaurusrex |
96 | | -- Correct `use_scope` comment (#2790) by @szokeasaurusrex |
97 | | -- Fixed bump-version.sh to work with version names that have chars in them (0a65f388) by @antonpirker |
| 90 | +- **New integration:** [OpenAI integration](https://docs.sentry.io/platforms/python/integrations/openai/) (#2791) by @colin-sentry |
| 91 | + |
| 92 | + We added an integration for OpenAI to capture errors and also performance data when using the OpenAI Python SDK. |
| 93 | + |
| 94 | + Useage: |
| 95 | + |
| 96 | + This integrations is auto-enabling, so if you have the `openai` package in your project it will be enabled. Just initialize Sentry before you create your OpenAI client. |
| 97 | + |
| 98 | + ```python |
| 99 | + from openai import OpenAI |
| 100 | + |
| 101 | + import sentry_sdk |
| 102 | + |
| 103 | + sentry_sdk.init( |
| 104 | + dsn="___PUBLIC_DSN___", |
| 105 | + enable_tracing=True, |
| 106 | + traces_sample_rate=1.0, |
| 107 | + ) |
| 108 | + |
| 109 | + client = OpenAI() |
| 110 | + ``` |
| 111 | + |
| 112 | + For more information, see the documentation for [OpenAI integration](https://docs.sentry.io/platforms/python/integrations/openai/). |
| 113 | + |
| 114 | +- Discard open OpenTelemetry spans after 10 minutes (#2801) by @antonpirker |
| 115 | +- Propagate sentry-trace and baggage headers to Huey tasks (#2792) by @cnschn |
| 116 | +- Added Event type (#2753) by @szokeasaurusrex |
| 117 | +- Improve scrub_dict typing (#2768) by @szokeasaurusrex |
| 118 | +- Dependencies: bump types-protobuf from 4.24.0.20240302 to 4.24.0.20240311 (#2797) by @dependabot |
98 | 119 |
|
99 | 120 | ## 1.41.0 |
100 | 121 |
|
|
0 commit comments