2.67.0
New Features ✨
Batcher
- Add global flush trigger based on summed size estimates by @alexander-alderman-webb in #7144
- Add hard span limit by @alexander-alderman-webb in #7143
Integrations
- Add span for DRF authentication by @mgaligniana in #6984
Langchain
- Record reasoning token usage attribute by @alexander-alderman-webb in #7136
- Record cached token usage attributes by @alexander-alderman-webb in #7132
Openai
- Set
gen_ai.tool.definitionsfor the Responses API by @alexander-alderman-webb in #6951 - Set
gen_ai.tool.definitionsfor the Chat Completions API by @alexander-alderman-webb in #6950 - Add
gen_ai.request.reasoning.levelto OpenAI spans by @pabloDeputter in #6892
Streaming
- Support ai_track decorator by @sentrivana in #6895
- Promote
before_send_spanto top-level option by @sentrivana in #6885 - Make
set_conversation_idAPI work by @sentrivana in #6866
Other
- (api) Add top-level
set_attributesAPI by @sentrivana in #6897 - (aws-lambda) Enable Python 3.14 support to the Lambda layer by @pabloDeputter in #6916
- (openai-agents) Set the
gen_ai.tool.definitionsattribute by @alexander-alderman-webb in #6956 - (pydantic-ai) Record
gen_ai.output.messagesincludingThinkingPartby @alexander-alderman-webb in #7037 - Add possibility to allowlist integrations in toxgen by @sentrivana in #6996
Bug Fixes 🐛
Openai Agents
- Patch correct
run_single_turn_streamedreference by @alexander-alderman-webb in #7032 - Stop destructively wrapping tools by @alexander-alderman-webb in #6961
Tests
- Adapt to new exception propagation behavior in Quart by @sentrivana in #6995
- Remove redundant type filters after
capture_itemswith args by @sentrivana in #6867
Other
- (aws-lambda) Fix flake in aws lambda tests by @pabloDeputter in #6937
- (langchain) Stop double-counting usage in multi-candidate responses by @alexander-alderman-webb in #7064
- (mcp) Stop adding the prompt name to arguments by @alexander-alderman-webb in #6765
- (pydantic-ai) Stop recording duplicate spans by @alexander-alderman-webb in #7056
- (sampling)
sentry-traceshould take precedence over baggage by @sentrivana in #6863 - (streaming) Set segment source if unset by @sentrivana in #6791
- Do not let exceptions in before_breadcrumb bubble up by @sentrivana in #7133
- Correct typo in test function name by @TheGreatApollyon in #6967
- Include query string and fragment in
url.fullspan attribute by @sentrivana in #6861
Documentation 📚
- Remove AI commit attribution requirement from AGENTS.md by @ericapisani in #6828
Internal Changes 🔧
Fastmcp
- Skip SSE test for
fastmcp>=4by @alexander-alderman-webb in #6923 - Remove assertions on
RootModelinstances by @alexander-alderman-webb in #6909 - Replace broad
try...exceptwithskipifby @alexander-alderman-webb in #6922
Mcp
- Replace instance patches with middleware by @alexander-alderman-webb in #6764
- Remove redundant
mcp.tool.result.is_errorby @alexander-alderman-webb in #6915 - Use
mcp_typespackage by @alexander-alderman-webb in #6763 - Inline
_set_span_output_data()by @alexander-alderman-webb in #6762 - Inline
_get_span_config()by @alexander-alderman-webb in #6761 - Inline
_prepare_handler_data()by @alexander-alderman-webb in #6758 - Separate tool, prompt and resource patches by @alexander-alderman-webb in #6726
Openai Agents
- Stop setting
gen_ai.response.modelon Invoke Agent spans by @alexander-alderman-webb in #7028 - Use first class tool hooks when available by @alexander-alderman-webb in #6994
- Assert subset of expected dictionary is in
gen_ai.response.tool_callsby @alexander-alderman-webb in #6973 - Stop setting
gen_ai.request.available_toolson Invoke Agent spans by @alexander-alderman-webb in #6955 - Stop setting
gen_ai.request.available_toolson Execute Tool spans by @alexander-alderman-webb in #6954
Other
- (ai) Route AI integration tests through OpenRouter by @sentry-junior in #6979
- (arq) Avoid race between the exception and transaction events by @alexander-alderman-webb in #7052
- (aws_lambda) Add ARM64 architecture support for local Lambda testing by @ericapisani in #7053
- (deps) Lock file maintenance by @renovate in #6734
- (django) Use
iscoroutinefunctionshim inpatch_views()by @alexander-alderman-webb in #7024 - (httpx) Replace deprecated
asyncio.iscoroutinefunctionby @alexander-alderman-webb in #7023 - (huggingface-hub) Fix chat completion stream type by @alexander-alderman-webb in #7070
- (langchain) Remove
on_agent_finish()hook by @alexander-alderman-webb in #7059 - (pydantic-ai) Use
FunctionModelfor testing output data transformations by @alexander-alderman-webb in #7036 - (serializer) Avoid copying the whole Mapping before trimming to
MAX_DATABAG_BREADTHby @Malkiz223 in #6783 - (tests) Replace _transport_works_cases loop with explicit case list by @ericapisani in #6978
- 🤖 Update test matrix with new releases (08/10) by @github-actions in #7142
- Pin
litellm<=1.96for generating test suites by @alexander-alderman-webb in #7147 - Unpin Django version for generating test suites by @alexander-alderman-webb in #7146
- Move Redis breadcrumbs to integration by @sentrivana in #7129
- Move subprocess breadcrumbs to integration by @sentrivana in #7128
- Avoid scanning installed packages when MCP SDK is not installed by @mangodxd in #6865
- Remove
test-lambda-locallyby @alexander-alderman-webb in #7069 - Add
pydantic-ai-slimto uv typing group by @alexander-alderman-webb in #7025 - Add
langchain-baseto uv typing group by @alexander-alderman-webb in #7016 - 🤖 Update test matrix with new releases (08/03) by @github-actions in #6985
- Mock attributes in redis cluster tests by @sentrivana in #7022
- Deprecate
ai_track()by @alexander-alderman-webb in #7005 - Reduce common test suite while not reducing coverage by @ericapisani in #6972
- Use top-level options if available by @sentrivana in #6959
- Restore wrapped functions in
functions_to_tracetests by @alexander-alderman-webb in #6933 - Pin
mcp<2forfastmcp<0.3by @alexander-alderman-webb in #6925 - Pin Python > 3.7 for
huey>=3.3.0by @alexander-alderman-webb in #6913 - Add
httpxdependency tomcpandfastmcptests by @alexander-alderman-webb in #6905 - Remove flaky circular references tests by @alexander-alderman-webb in #6903
- Remove old Python compat code by @sentrivana in #6902
- Add span streaming DSC tests by @sentrivana in #6884
- Add streaming logs tests by @sentrivana in #6880
- Add streaming API tests by @sentrivana in #6883
- Add streaming continous profiler tests by @sentrivana in #6879
- Add streaming monitor test by @sentrivana in #6882
- Add streaming metrics test by @sentrivana in #6881
- Add sample_rand span streaming tests by @sentrivana in #6781