Skip to content

feat: upgrade sentry python sdk to 2.28.0 #91717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented May 15, 2025

https://github.com/getsentry/sentry-python/releases/tag/2.28.0

Also updates the deprecated set_measurement API usage throughout the codebase.

Relevant changes:

@AbhiPrasad AbhiPrasad self-assigned this May 15, 2025
@AbhiPrasad AbhiPrasad requested a review from a team as a code owner May 15, 2025 14:24
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 15, 2025
@AbhiPrasad
Copy link
Member Author

@antonpirker I saw you opened #91614 - will this interfere with that? I'd really like to get the logs fixes we merged in released.

Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@antonpirker
Copy link
Member

@antonpirker I saw you opened #91614 - will this interfere with that? I'd really like to get the logs fixes we merged in released.

No, go ahead. The dogfooding will take longer, because we need to change lots of stuff in the code base

Copy link

codecov bot commented May 15, 2025

❌ 3321 Tests Failed:

Tests completed Failed Passed Skipped
24588 3321 21267 331
View the top 3 failed test(s) by shortest run time
tests.sentry.issues.test_search_issues_dataset.DatasetTest::test_query_dataset_returns_empty
Stack Traces | 0.506s run time
#x1B[1m#x1B[.../sentry/issues/test_search_issues_dataset.py#x1B[0m:31: in test_query_dataset_returns_empty
    result = raw_snql_query(request)
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:988: in raw_snql_query
    return bulk_snuba_queries(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1010: in bulk_snuba_queries
    return bulk_snuba_queries_with_referrers(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1052: in bulk_snuba_queries_with_referrers
    return _apply_cache_and_build_results(snuba_requests, use_cache=use_cache)
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1127: in _apply_cache_and_build_results
    query_results = _bulk_snuba_query([item[1] for item in to_query])
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1211: in _bulk_snuba_query
    span.set_measurement(f"{allocation_policy_prefix}.bytes_scanned", bytes_scanned)
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/sentry_sdk/tracing.py#x1B[0m:621: in set_measurement
    warnings.warn(
#x1B[1m#x1B[31mE   DeprecationWarning: `set_measurement()` is deprecated and will be removed in the next major version. Please use `set_data()` instead.#x1B[0m
tests.sentry.issues.test_group_attributes_dataset.DatasetTest::test_query_dataset_returns_empty
Stack Traces | 0.511s run time
#x1B[1m#x1B[.../sentry/issues/test_group_attributes_dataset.py#x1B[0m:32: in test_query_dataset_returns_empty
    result = raw_snql_query(request)
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:988: in raw_snql_query
    return bulk_snuba_queries(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1010: in bulk_snuba_queries
    return bulk_snuba_queries_with_referrers(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1052: in bulk_snuba_queries_with_referrers
    return _apply_cache_and_build_results(snuba_requests, use_cache=use_cache)
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1127: in _apply_cache_and_build_results
    query_results = _bulk_snuba_query([item[1] for item in to_query])
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1211: in _bulk_snuba_query
    span.set_measurement(f"{allocation_policy_prefix}.bytes_scanned", bytes_scanned)
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/sentry_sdk/tracing.py#x1B[0m:621: in set_measurement
    warnings.warn(
#x1B[1m#x1B[31mE   DeprecationWarning: `set_measurement()` is deprecated and will be removed in the next major version. Please use `set_data()` instead.#x1B[0m
tests.sentry.issues.test_suspect_tags.SuspectTagsTest::test_query_selection_set
Stack Traces | 1.06s run time
#x1B[1m#x1B[.../sentry/issues/test_suspect_tags.py#x1B[0m:57: in test_query_selection_set
    results = query_selection_set(1, 1, before, later, environments=[], group_id=1)
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/sentry_sdk/tracing_utils.py#x1B[0m:829: in func_with_tracing
    return func(*args, **kwargs)
#x1B[1m#x1B[.../sentry/issues/suspect_tags.py#x1B[0m:198: in query_selection_set
    response = raw_snql_query(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:988: in raw_snql_query
    return bulk_snuba_queries(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1010: in bulk_snuba_queries
    return bulk_snuba_queries_with_referrers(
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1052: in bulk_snuba_queries_with_referrers
    return _apply_cache_and_build_results(snuba_requests, use_cache=use_cache)
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1127: in _apply_cache_and_build_results
    query_results = _bulk_snuba_query([item[1] for item in to_query])
#x1B[1m#x1B[.../sentry/utils/snuba.py#x1B[0m:1211: in _bulk_snuba_query
    span.set_measurement(f"{allocation_policy_prefix}.bytes_scanned", bytes_scanned)
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/sentry_sdk/tracing.py#x1B[0m:621: in set_measurement
    warnings.warn(
#x1B[1m#x1B[31mE   DeprecationWarning: `set_measurement()` is deprecated and will be removed in the next major version. Please use `set_data()` instead.#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@AbhiPrasad
Copy link
Member Author

There's a ton of test failures I don't have the time to debug. I suspect changing the deprecated methods affects this. For now we'll have to first migrate the deprecate method, and then upgrade the SDK.

@AbhiPrasad AbhiPrasad closed this May 16, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants