Update dependency sentry-sdk to v2.70.0 #8
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
StarkZarn/meshtastic-prometheus-exporter!8
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/sentry-sdk-2.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
==2.34.1→==2.70.0Release Notes
getsentry/sentry-python (sentry-sdk)
v2.70.0Compare Source
New Features ✨
New integration: Mistral AI (#4733) by @alexander-alderman-webb
Add the Mistral integration to your
sentry_sdk.initcall: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 whatdata should be collected. If
data_collectionis defined, it takes precedence oversend_default_pii.See https://docs.sentry.io/platforms/python/configuration/options/#data_collection
for the available configuration options.
Mistral
gen_ai.output.messagesby @alexander-alderman-webb in #7549gen_ai.input.messagesby @alexander-alderman-webb in #7548gen_ai.system_instructionsby @alexander-alderman-webb in #7547Chat.completeandChat.complete_asyncpatches by @alexander-alderman-webb in #7528Internal Changes 🔧
data_collectionfrom_experimentso top-level by @ericapisani in #7560getsentry/testing-ai-sdk-integrationsby @alexander-alderman-webb in #7526v2.69.2Compare Source
Bug Fixes 🐛
db.resultin breadcrumb with sensitive data opt-in by @alexander-alderman-webb in #7432Nonecandidates by @alexander-alderman-webb in #7519functions_to_tracework when streaming spans by @sentrivana in #7430disabled_integrationstype by @sentrivana in #7506Documentation 📚
Internal Changes 🔧
Huggingface Hub
ApproxDictby @alexander-alderman-webb in #7434Pydantic Ai
_set_model_data()tests by @alexander-alderman-webb in #7453_set_agent_data()tests by @alexander-alderman-webb in #7450Other
maxWireVersionby @alexander-alderman-webb in #7473Other
v2.69.1Compare Source
New Features ✨
http.routeattribute by @alexander-alderman-webb in #7428Bug Fixes 🐛
Internal Changes 🔧
Mcp
Other
stream_gen_ai_spansand the streaming trace lifecycle by @alexander-alderman-webb in #7405v2.69.0Compare Source
New Features ✨
Other
http.routeattribute by @alexander-alderman-webb in #7341http.routeattribute by @alexander-alderman-webb in #7343http.routeattribute by @alexander-alderman-webb in #7340http.routeattribute by @alexander-alderman-webb in #7322http.routeattribute by @alexander-alderman-webb in #7344http.routeattribute by @alexander-alderman-webb in #7347http.routeattribute by @alexander-alderman-webb in #7348http.routeattribute by @alexander-alderman-webb in #7338Bug Fixes 🐛
Mcp
Nonearguments in tool and prompt handlers by @alexander-alderman-webb in #7387Openai
input_textparts for the Responses API by @alexander-alderman-webb in #7333Response.outputis alistbefore iterating by @alexander-alderman-webb in #7238Starlette
urltransaction source for host routing by @mjq in #7266Other
isinstanceto determine tool type by @alexander-alderman-webb in #7412Internal Changes 🔧
Openai Agents
openaiversion when incompatible by @alexander-alderman-webb in #7236Pydantic Ai
hooks.on.model_requestby @alexander-alderman-webb in #7327Other
StreamedSpanin type annotations by @alexander-alderman-webb in #7373_extract_handler_data_from_args()by @alexander-alderman-webb in #7386openai-agentsto uv typing group by @alexander-alderman-webb in #7415aiohttpto uv typing group by @alexander-alderman-webb in #7395httpxtest suite fromhttpx2by @ZaafirRizwan in #7398test_langchain_embeddings_error_handling()by @alexander-alderman-webb in #7389tiktokento uv typing group by @alexander-alderman-webb in #7394openaito uv typing group by @alexander-alderman-webb in #7334anthropicto uv typing group by @alexander-alderman-webb in #7324google-genaito uv typing group by @alexander-alderman-webb in #7323getsentry/codecov-actionby @alexander-alderman-webb in #7241httpxdependency to tests relying onget_model_response()by @alexander-alderman-webb in #7235.getby @ericapisani in #7239v2.68.1Compare Source
enable_logs(logs) Don't stop sending auto-collected logs when
enable_logs=Trueby @sentrivana in #7237If you have
enable_logsset toTrue, our logging integrations for the standard library logging module as well as Loguru will auto-collect logs and send them to Sentry as Sentry logs by default, preserving old behavior. Turning automatic collection off for a specific integration can still be achieved using thecapture_sentry_logsintegration option.Please note that the
enable_logsoption is deprecated and will be removed in the next major release. Thesentry_sdk.logger.XAPI now works regardless of it, and auto-collection can be opted into via thecapture_sentry_logsintegration-level options, which areFalseby default, unless you haveenable_logs=True. We've added this compatibility layer to make the transition to aenable_logs-free world easier.Bug Fixes 🐛
failed_request_status_codesby @mgaligniana in #7140gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7207gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7210gen_ai.tool.definitionsattribute when data collection is enabled by @ericapisani in #7204gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7208gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7205gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7209v2.68.0Compare Source
Important
We're making
enable_logsandenable_metricsno-op with this release (#7177), and they'll be dropped in the next major.Previously,
enable_logsalso controlled automatic logs collection from the logging and Loguru integrations. These integrations now get an integration-levelcapture_sentry_logsboolean option to allow for more control over the auto-collection. These options areFalseby default, i.e., nothing is auto-collected without your explicit opt-in.Action Needed
If you had
enable_logsset toTrue:sentry_sdk.logger.XAPI, no action necessary, the API will just work.LoggingIntegrationorLoguruIntegration, the auto-collection will be turned off in this release. You can switch auto-collection on explicitly with:If you had
enable_logsset toFalse:sentry_sdk.logger.XAPI, you'll need to remove the calls entirely or define abefore_send_logcallback to filter out unwanted logs.If you has
enable_metricsset toFalse:before_send_metricor remove the calls to the API.Why We're Doing This
We recognize this is a disruptive change for some folks and want to make it clear this is a one-off. We're removing the options because they were an unnecessary hurdle that one had to jump through to be able to use logs and metrics, and it was confusing why the logging API would not just work on its own. On the other hand, we wanted to give you more fine-grained control over automatic collection.
New Features ✨
Other
NoOpStreamedSpanby @alexander-alderman-webb in #7163NoOpStreamedSpaninset_transaction_name()by @alexander-alderman-webb in #7164NoOpStreamedSpanby @alexander-alderman-webb in #7162Bug Fixes 🐛
Internal Changes 🔧
HTTPX, HTTPX2
Other
v2.67.1Compare Source
Bug Fixes 🐛
v2.67.0Compare Source
New Features ✨
Batcher
Integrations
Langchain
Openai
gen_ai.tool.definitionsfor the Responses API by @alexander-alderman-webb in #6951gen_ai.tool.definitionsfor the Chat Completions API by @alexander-alderman-webb in #6950gen_ai.request.reasoning.levelto OpenAI spans by @pabloDeputter in #6892Streaming
before_send_spanto top-level option by @sentrivana in #6885set_conversation_idAPI work by @sentrivana in #6866Other
set_attributesAPI by @sentrivana in #6897gen_ai.tool.definitionsattribute by @alexander-alderman-webb in #6956gen_ai.output.messagesincludingThinkingPartby @alexander-alderman-webb in #7037Bug Fixes 🐛
Openai Agents
run_single_turn_streamedreference by @alexander-alderman-webb in #7032Tests
capture_itemswith args by @sentrivana in #6867Other
sentry-traceshould take precedence over baggage by @sentrivana in #6863url.fullspan attribute by @sentrivana in #6861Documentation 📚
Internal Changes 🔧
Fastmcp
fastmcp>=4by @alexander-alderman-webb in #6923RootModelinstances by @alexander-alderman-webb in #6909try...exceptwithskipifby @alexander-alderman-webb in #6922Mcp
mcp.tool.result.is_errorby @alexander-alderman-webb in #6915mcp_typespackage by @alexander-alderman-webb in #6763_set_span_output_data()by @alexander-alderman-webb in #6762_get_span_config()by @alexander-alderman-webb in #6761_prepare_handler_data()by @alexander-alderman-webb in #6758Openai Agents
gen_ai.response.modelon Invoke Agent spans by @alexander-alderman-webb in #7028gen_ai.response.tool_callsby @alexander-alderman-webb in #6973gen_ai.request.available_toolson Invoke Agent spans by @alexander-alderman-webb in #6955gen_ai.request.available_toolson Execute Tool spans by @alexander-alderman-webb in #6954Other
iscoroutinefunctionshim inpatch_views()by @alexander-alderman-webb in #7024asyncio.iscoroutinefunctionby @alexander-alderman-webb in #7023on_agent_finish()hook by @alexander-alderman-webb in #7059FunctionModelfor testing output data transformations by @alexander-alderman-webb in #7036MAX_DATABAG_BREADTHby @Malkiz223 in #6783litellm<=1.96for generating test suites by @alexander-alderman-webb in #7147test-lambda-locallyby @alexander-alderman-webb in #7069pydantic-ai-slimto uv typing group by @alexander-alderman-webb in #7025langchain-baseto uv typing group by @alexander-alderman-webb in #7016ai_track()by @alexander-alderman-webb in #7005functions_to_tracetests by @alexander-alderman-webb in #6933mcp<2forfastmcp<0.3by @alexander-alderman-webb in #6925huey>=3.3.0by @alexander-alderman-webb in #6913httpxdependency tomcpandfastmcptests by @alexander-alderman-webb in #6905v2.66.1Compare Source
Bug Fixes 🐛
Tracing
Internal Changes 🔧
v2.66.0Compare Source
New Features ✨
Bug Fixes 🐛
Tracing
Internal Changes 🔧
nullcontexttosentry_sdk.utilsby @sentrivana in #6805v2.65.0Compare Source
New Features ✨
Huey
messaging.destination.nameon consumer spans by @alexander-alderman-webb in #6779messaging.destination.nameon producer spans by @alexander-alderman-webb in #6778Other
messaging.destination.nameon consumer spans by @alexander-alderman-webb in #6767messaging.destination.nameon consumer spans by @alexander-alderman-webb in #6776messaging.destination.nameon consumer spans by @alexander-alderman-webb in #6774Bug Fixes 🐛
Tracing
Other
ValueErrorin async middlewareprocess_*hooks by @r0ro in #6698Internal Changes 🔧
cache_write_tokensfield by @alexander-alderman-webb in #6804pydanticto the typing group by @alexander-alderman-webb in #6730python_multipartto the typing group by @alexander-alderman-webb in #6729changelog-previewby @alexander-alderman-webb in #6723requirements-testing.txtwith auvdependency group by @alexander-alderman-webb in #6693v2.64.0Compare Source
The SDK now extracts all
gen_aispans out of a transaction and sends them as v2 envelope items by default. This preventsgen_aispans from being dropped when the transaction payload exceeds size limits. Because they are no longer constrained by transaction size limits, AI message data is also no longer truncated. To keep the previous behavior, setstream_gen_ai_spans=False.Self-hosted Sentry users should opt out with
stream_gen_ai_spans=False, since streamedgen_aispans may not be ingested by their Sentry instance.Bug Fixes 🐛
GraphBubbleUpexceptions by @alexander-alderman-webb in #6608scope["root_path"]in URLs by @alexander-alderman-webb in #6579contextvarsby @alexander-alderman-webb in #6625Documentation 📚
Internal Changes 🔧
stream_gen_ai_spansopt out by @alexander-alderman-webb in #6658setuptoolsfromrequirements-testing.txtby @alexander-alderman-webb in #6618executingfromrequirements-testing.txtby @alexander-alderman-webb in #6619asttokensfromrequirements-testing.txtby @alexander-alderman-webb in #6615responsesfromrequirements-testing.txtby @alexander-alderman-webb in #6621pytest-forkedfromrequirements-testing.txtby @alexander-alderman-webb in #6611dockerfromrequirements-testing.txtby @alexander-alderman-webb in #6616--skip-version-updateoption topopulate_tox.pyby @alexander-alderman-webb in #6675httpcorefromrequirements-testing.txtby @alexander-alderman-webb in #6622pytest-timeoutfromrequirements-testing.txtby @alexander-alderman-webb in #6613pytest-localserverfromrequirements-testing.txtby @alexander-alderman-webb in #6612jsonschemafromrequirements-testing.txtby @alexander-alderman-webb in #6620socksiofromrequirements-testing.txtby @alexander-alderman-webb in #6617pysocksfromrequirements-testing.txtby @alexander-alderman-webb in #6623brotlifromrequirements-testing.txtby @alexander-alderman-webb in #6614tomlifromrequirements-testing.txtby @alexander-alderman-webb in #6630pytest-watchfromrequirements-testing.txtby @alexander-alderman-webb in #6624pipfromrequirements-testing.txtby @alexander-alderman-webb in #6629Other
v2.63.0Compare Source
Bug Fixes 🐛
Fastapi
Other
user.ip_addresson telemetry if present by @sentrivana in #6555Internal Changes 🔧
v2.62.0Compare Source
New Features ✨
Add integration for
aiomysqlby @tonal in #4703We're adding support for the
aiomysqlpackage. To enable the integration, add it to yourintegrationslist:Support HTTPX2 by @sentrivana in #6463
We're adding out-of-the-box support for HTTPX2. As long as use the package, the Sentry integration
will be enabled automatically and you should see your requests instrumented in Sentry.
Bug Fixes 🐛
ModelRequestContext.modelexists by @alexander-alderman-webb in #6480functools.wraps()for patched functions by @alexander-alderman-webb in #6532Internal Changes 🔧
fakeredis<2.36.0in tests by @alexander-alderman-webb in #6444package-ecosystem: uvin dependabot by @sentrivana in #6522aiomysqlversion and update text matrix by @alexander-alderman-webb in #6496update-toxtimeout to 20 minutes by @alexander-alderman-webb in #6488grpcio-toolssource builds when generating test matrices by @alexander-alderman-webb in #6487update-toxjob by @alexander-alderman-webb in #6453setuptoolsin relevant tests by @alexander-alderman-webb in #6467v2.61.1Compare Source
Internal Changes 🔧
Rq
fakeredis<2.36.0in tests by @alexander-alderman-webb in #6454redisandfakeredisfor tests by @alexander-alderman-webb in #6443Other
v2.61.0Compare Source
New Features ✨
Add
server.addressto transformed spans whenstream_gen_ai_spans=Trueby @alexander-alderman-webb in #6307Allow integrations to define control flow exceptions by @sentrivana in #6425
Disable string truncation for events by default by @alexander-alderman-webb in #6290
Following a previous significant increase of the string truncation limit, we've now completely removed the limit by default.
In case you have large strings in your events, you should now be able to see them.
In rare cases, if you have really long strings (or a lot of them), you might see envelopes being dropped because of their size.
If that happens, you can set the
max_value_lengthinitoption to the previous value of100_000:Bug Fixes 🐛
Langchain
TypeErroronlangchain.agentsimport by @alexander-alderman-webb in #6268Openai Agents
starting_agentkeyword argument in runner patches by @ericapisani in #6428name, notdescriptioninstart_spanby @sentrivana in #6323Pydantic AI
Agent.run_stream_events()patch by @alexander-alderman-webb in #6281Strawberry
AttributeErrorongraphql_spaninresolveby @sentrivana in #6289Other
(anthropic) Do not set
gen_ai.response.modeltoNoneby @alexander-alderman-webb in #6312(asyncpg) Use Sentry span attribute name conventions by @ericapisani in #6306
(boto3) Guard setting method by @sentrivana in #6288
(cohere) Stop setting transaction status when child span fails by @alexander-alderman-webb in #6300
(google-genai) Guard against
Noneresponse ID and response model by @alexander-alderman-webb in #6314(huey) Fix group and chord handling in enqueue by @ericapisani in #6392
(integrations) Auto-wrap root gen_ai spans for openai, cohere, langgraph, huggingface_hub by @constantinius in #6285
(serializer) Don't call
__iter__on arbitrary sequences by @sentrivana in #6304Previously, we'd attempt to serialize any
Sequenceby walking through it by calling its__iter__function.We've now changed the serializer to only serialize built-in sequences (like lists, tuples, and sets) to avoid
triggering side-effects from custom
__iter__implementations.This might mean some objects might be serialized differently. If you want to continue serializing a specific
custom sequence class the old way, you can register it via
sentry_sdk.serializer.add_repr_sequence_type(seehere).
Memory leak in SentrySpanProcessor by @volodkindv in #6271
Documentation 📚
beat.pydocstring by @quyentonndbs in #6266Internal Changes 🔧
Langchain
node.callspec.idmatching by @alexander-alderman-webb in #6426WatchedSpanclass by @alexander-alderman-webb in #6407Openai Agents
node.callspec.idmatching by @alexander-alderman-webb in #6424Pydantic Ai
Agent.run_stream_events()returning a context manager by @alexander-alderman-webb in #6322Other
node.callspec.idmatching by @alexander-alderman-webb in #6427fake_record_sql_queriesby @alexander-alderman-webb in #6295v2.60.0Compare Source
Adds a new
stream_gen_ai_spansoption that controls howgen_aispans aresent to Sentry. When set, the SDK extracts all
gen_aispans out of atransaction and sends them as v2 envelope items.
Enable this option if
gen_aispans are being dropped because the transaction payload exceeds size limits.New Features ✨
responsescalls by @constantinius in #6199stream_gen_ai_spansis enabled by @alexander-alderman-webb in #6260Bug Fixes 🐛
Openai
choices=Noneby @cla7aye15I4nd in #6216Other
@sentry_sdk.traces.traceoverloads to fix typing by @sentrivana in #6236http.serverspans are segments by @sentrivana in #6230Internal Changes 🔧
Django
Openai
Other
capture_items()by @alexander-alderman-webb in #6214envelopes_to_xhelpers withcapture_itemsby @sentrivana in #6233set_custom_sampling_context()a classmethod by @alexander-alderman-webb in #6238_timestampto_end_timestampby @sentrivana in #6235botocore-stubsby @alexander-alderman-webb in #6203v2.59.0Compare Source
New Features ✨
Langchain
run_nameasgen_ai.function_idon Invoke Agent Spans by @alexander-alderman-webb in #5926run_nameinon_tool_startby @alexander-alderman-webb in #5925run_nameinon_chat_model_startby @alexander-alderman-webb in #5924Other
db.driver.namespans to database integrations by @ericapisani in #6082Bug Fixes 🐛
We've put additional data that might contain sensitive information, like GraphQL documents, behind the
send_default_piioption.Httpx
code.namespaceandcode.functioninstead ofcode.function.namein span streaming by @alexander-alderman-webb in #6150Langchain
run_nameasgen_ai.function_idfor text completions by @alexander-alderman-webb in #6073gen_ai.agent.namefor chat and tool spans by @alexander-alderman-webb in #5877Other
inspect.iscoroutinefunctionon Python 3.14+ by @alexander-alderman-webb in #6135span_idif no active span by @sentrivana in #6162Monitor._thread_lockafter fork (#6148) by @vokracko in #6159bindingsfor openai-agents >= 0.14 by @ericapisani in #6102inspect.iscoroutinefunctionwhen Quart does by @alexander-alderman-webb in #6133inspect.iscoroutinefunctionwhen Starlette does by @alexander-alderman-webb in #6134_get_current_streamed_span()to keep types backwards compatible by @alexander-alderman-webb in #6177Internal Changes 🔧
Stdlib
add_http_request_source()patch by @alexander-alderman-webb in #6160HTTPSConnection.sendin trace header tests by @alexander-alderman-webb in #6156Other
NoOpMgrfrom utils by @sentrivana in #6078Model.requestpatch by @alexander-alderman-webb in #5956enable_tracingwithtraces_sample_rateby @sentrivana in #6077update-toxaction to master branch by @alexander-alderman-webb in #6172v2.58.0Compare Source
New Features ✨
Bug Fixes 🐛
Anthropic
stream()calls by @alexander-alderman-webb in #5950Pydantic Ai
Other
Internal Changes 🔧
Litellm
httpxtypes in rate-limit test by @alexander-alderman-webb in #5975httpxtypes in embedding tests by @alexander-alderman-webb in #5970httpxtypes in nonstreamingcompletion()tests by @alexander-alderman-webb in #5937Other
gen_ai.tool.typespan attribute by @ericapisani in #5964Other
Nonespan context in the span processor and pin tokenizers version for anthropic tests on Python 3.8 by @alexander-alderman-webb in #5967v2.57.0Compare Source
New Features ✨
Langchain
gen_ai.operation.nameandgen_ai.pipeline.nameon LLM spans by @ericapisani in #5849gen_ai.generate_textby @ericapisani in #5796Other
Add experimental async transport by @BYK in #5646
See https://github.com/getsentry/sentry-python/discussions/5919 for details.
Bug Fixes 🐛
Openai
_iteratorfor streamed responses by @alexander-alderman-webb in #5917gen_ai.response.streamingfor Responses by @alexander-alderman-webb in #5697max_output_tokensfor Responses API by @alexander-alderman-webb in #5693gen_ai.response.streamingfor Completions by @alexander-alderman-webb in #5692Other
Internal Changes 🔧
Ai
Langchain
httpxtypes by @alexander-alderman-webb in #5724Openai
Other
v2.56.0Compare Source
New Features ✨
Bug Fixes 🐛
Anthropic
AsyncStream.close()andAsyncMessageStream.close()to finish spans by @alexander-alderman-webb in #5675Stream.close()andMessageStream.close()to finish spans by @alexander-alderman-webb in #5674Other
Documentation 📚
Internal Changes 🔧
-latestalias for each integration test suite by @sentrivana in #5706Other
v2.55.0Compare Source
New Features ✨
Anthropic
gen_ai.chatspans for asynchronousmessages.stream()by @alexander-alderman-webb in #5572messages.stream()by @alexander-alderman-webb in #5565gen_ai.systemattribute to spans by @ericapisani in #5661Pydantic Ai
Other
Bug Fixes 🐛
GeneratorExitby @alexander-alderman-webb in #5643Documentation 📚
set_attributeexample to changelog by @sentrivana in #5578Internal Changes 🔧
Anthropic
stream()by @alexander-alderman-webb in #5665Openai Agents
with_streaming_response()by @alexander-alderman-webb in #5583httpxfor streamed responses by @alexander-alderman-webb in #5580httpxin non-MCP tool tests by @alexander-alderman-webb in #5602httpxin MCP tool tests by @alexander-alderman-webb in #5605httpxin handoff tests by @alexander-alderman-webb in #5604httpxin API error test by @alexander-alderman-webb in #5601httpxin non-error single-response tests by @alexander-alderman-webb in #5600namespacetool field for newopenaiversions by @alexander-alderman-webb in #5599Other
httpxto linting requirements by @alexander-alderman-webb in #5644populate_tox.pyby @alexander-alderman-webb in #5574potel-baseby @sentrivana in #5614v2.54.0Compare Source
New Features ✨
Add
set_attribute,remove_attributeto global API by @sentrivana in #5555You can now set and unset attributes on logs and metrics via top-level API. Think of it as
sentry_sdk.set_tag()for attribute-based telemetry. Other event types (transactions, spans, errors) will be unaffected.Bug Fixes 🐛
Openai
Other
ToolManager._call_toolby @sentrivana in #5522Documentation 📚
Internal Changes 🔧
Agents
Openai
Openai Agents
set_data_normalizedfor primitive attributes by @alexander-alderman-webb in #5509Other
set_data_normalizedfor primitive attributes by @alexander-alderman-webb in #5504set_data_normalizedfor thegen_ai.response.modelattribute by @alexander-alderman-webb in #5512v2.53.0Compare Source
Bug Fixes 🐛
Openai Agents
execute_final_output()functions following library refactor by @alexander-alderman-webb in #5453execute_handoffs()functions following library refactor by @alexander-alderman-webb in #5452run_single_turn_streamed()functions following library refactor by @alexander-alderman-webb in #5451run_single_turn()functions following library refactor by @alexander-alderman-webb in #5450Other
Documentation 📚
openai-agentscontrol-flow by @alexander-alderman-webb in #5447Internal Changes 🔧
Openai Agents
Other
v2.52.0Compare Source
New Features ✨
Other
gen_ai.conversation.idif available by @constantinius in #5307Bug Fixes 🐛
Google Genai
Mcp
Other
HostedMCPToolwhen streaming by @alexander-alderman-webb in #5405Internal Changes 🔧
Fastmcp
Messageby @alexander-alderman-webb in #5411test_fastmcp_without_request_context()by @alexander-alderman-webb in #5412AsyncClientfor SSE by @alexander-alderman-webb in #5400TestClientfor Streamable HTTP by @alexander-alderman-webb in #5384Mcp
AsyncClientfor SSE by @alexander-alderman-webb in #5396TestClientfor Streamable HTTP by @alexander-alderman-webb in #5383Other
Other
v2.51.0Compare Source
New Features ✨
Openai
gen_ai.response.time_to_first_tokenby @constantinius in #5348Openai Agents
gen_ai.chatspans by @alexander-alderman-webb in #5370Other
set_conversation_idand managing functions on the Scope and apply it on the Span on.finish()by @constantinius in #5362Bug Fixes 🐛
Internal Changes 🔧
set_data_normalized()withSpan.set_data()for system instructions by @alexander-alderman-webb in #5374v2.50.0Compare Source
New Features ✨
Ai
Other
feat(asyncio): Add on-demand way to enable AsyncioIntegration by @sentrivana in #5288
You can now enable the
AsyncioIntegrationon demand, after callingsentry_sdk.init(). This is useful in scenarios where you don't havethe event loop running early on, or when you need to instrument multiple event loops.
HostedMCPToolby @alexander-alderman-webb in #5297Bug Fixes 🐛
Integrations
gen_ai.request.messagesextraction from parameters by @constantinius in #5275gen_ai.request.messagesstructure by @constantinius in #5251Litellm
gen_ai.request.messagesto be as expected by @constantinius in #5255Other
Documentation 📚
Internal Changes 🔧
Fastmcp
AttributeErrortry-except by @alexander-alderman-webb in #5339Release
Other
v2.49.0Compare Source
New Features ✨
Scope.set_attributeby @sentrivana in #5256Bug Fixes 🐛
Documentation 📚
middleware_spansdocstring by @sentrivana in #5279Internal Changes 🔧
v2.48.0Compare Source
Middleware spans are now disabled by default in Django, Starlette and FastAPI integrations. Set the
middleware_spansintegration-leveloption to capture individual spans per middleware layer. To record Django middleware spans, for example, configure as follows
New Features ✨
feat(ai): add single message truncation by @shellmayr in #5079
feat(django): Add span around
Task.enqueueby @sentrivana in #5209feat(starlette): Set transaction name when middleware spans are disabled by @alexander-alderman-webb in #5223
feat: Add "K_REVISION" to environment variable release check (exposed by cloud run) by @rpradal in #5222
Langgraph
OTLP
Bug Fixes 🐛
Integrations
fix(django): Set active thread ID when middleware spans are disabled by @alexander-alderman-webb in #5220
fix(integrations): openai-agents fixing the input messages structure which was wrapped too much in some cases by @constantinius in #5203
fix(integrations): openai-agents fix multi-patching of
get_modelfunction by @constantinius in #5195fix(integrations): add values for pydantic-ai and openai-agents to
_INTEGRATION_DEACTIVATESto prohibit double span creation by @constantinius in #5196fix(logs): Set
span_idinstead ofsentry.trace.parent_span_idattribute by @sentrivana in #5241fix(logs, metrics): Gate metrics, logs user attributes behind
send_default_piiby @sentrivana in #5240fix(pydantic-ai): Stop capturing internal exceptions by @alexander-alderman-webb in #5237
fix(ray): Actor class decorator with arguments by @alexander-alderman-webb in #5230
fix: Don't log internal exception for tornado user auth by @sl0thentr0py in #5208
fix: Fix changelog config by @sentrivana in #5192
Internal Changes 🔧
chore(django): Disable middleware spans by default by @alexander-alderman-webb in #5219
chore(starlette): Disable middleware spans by default by @alexander-alderman-webb in #5224
ci: Unpin Python version for LiteLLM tests by @alexander-alderman-webb in #5238
ci: 🤖 Update test matrix with new releases (12/15) by @github-actions in #5229
chore: Ignore type annotation migration in blame by @alexander-alderman-webb in #5234
ref: Clean up get_active_propagation_context by @sl0thentr0py in #5217
ref: Cleanup outgoing propagation_context logic by @sl0thentr0py in #5215
ci: Pin Python version to at least 3.10 for LiteLLM by @alexander-alderman-webb in #5202
test: Remove skipped test by @sentrivana in #5197
Convert all remaining type annotations into the modern format by @zsol in #5239
Convert sentry_sdk type annotations into the modern format by @zsol in #5206
v2.47.0Compare Source
Bug Fixes 🐛
GEN_AI_OPERATION_NAMEby @constantinius in #5185gen_ai.request.messagesby @constantinius in #5167gen_ai.request.messagesattribute by @constantinius in #5161invoke_agentspan onagents.RunContextWrapperby @alexander-alderman-webb in #5165New Features ✨
Deprecations
continue_from_headersby @sl0thentr0py in #5160Build / dependencies / internal 🔧
commit_patternsto changelog config, remove auto-labeler by @sentrivana in #5176v2.46.0Compare Source
Various fixes & improvements
ModuleNotFoundErrorin Pydantic AI integration (#5135) by @alexander-alderman-webbMagicMockfrom mockedModelResponse(#5126) by @alexander-alderman-webbv2.45.0Compare Source
Various fixes & improvements
OTLPIntegration (#4877) by @sl0thentr0py
Enable the new OTLP integration with the code snippet below, and your OpenTelemetry instrumentation will be automatically sent to Sentry's OTLP ingestion endpoint.
Under the hood, this will setup:
SpanExporterthat will automatically set up the OTLP ingestion endpoint from your DSNPropagatorthat ensures Distributed Tracing worksIf you were using the
SentrySpanProcessorbefore, we recommend migrating over toOTLPIntegrationsince it's a much simpler setup.feat(integrations): implement context management for invoke_agent spans (#5089) by @constantinius
feat(loguru): Capture extra (#5096) by @sentrivana
feat: Attach
server.addressto metrics (#5113) by @alexander-alderman-webbfix: Cast message and detail attributes before appending exception notes (#5114) by @alexander-alderman-webb
fix(integrations): ensure that GEN_AI_AGENT_NAME is properly set for GEN_AI spans under an invoke_agent span (#5030) by @constantinius
fix(logs): Update
sentry.origin(#5112) by @sentrivanachore: Deprecate description truncation option for Redis spans (#5073) by @alexander-alderman-webb
chore: Deprecate
max_spansLangChain parameter (#5074) by @alexander-alderman-webbchore(toxgen): Check availability of pip and add detail to exceptions (#5076) by @alexander-alderman-webb
chore: add MCP SDK Pydantic AI and OpenAI Agents to the list of auto enabled integrations (#5111) by @constantinius
test: add tests for either FastMCP implementation (#5075) by @constantinius
fix(ci): Re-enable skipped tests (#5104) by @sentrivana
ci: 🤖 Update test matrix with new releases (11/17) (#5110) by @github-actions
ci: Force coverage core ctrace for 3.14 (#5108) by @sl0thentr0py
v2.44.0Compare Source
Various fixes & improvements
ToolManager._call_tool()parameters (#5084) by @alexander-alderman-webbNoneversion (#5083) by @alexander-alderman-webbcoverageversion for 3.14 Django tests (#5088) by @alexander-alderman-webbbefore_send_metricoption (#5064) by @alexander-alderman-webbenable_metricsoption (#5056) by @alexander-alderman-webbenable_metricsoption (#5046) by @alexander-alderman-webbv2.43.0Compare Source
Various fixes & improvements
Pydantic AI integration (#4906) by @constantinius
Enable the new Pydantic AI integration with the code snippet below, and you can use the Sentry AI dashboards to observe your AI calls:
MCP Python SDK (#4964) by @constantinius
Enable the new Python MCP integration with the code snippet below:
fix(strawberry): Remove autodetection, always use sync extension (#4984) by @sentrivana
Previously,
StrawberryIntegrationwould try to guess whether it should install the sync or async version of itself. This auto-detection was very brittle and could lead to us auto-enabling async code in a sync context. With this change,StrawberryIntegrationremains an auto-enabling integration, but it'll enable the sync version by default. If you want to enable the async version, pass the option explicitly:fix(google-genai): Set agent name (#5038) by @constantinius
fix(integrations): hooking into error tracing function to find out if an execute tool span should be set to error (#4986) by @constantinius
fix(django): Improve logic for classifying cache hits and misses (#5029) by @alexander-alderman-webb
chore(metrics): Rename _metrics to metrics (#5035) by @alexander-alderman-webb
fix(tracemetrics): Bump metric buffer size to 1k (#5031) by @k-fish
fix startlette deprecation warning (#5034) by @DeoLeung
build(deps): bump actions/upload-artifact from 4 to 5 (#5032) by @dependabot
fix(ai): truncate messages for google genai (#4992) by @shellmayr
fix(ai): add message truncation to litellm (#4973) by @shellmayr
feat(langchain): Support v1 (#4874) by @sentrivana
ci: Run
commontest suite on Python 3.14t (#4969) by @alexander-alderman-webbfeat: Officially support 3.14 & run integration tests on 3.14 (#4974) by @sentrivana
Make logger template format safer to missing kwargs (#4981) by @sl0thentr0py
tests(huggingface): Support 1.0.0rc7 (#4979) by @alexander-alderman-webb
feat: Enable HTTP request code origin by default (#4967) by @alexander-alderman-webb
ci: Run
commontest suite on Python 3.14 (#4896) by @sentrivanav2.42.1Compare Source
Various fixes & improvements
_get_db_span_description(#4924) by @misrasaurabh1v2.42.0Compare Source
Various fixes & improvements
feat: Add source information for slow outgoing HTTP requests (#4902) by @alexander-alderman-webb
tests: Update tox (#4913) by @sentrivana
fix(Ray): Retain the original function name when patching Ray tasks (#4858) by @svartalf
feat(ai): Add
python-genaiintegration (#4891) by @vgrozdanicEnable the new Google GenAI integration with the code snippet below, and you can use the Sentry AI dashboards to observe your AI calls:
v2.41.0Compare Source
Various fixes & improvements
feat: Add
concurrent.futurespatch to threading integration (#4770) by @alexander-alderman-webbThe SDK now makes sure to automatically preserve span relationships when using
ThreadPoolExecutor.chore: Remove old metrics code (#4899) by @sentrivana
Removed all code related to the deprecated experimental metrics feature (
sentry_sdk.metrics).ref: Remove "experimental" from log function name (#4901) by @sentrivana
fix(ai): Add mapping for gen_ai message roles (#4884) by @shellmayr
feat(metrics): Add trace metrics behind an experiments flag (#4898) by @k-fish
v2.40.0Compare Source
Various fixes & improvements
Add LiteLLM integration (#4864) by @constantinius
Once you've enabled the new LiteLLM integration, you can use the Sentry AI Agents Monitoring, a Sentry dashboard that helps you understand what's going on with your AI requests:
Litestar: Copy request info to prevent cookies mutation (#4883) by @alexander-alderman-webb
Add tracing to
DramatiqIntegration(#4571) by @IgrehAlso emit spans for MCP tool calls done by the LLM (#4875) by @constantinius
Option to not trace HTTP requests based on status codes (#4869) by @alexander-alderman-webb
You can now disable transactions for incoming requests with specific HTTP status codes. The new
trace_ignore_status_codesoption accepts asetof status codes as integers. If a transaction wraps a request that results in one of the provided status codes, the transaction will be unsampled.Move
_set_agent_datacall toai_client_spanfunction (#4876) by @constantiniusAdd script to determine lowest supported versions (#4867) by @sentrivana
Update
CONTRIBUTING.md(#4870) by @sentrivanav2.39.0Compare Source
Various fixes & improvements
test_sparkspeed (#4822) by @mgalignianaNote: This is my last release. So long, and thanks for all the fish! by @antonpirker
v2.38.0Compare Source
Various fixes & improvements
invoke_agentspan. (#4785) by @antonpirkerlog_itemas rate limit category (#4798) by @sentrivanaDedupeIntegrationis dropping an error. (#4788) by @antonpirkerprofiler(#4535) by @zen-xuv2.37.1Compare Source
Various fixes & improvements
v2.37.0Compare Source
New Integration (BETA): Add support for
langgraph(#4727) by @shellmayrWe can now instrument AI agents that are created with LangGraph out of the box.
For more information see the LangGraph integrations documentation.
AI Agents: Improve rendering of input and output messages in AI agents integrations. (#4750) by @shellmayr
AI Agents: Format span attributes in AI integrations (#4762) by @antonpirker
CI: Fix celery (#4765) by @sentrivana
Tests: Move asyncpg under toxgen (#4757) by @sentrivana
Tests: Move beam under toxgen (#4759) by @sentrivana
Tests: Move boto3 tests under toxgen (#4761) by @sentrivana
Tests: Remove openai pin and update tox (#4748) by @sentrivana
v2.36.0Compare Source
Various fixes & improvements
New integration: Unraisable exceptions (#4733) by @alexander-alderman-webb
Add the unraisable exception integration to your sentry_sdk.init call:
_context_manager_state(#4698) by @sentrivana__exit__incapture_internal_exceptions(#4719) by @sentrivanaopenai_agentsin CI (#4742) by @sentrivanav2.35.2Compare Source
Various fixes & improvements
v2.35.1Compare Source
Various fixes & improvements
v2.35.0Compare Source
Various fixes & improvements
@tracedecorator (#4676) by @antonpirkerenable_logs,before_send_logas top-levelsentry_sdk.init()options (#4644) by @sentrivana@tracedecorator. Allows to setspan.op,span.name, andspan.attributes(#4648) by @antonpirkersentry_sdk.update_current_span. (#4673) by @antonpirkerSpan.update_data()to update multiplespan.dataitems at once. (#4666) by @antonpirkersend_dataparameters (#4667) by @szokeasaurusrexgen_ai.*andai.*attributes (#4665) by @antonpirkerConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
322681c68bb62e09a49bUpdate dependency sentry-sdk to v2.53.0to Update dependency sentry-sdk to v2.54.0b62e09a49b0fe49e1e96Update dependency sentry-sdk to v2.54.0to Update dependency sentry-sdk to v2.55.00fe49e1e9658f4a28853Update dependency sentry-sdk to v2.55.0to Update dependency sentry-sdk to v2.56.058f4a28853620b28d389Update dependency sentry-sdk to v2.56.0to Update dependency sentry-sdk to v2.57.0620b28d38915d794d11fUpdate dependency sentry-sdk to v2.57.0to Update dependency sentry-sdk to v2.58.015d794d11fdd8666fa2aUpdate dependency sentry-sdk to v2.58.0to Update dependency sentry-sdk to v2.59.0dd8666fa2af1571fac20Update dependency sentry-sdk to v2.59.0to Update dependency sentry-sdk to v2.60.0f1571fac2080148e0ad7Update dependency sentry-sdk to v2.60.0to Update dependency sentry-sdk to v2.61.080148e0ad7bab5c022d6Update dependency sentry-sdk to v2.61.0to Update dependency sentry-sdk to v2.61.1bab5c022d6d9de0d7454Update dependency sentry-sdk to v2.61.1to Update dependency sentry-sdk to v2.62.0Update dependency sentry-sdk to v2.62.0to Update dependency sentry-sdk to v2.63.0b69b2b6c7dtoaac6fcf664Update dependency sentry-sdk to v2.63.0to Update dependency sentry-sdk to v2.64.0aac6fcf66491b5b938e7Update dependency sentry-sdk to v2.64.0to Update dependency sentry-sdk to v2.65.091b5b938e740ebcbef5dUpdate dependency sentry-sdk to v2.65.0to Update dependency sentry-sdk to v2.66.040ebcbef5d3e9aed92b5Update dependency sentry-sdk to v2.66.0to Update dependency sentry-sdk to v2.66.13e9aed92b596f85b6950Update dependency sentry-sdk to v2.66.1to Update dependency sentry-sdk to v2.67.096f85b6950ef1716e4b5Update dependency sentry-sdk to v2.67.0to Update dependency sentry-sdk to v2.67.1ef1716e4b5c2e8531784Update dependency sentry-sdk to v2.67.1to Update dependency sentry-sdk to v2.68.0c2e8531784106b174831Update dependency sentry-sdk to v2.68.0to Update dependency sentry-sdk to v2.68.1106b17483181bbe31304Update dependency sentry-sdk to v2.68.1to Update dependency sentry-sdk to v2.69.181bbe313047392a85314Update dependency sentry-sdk to v2.69.1to Update dependency sentry-sdk to v2.69.27392a85314d611d7c5eaUpdate dependency sentry-sdk to v2.69.2to Update dependency sentry-sdk to v2.70.0View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.