Repository navigation
Cap sentry-sdk below 3 and remove the 3.x code paths - #379
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
sentryextra is nowsentry-sdk>=2.70,<3, down from<4. The 3.x code paths from #359 are removed, so 2.0 supports one sentry-sdk major and can ship before sentry-sdk 3.0 reaches GA. 3.x support was only ever tested against betas, and the betas were still changing. b2 kepttrace_lifecycle, which b1's migration guide listed as removed, and it removedenable_metrics,stream_gen_ai_spansandtrace_ignore_status_codes.The floor stays at 2.70, because
SentryInstrumentstill passes the top-leveldata_collectionoption. The explicitDEFAULT_DATA_COLLECTIONand the tests #359 rewrote to assert behaviour stay as well. They don't depend on the major.Code
sentry_instrument.pydropsIS_SENTRY_SDK_2._build_integrationsalways buildsLoggingIntegration(level=sentry_logging_breadcrumb_level, sentry_logs_level=None).capture_request_exceptionalways passesclient_optionstoevent_from_exception.litestar_bootstrapper.pycallssentry_logging.ignore_logger("litestar")directly. Theignore_logger_for_eventsfallback for 3.x is gone.benchmarks/micro.pyandbenchmarks/repro_sentry_txn.pyare back to their state before feat(sentry)!: support sentry-sdk 3 alongside 2.x and raise the floor to 2.70 #359. Nothing has changed them since.benchmarks/sentry_scenarios.pyloses its major checks. TheTransactionpatches anderrors_only_txn_endpoint_styleare unconditional again, and so are the directty: ignoreassignments.CI
The
sentry-majorsjob is removed. Itssentry-sdk<3leg is what thepytestjobs resolve now, and its3.0.0b2leg tested a major that is no longer allowed.Docs
configuration.md: "Sentry logging integration" describes the single 2.x call and says 3.0 isn't supported yet. "Sentry data collection" loses the 3.x paragraph, and the auto-enabling section loses the 3.0.0b2 Redis number.fastapi.md,litestar.mdandfastmcp.mdlose the 3.0.0b2 column from their Sentry cost tables.litestar.mdalso loses the sentence about sampledsentry-traceheaders on 3.0.benchmarks/README.mdsays the scripts run on 2.x only. Its measurement tables keep their 3.0.0b2 columns as a record of what was measured.Tests
The suite passes, 591 tests at 100% coverage (
just test-ci) on sentry-sdk 2.73.0.just lint(includingty),just adr-checkandjust docs-buildpass too. No new test: on 2.x the behaviour is unchanged, and the removed branches only ran on 3.x. Allsentry_scenarios.pyscenarios build, andmicro.pyruns. No floor changes.Breaking changes
None against 1.x, which caps sentry-sdk below 3 as well (#327). Against the unreleased 2.0 main, sentry-sdk 3.x can no longer be installed alongside lite-bootstrap.
Follow-up: #380 brings 3.x support back once 3.0 is GA.