|
4 | 4 |
|
5 | 5 | ### Various fixes & improvements
|
6 | 6 |
|
7 |
| -- feat(openai): Make tiktoken encoding name configurable + tiktoken usage opt-in (#3289) by @colin-sentry |
8 |
| -- feat(pymongo): Send query description as valid JSON (#3291) by @0Calories |
| 7 | +- Add client cert and key support to `HttpTransport` (#3258) by @grammy-jiang |
| 8 | + |
| 9 | + Add `cert_file` and `key_file` to your `sentry_sdk.init` to use a custom client cert and key. Alternatively, the environment variables `CLIENT_CERT_FILE` and `CLIENT_KEY_FILE` can be used as well. |
| 10 | + |
9 | 11 | - OpenAI: Lazy initialize tiktoken to avoid http at import time (#3287) by @colin-sentry
|
10 |
| -- ref(consts): Remove Python 2 compatibility code (#3284) by @szokeasaurusrex |
11 |
| -- docs(init): Fix `sentry_sdk.init` type hint (#3283) by @szokeasaurusrex |
12 |
| -- Add the client cert and key support to HttpTransport (#3258) by @grammy-jiang |
13 |
| -- ref(profiling): Deprecate `hub` in `Profile` (#3270) by @szokeasaurusrex |
14 |
| -- ref(init): Stop using `Hub` in `init` (#3275) by @szokeasaurusrex |
15 |
| -- ref(hub): Delete `_should_send_default_pii` (#3274) by @szokeasaurusrex |
16 |
| -- test: Remove `Hub` usage in `conftest` (#3273) by @szokeasaurusrex |
17 |
| -- ref(debug): Rename debug logging filter (#3260) by @szokeasaurusrex |
18 |
| -- ref(tracing): Update `NoOpSpan.finish` signature (#3267) by @szokeasaurusrex |
19 |
| -- ref(tracing): Remove `Hub` in `Transaction.finish` (#3267) by @szokeasaurusrex |
20 |
| -- ref: Remove Hub from `capture_internal_exception` logic (#3264) by @szokeasaurusrex |
21 |
| -- ref(scope): Improve `Scope._capture_internal_exception` type hint (#3264) by @szokeasaurusrex |
22 |
| -- ref(types): Correct `ExcInfo` type (#3266) by @szokeasaurusrex |
23 |
| -- ref: Stop using `Hub` in `tracing_utils` (#3269) by @szokeasaurusrex |
| 12 | +- OpenAI, Langchain: Make tiktoken encoding name configurable + tiktoken usage opt-in (#3289) by @colin-sentry |
| 13 | + |
| 14 | + Fixed a bug where having certain packages installed along the Sentry SDK caused an HTTP request to be made to OpenAI infrastructure when the Sentry SDK was initialized. The request was made when the `tiktoken` package and at least one of the `openai` or `langchain` packages were installed. |
| 15 | + |
| 16 | + The request was fetching a `tiktoken` encoding in order to correctly measure token usage in some OpenAI and Langchain calls. This behavior is now opt-in. The choice of encoding to use was made configurable as well. To opt in, set the `tiktoken_encoding_name` parameter in the OpenAPI or Langchain integration. |
| 17 | + |
| 18 | + ```python |
| 19 | + sentry_sdk.init( |
| 20 | + integrations=[ |
| 21 | + OpenAIIntegration(tiktoken_encoding_name="cl100k_base"), |
| 22 | + LangchainIntegration(tiktoken_encoding_name="cl100k_base"), |
| 23 | + ], |
| 24 | + ) |
| 25 | + ``` |
| 26 | + |
| 27 | +- PyMongo: Send query description as valid JSON (#3291) by @0Calories |
| 28 | +- Remove Python 2 compatibility code (#3284) by @szokeasaurusrex |
| 29 | +- Fix `sentry_sdk.init` type hint (#3283) by @szokeasaurusrex |
| 30 | +- Deprecate `hub` in `Profile` (#3270) by @szokeasaurusrex |
| 31 | +- Stop using `Hub` in `init` (#3275) by @szokeasaurusrex |
| 32 | +- Delete `_should_send_default_pii` (#3274) by @szokeasaurusrex |
| 33 | +- Remove `Hub` usage in `conftest` (#3273) by @szokeasaurusrex |
| 34 | +- Rename debug logging filter (#3260) by @szokeasaurusrex |
| 35 | +- Update `NoOpSpan.finish` signature (#3267) by @szokeasaurusrex |
| 36 | +- Remove `Hub` in `Transaction.finish` (#3267) by @szokeasaurusrex |
| 37 | +- Remove Hub from `capture_internal_exception` logic (#3264) by @szokeasaurusrex |
| 38 | +- Improve `Scope._capture_internal_exception` type hint (#3264) by @szokeasaurusrex |
| 39 | +- Correct `ExcInfo` type (#3266) by @szokeasaurusrex |
| 40 | +- Stop using `Hub` in `tracing_utils` (#3269) by @szokeasaurusrex |
24 | 41 |
|
25 | 42 | ## 2.9.0
|
26 | 43 |
|
|
0 commit comments