Releases: getsentry/sentry-python
2.40.0
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:import sentry_sdk from sentry_sdk.integrations.litellm import LiteLLMIntegration sentry_sdk.init( dsn="<your-dsn>", # Set traces_sample_rate to 1.0 to capture 100% # of transactions for tracing. traces_sample_rate=1.0, # Add data like inputs and responses; # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info send_default_pii=True, integrations=[ LiteLLMIntegration(), ], )
-
Litestar: Copy request info to prevent cookies mutation (#4883) by @alexander-alderman-webb
-
Also 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 newtrace_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.import sentry_sdk sentry_sdk.init( trace_ignore_status_codes={301, 302, 303, *range(305, 400), 404}, )
-
Move
_set_agent_datacall toai_client_spanfunction (#4876) by @constantinius -
Add script to determine lowest supported versions (#4867) by @sentrivana
-
Update
CONTRIBUTING.md(#4870) by @sentrivana
2.39.0
Various fixes & improvements
- Fix(AI): Make agents integrations set the span status in case of error (#4820) by @antonpirker
- Fix(dedupe): Use weakref in dedupe where possible (#4834) by @sl0thentr0py
- Fix(Django): Avoid evaluating complex Django object in span.data/span.attributes (#4804) by @antonpirker
- Fix(Langchain): Don't record tool call output if not include_prompt / should_send_default_pii (#4836) by @shellmayr
- Fix(OpenAI): Don't swallow userland exceptions in openai (#4861) by @sl0thentr0py
- Docs: Update contributing guidelines with instructions to run tests with tox (#4857) by @alexander-alderman-webb
- Test(Spark): Improve
test_sparkspeed (#4822) by @mgaligniana
Note: This is my last release. So long, and thanks for all the fish! by @antonpirker
2.38.0
Various fixes & improvements
- Feat(huggingface_hub): Update HuggingFace Hub integration (#4746) by @antonpirker
- Feat(Anthropic): Add proper tool calling data to Anthropic integration (#4769) by @antonpirker
- Feat(openai-agents): Add input and output to
invoke_agentspan. (#4785) by @antonpirker - Feat(AI): Create transaction in AI agents framworks, when no transaction is running. (#4758) by @constantinius
- Feat(GraphQL): Support gql 4.0-style execute (#4779) by @sentrivana
- Fix(logs): Expect
log_itemas rate limit category (#4798) by @sentrivana - Fix: CI for mypy, gevent (#4790) by @sentrivana
- Fix: Correctly check for a running transaction (#4791) by @antonpirker
- Fix: Use float for sample rand (#4677) by @sentrivana
- Fix: Avoid reporting false-positive StopAsyncIteration in the asyncio integration (#4741) by @vmarkovtsev
- Fix: Add log message when
DedupeIntegrationis dropping an error. (#4788) by @antonpirker - Fix(profiling): Re-init continuous profiler (#4772) by @Zylphrex
- Chore: Reexport module
profiler(#4535) by @zen-xu - Tests: Update tox.ini (#4799) by @sentrivana
- Build(deps): bump actions/create-github-app-token from 2.1.1 to 2.1.4 (#4795) by @dependabot
- Build(deps): bump actions/setup-python from 5 to 6 (#4774) by @dependabot
- Build(deps): bump codecov/codecov-action from 5.5.0 to 5.5.1 (#4773) by @dependabot
2.37.1
Various fixes & improvements
- Fix(langchain): Make Langchain integration work with just langchain-core (#4783) by @shellmayr
- Tests: Move quart under toxgen (#4775) by @sentrivana
- Tests: Update tox.ini (#4777) by @sentrivana
- Tests: Move chalice under toxgen (#4766) by @sentrivana
2.37.0
-
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
2.36.0
Various fixes & improvements
-
New integration: Unraisable exceptions (#4733) by @alexander-alderman-webb
Add the unraisable exception integration to your sentry_sdk.init call:
import sentry_sdk
from sentry_sdk.integrations.unraisablehook import UnraisablehookIntegration
sentry_sdk.init(
dsn="...",
integrations=[
UnraisablehookIntegration(),
]
)- meta: Update instructions on release process (#4755) by @sentrivana
- tests: Move arq under toxgen (#4739) by @sentrivana
- tests: Support dashes in test suite names (#4740) by @sentrivana
- Don't fail if there is no
_context_manager_state(#4698) by @sentrivana - Wrap span restoration in
__exit__incapture_internal_exceptions(#4719) by @sentrivana - fix: Constrain types of ai_track decorator (#4745) by @alexander-alderman-webb
- Fix
openai_agentsin CI (#4742) by @sentrivana - Remove old langchain test suites from ignore list (#4737) by @sentrivana
- tests: Trigger Pytest failure when an unraisable exception occurs (#4738) by @alexander-alderman-webb
- fix(openai): Avoid double exit causing an unraisable exception (#4736) by @alexander-alderman-webb
- tests: Move langchain under toxgen (#4734) by @sentrivana
- toxgen: Add variants & move OpenAI under toxgen (#4730) by @sentrivana
- Update tox.ini (#4731) by @sentrivana
3.0.0a6
We're excited to announce that version 3.0 of the Sentry Python SDK is now
available. This release is the result of a long-term effort to use OpenTelemetry
under the hood for tracing. This switch opens the door for us to leverage the
full power of OpenTelemetry, so stay tuned for more integrations and features
in future releases.
Looking to upgrade from Sentry SDK 2.x to 3.x? See the
full list of changes for a comprehensive overview
of what's changed. Looking for a more digestible summary? See the
migration guide in the docs
with the most common migration patterns.
for your feedback. How was the migration? Is everything working as expected? Is
nothing working as expected? Something in between? Please let us know
on GitHub or
on Discord.
This version also adds an experimental async transport option. It can be enabled by passing transport_async=true in the experiments dict in sentry_sdk.init(). The async transport requires the asyncio integration and the httpcore[asyncio] library.
2.35.2
Various fixes & improvements
- fix(logs): Do not attach template if there are no parameters (#4728) by @sentrivana
2.35.1
Various fixes & improvements
- OpenAI Agents: Isolate agent run (#4720) by @sentrivana
- Tracing: Do not attach stacktrace to transaction (#4713) by @Zylphrex
2.35.0
Various fixes & improvements
- Langchain Integration now supports the Sentry AI dashboard. (#4678) by @shellmayr
- Anthropic Integration now supports the Sentry AI dashboard. (#4674) by @constantinius
- AI Agents templates for
@tracedecorator (#4676) by @antonpirker - Sentry Logs: Add
enable_logs,before_send_logas top-levelsentry_sdk.init()options (#4644) by @sentrivana - Tracing: Improve
@tracedecorator. Allows to setspan.op,span.name, andspan.attributes(#4648) by @antonpirker - Tracing: Add convenience function
sentry_sdk.update_current_span. (#4673) by @antonpirker - Tracing: Add
Span.update_data()to update multiplespan.dataitems at once. (#4666) by @antonpirker - GNU-integration: make path optional (#4688) by @MeredithAnya
- Clickhouse: Don't eat the generator data (#4669) by @szokeasaurusrex
- Clickhouse: List
send_dataparameters (#4667) by @szokeasaurusrex - Update
gen_ai.*andai.*attributes (#4665) by @antonpirker - Better checking for empty tools list (#4647) by @antonpirker
- Remove performance paper cuts (#4675) by @sentrivana
- Help for debugging Cron problems (#4686) by @antonpirker
- Fix Redis CI (#4691) by @sentrivana
- Fix plugins key codecov (#4655) by @sl0thentr0py
- Fix Mypy (#4649) by @sentrivana
- Update tox.ini (#4689) by @sentrivana
- build(deps): bump actions/create-github-app-token from 2.0.6 to 2.1.0 (#4684) by @dependabot