fix(ingest): fix support for old sentry-sdk versions (#14228)

Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
This commit is contained in:
Aseem Bansal 2025-07-26 00:55:43 +05:30 committed by GitHub
parent a5649f0f21
commit 3b202febe0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -23,8 +23,8 @@ base_requirements = {
# pydantic 1.10.3 is incompatible with typing-extensions 4.1.1 - https://github.com/pydantic/pydantic/issues/4885
"pydantic>=1.10.0,!=1.10.3",
"mixpanel>=4.9.0",
# Airflow depends on fairly old versions of sentry-sdk, so we want to be loose with our constraints.
"sentry-sdk",
# Airflow depends on fairly old versions of sentry-sdk, which is why we need to be loose with our constraints.
"sentry-sdk>=1.33.1",
}
framework_common = {

View File

@ -272,7 +272,10 @@ class Telemetry:
if self.sentry_enabled:
import sentry_sdk
sentry_sdk.set_tags(properties)
# Note: once we're on sentry-sdk 2.1.0+, we can use sentry_sdk.set_tags(properties)
# See https://github.com/getsentry/sentry-python/commit/6c960d752c7c7aff3fd7469d2e9ad98f19663aa8
for key, value in properties.items():
sentry_sdk.set_tag(key, value)
def init_capture_exception(self) -> None:
if self.sentry_enabled: