Repository navigation
Releases
2.74.0
New Features β¨
Anthropic
- Record reasoning parts in streaming output by @alexander-alderman-webb in #8193
- Record reasoning parts in nonstreaming output by @alexander-alderman-webb in #8192
Other
- (typesafe) Handle inline images by @alexander-alderman-webb in #8164
Bug Fixes π
Anthropic
- Preserve cached
_iteratorproperty by @alexander-alderman-webb in #8163 - Stop unpacking output arrays by @alexander-alderman-webb in #8160
Other
- (aiohttp) Leave existing
baggageheader alone if it has existin⦠by @pabloDeputter in #8116 - (boto3) Adapt to botocore no longer signing baggage by @sentrivana in #8113
- (ci) Restrict pytest because of incompatibilities by @sentrivana in #8140
- (falcon) Handle integer HTTP statuses by @jap and @sentrivana in #8139
- (sampling) Respect incoming sample rate if not explicitly overridden by @sentrivana in #8185
- (tracing) Drop trailing comma when serializing baggage without third-party items by @alphasafal and @pabloDeputter in #8119
- (wsgi) Stop overwriting
server.addressby @alexander-alderman-webb in #8171
Internal Changes π§
Deps
- Lock file maintenance by @renovate in #8055
- Bump grpcio to 1.84.1 by @geoffg-sentry with @sentry-junior in #8136
- Bump uv to 0.13.5 by @geoffg-sentry with @sentry-junior in #8135
- Bump brotli to 1.2.1 by @geoffg-sentry with @sentry-junior in #8122
Other
- (mcp) Remove unused select_mcp_transactions fixture by @sentrivana with @sentry-junior in #8150
- (release) Bump craft to 3.9.0 and update config by @BYK with @sentry-junior in #8181
- (sessions) Remove unused TERMINAL_SESSION_STATES constant by @sentrivana with @sentry-junior in #8151
- (starlette) Remove unused _serialize_request_body_data helper by @sentry-junior in #8146
- (toxgen) Remove unused
get_file_hash()andget_last_updated()helpers by @sentry-junior in #8173 - (tracing) Remove unused base64_stripped regex by @sentry-junior in #8148
- (utils) Remove unused to_timestamp helper and epoch constant by @sentry-junior in #8147
- π€ Update test matrix with new releases (11/02) by @sentrivana with @github-actions in #8172
- Upgrade
sphinxand removepackagingupper bound by @alexander-alderman-webb in #8183 - Update test matrix with new releases (27/10) by @alexander-alderman-webb in #8126
3.0.0b3
This is a pre-release of the next Python SDK major, to be released in November 2026.
Want to give it a spin? Be our guest and let us know how it went!
β¨ Notable Changes
- Say goodbye to transactions: span streaming is now the default tracing model
- The fine-grained
data_collectionsupersedes the flatsend_default_pii
ποΈ Resources
3.0.0b2
This is a pre-release of the next Python SDK major, to be released in November 2026.
Want to give it a spin? Let us know how it went!
β¨ Notable Changes
- Say goodbye to transactions: span streaming is now the default tracing model
- The fine-grained
data_collectionsupersedes the flatsend_default_pii
ποΈ Resources
2.73.0
New Features β¨
- (arq) Add an option to monitor arq cron jobs by @wedamija in #8051
- (huey) Add an option to monitor Huey periodic tasks by @wedamija in #8052
- (rq) Add an option to monitor rq-scheduler jobs by @wedamija in #8053
- (types) Export Attributes from the public types module by @sansynx in #8019
Bug Fixes π
- (arq) Don't monitor cron jobs with unsupported schedules by @wedamija in #8098
- (attributes) Handle special float values correctly by @sentrivana in #8067
- (celery) Don't round down beat schedule intervals by @wedamija in #7842
- (cohere) Stop swallowing exceptions during stream iteration by @intertermux-code in #8017
- (huggingface_hub) Stop swallowing exceptions during stream iteration by @intertermux-code in #8018
- Exclude litellm==1.107.0 from extras by @jonny-norwine in #8104
Internal Changes π§
Deps
- Update github workflows by @renovate in #8045
- Update github workflows by @renovate in #8036
- Update github workflows by @renovate in #7276
Other
- (litellm) Require filelock>=4.0.3 on Python 3.10/3.11 by @sentry-junior in #8026
- (monitor) Stop background health checks in tests that drive the monitor by @sentry-junior in #8032
- Update
AGENTS.mdby @sentrivana in #8077 - π€ Update test matrix with new releases (10/12) by @github-actions in #7944
3.0.0b1
This is a pre-release of the next Python SDK major, to be released in November 2026.
Want to give it a spin? Be our guest and let us know how it went!
2.72.0
New Features β¨
Asgi
- Set
user_agent.originalfor inbound filters by @sentrivana in #7794 - Add
sentry.is_localhostfor inbound filters by @sentrivana in #7781
Boto3
- Add
ServiceExtensionclass by @pabloDeputter in #7536 - Add response, retry, and error span attributes by @pabloDeputter in #7499
- Add common OTel AWS client attributes by @pabloDeputter in #7481
Wsgi
- Add
user_agent.originalattr for inbound filters by @sentrivana in #7793 - Add
sentry.is_localhostfor inbound filters by @sentrivana in #7780
Other
- (aiohttp) Add
sentry.is_localhostfor inbound filters by @sentrivana in #7785 - (aiohttp,sanic,tornado) Add
user_agent.originalattr for inbound filters by @sentrivana in #7795 - (sanic) Add
sentry.is_localhostfor inbound filters by @sentrivana in #7783 - (tornado) Add
sentry.is_localhostfor inbound filters by @sentrivana in #7787 - (types) Export DataCollectionUserOptions from sentry_sdk.types by @sentrivana in #7957
- Better IPv6 localhost detection by @sentrivana in #7786
Bug Fixes π
Boto3
- Trace the complete botocore client-call lifecycle by @pabloDeputter in #7538
- Finish
StreamingBodyspan correctly by @pabloDeputter in #7540
Other
- (crons) Return
Nonefromcapture_checkinwhen nothing is sent by @HardMax71 in #7868 - (scrubber) Scrub request bodies that are JSON arrays by @Om-singhaI in #7561
- Fix span, metrics, log client reports by @sentrivana in #7933
Internal Changes π§
Deps
Openai Agents
- Bump version for type checking to 0.23.1 by @alexander-alderman-webb in #7935
- Use
model_dump()instead of deprecateddict()by @intertermux-code in #7862
Starlette
- Drop direct
anyiodependency by @alexander-alderman-webb in #7724 - Expect parametrized route in
starlette>=1.7by @alexander-alderman-webb in #7789
Other
- (boto3) Split integration into internal modules by @pabloDeputter in #7537
- (huggingface_hub) Use
httpx2-pytestforhuggingface_hub>=2by @alexander-alderman-webb in #7790 - (mypy) Bump version to 2.4.0 by @alexander-alderman-webb in #7937
- (openai) Stop directly calling
_calculate_*_token_usage()by @alexander-alderman-webb in #7875 - (strawberry-graphql) Bump version for type checking to 0.332.0 by @alexander-alderman-webb in #7936
- Deprecate
ai.monitoring.record_token_usage()by @alexander-alderman-webb in #7918 - Deprecate
send_default_piiby @sentrivana in #7694 - Move FastAPI active thread tracking into Starlette by @faizansaiyed123 in #7825
- Upgrade ubuntu 20.04/22.04 runners to 24.04 by @joshuarli in #7843
- π€ Update test matrix with new releases (10/05) by @github-actions in #7849
- π€ Update test matrix with new releases (09/28) by @github-actions in #7715
- Deprecate transaction profiling by @sentrivana in #7751
2.71.0
New Features β¨
-
New integration: TypeSafe (#4733) by @alexander-alderman-webb
Add the TypeSafe integration to your
sentry_sdk.initcall:
import sentry_sdk
from sentry_sdk.integrations.typesafe import TypeSafeIntegration
sentry_sdk.init(
dsn="...",
traces_sample_rate=1.0,
integrations=[
TypeSafeIntegration(),
]
)Typesafe
- Record
gen_ai.output.messagesby @alexander-alderman-webb in #7720 - Set token usage attributes by @alexander-alderman-webb in #7719
- Record
gen_ai.input.messagesby @alexander-alderman-webb in #7718 - Record
gen_ai.response.modelby @alexander-alderman-webb in #7717 - Add integration with
system_one()patches by @alexander-alderman-webb in #7716
Bug Fixes π
- Keep event if processor raises by @sentrivana in #7701
- Isolate user callbacks, emit client reports by @sentrivana in #7692
Documentation π
- Promote
data_collectionin changelog by @sentrivana in #7565
Internal Changes π§
- (aws-lambda) Add
.gitignoreto lambda handlers by @pabloDeputter in #7638 - (litellm) Set
LITELLM_LOCAL_MODEL_COST_MAP=trueby @alexander-alderman-webb in #7630 - (otlp) Adjust to
OTLPSpanExporter._headersremoval by @alexander-alderman-webb in #7722 - Use top-level flush API in tests by @sentrivana in #7725
- Unsample on sampler exception by @sentrivana in #7723
- Use
sentry_initfixture by @sentrivana in #7577
2.70.0
New Features β¨
-
New integration: Mistral AI (#4733) by @alexander-alderman-webb
Add the Mistral integration to your
sentry_sdk.initcall:
import sentry_sdk
from sentry_sdk.integrations.mistral import MistralIntegration
sentry_sdk.init(
dsn="...",
traces_sample_rate=1.0,
integrations=[
MistralIntegration(),
]
)-
New option: A fine-grained way to configure what data should be sent from the SDK.
Offers much more flexibility than
send_default_pii, allowing you to specify what
data should be collected. Ifdata_collectionis defined, it takes precedence over
send_default_pii.See https://docs.sentry.io/platforms/python/configuration/options/#data_collection
for the available configuration options.
import sentry_sdk
sentry_sdk.init(
data_collection={
"user_info": False,
"gen_ai": {"inputs": False, "outputs": False},
"graphql": {"document": False, "variables": False},
"database_query_data": False,
"queues": False,
"http_bodies": [],
"cookies": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
"http_headers": {
"request": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
},
"url_query_params": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
}
)Mistral
- Record
gen_ai.output.messagesby @alexander-alderman-webb in #7549 - Record
gen_ai.input.messagesby @alexander-alderman-webb in #7548 - Record
gen_ai.system_instructionsby @alexander-alderman-webb in #7547 - Record request parameters by @alexander-alderman-webb in #7531
- Record token usage by @alexander-alderman-webb in #7529
- Add integration with
Chat.completeandChat.complete_asyncpatches by @alexander-alderman-webb in #7528
Internal Changes π§
- (data-collection) Promote
data_collectionfrom_experimentso top-level by @ericapisani in #7560 - Close client on teardown by @alexander-alderman-webb in #7562
- π€ Update test matrix with new releases (09/21) by @github-actions in #7546
- Remove
getsentry/testing-ai-sdk-integrationsby @alexander-alderman-webb in #7526
2.69.2
Bug Fixes π
- (aws-lambda) Attach user info when streaming spans by @sentrivana in #7429
- (bottle) Avoid infinite serializing loop by @sentrivana in #7511
- (clickhouse_driver) Only set
db.resultin breadcrumb with sensitive data opt-in by @alexander-alderman-webb in #7432 - (google-genai) Tolerate
Nonecandidates by @alexander-alderman-webb in #7519 - (pydantic-ai) Stop capturing tool execution spans when validation fails by @alexander-alderman-webb in #7448
- (serializer) Add type annotations to databag limits by @8rulerstar in #7505
- (tracing) Make
functions_to_tracework when streaming spans by @sentrivana in #7430 - (typing) Fix
disabled_integrationstype by @sentrivana in #7506 - Don't attach stacktrace to check-ins by @sentrivana in #7497
Documentation π
- Update span streaming docstrings by @sentrivana in #7463
Internal Changes π§
Huggingface Hub
- Parametrize tests on the streaming trace lifecycle by @alexander-alderman-webb in #7436
- Only check relevant data with
ApproxDictby @alexander-alderman-webb in #7434
Pydantic Ai
- Remove vacuous
_set_model_data()tests by @alexander-alderman-webb in #7453 - Remove vacuous
_set_agent_data()tests by @alexander-alderman-webb in #7450
Other
- (deps) Lock file maintenance by @renovate in #7302
- (django) Fix flaky cache tests by using uuid for cache LOCATION by @sentry-junior in #7444
- (pymongo) Raise
maxWireVersionby @alexander-alderman-webb in #7473 - Remove unused base64 utils by @sentrivana in #7495
- π€ Update test matrix with new releases (09/14) by @github-actions in #7486
- π€ Update test matrix with new releases (09/07) by @github-actions in #7399
Other
- Skip formatting log records when Sentry logs are off by @gyanu2507 in #7422
2.69.1
New Features β¨
- (django) Add
http.routeattribute by @alexander-alderman-webb in #7428
Bug Fixes π
- (aiohttp) Preserve SigV4-signed propagation headers by @Robinbinu in #7427
Internal Changes π§
Mcp
- Parametrize tests on the streaming trace lifecycle by @alexander-alderman-webb in #7424
- Remove vacuous tests by @alexander-alderman-webb in #7420
Other
- (cohere) Parametrize tests on the streaming trace lifecycle by @alexander-alderman-webb in #7419
- (openai-agents) Parametrize tests on
stream_gen_ai_spansand the streaming trace lifecycle by @alexander-alderman-webb in #7405