ashb commented on code in PR #69504:
URL: https://github.com/apache/airflow/pull/69504#discussion_r3820744815
##########
task-sdk/src/airflow/sdk/execution_time/sentry/configured.py:
##########
@@ -80,24 +80,28 @@ def prepare_to_enrich_errors(self, executor_integration:
str) -> None:
log.exception("Invalid executor Sentry integration",
import_path=executor_integration)
sentry_config_opts: dict[str, Any] = conf.getsection("sentry") or {}
- if sentry_config_opts:
- sentry_config_opts.pop("sentry_on")
- old_way_dsn = sentry_config_opts.pop("sentry_dsn", None)
- new_way_dsn = sentry_config_opts.pop("dsn", None)
- # supported backward compatibility with old way dsn option
- dsn = old_way_dsn or new_way_dsn
-
- if unsupported_options :=
self.UNSUPPORTED_SENTRY_OPTIONS.intersection(sentry_config_opts):
- log.warning(
- "There are unsupported options in [sentry] section",
- options=unsupported_options,
- )
+ sentry_config_opts.pop("sentry_on", None)
+ old_way_dsn = sentry_config_opts.pop("sentry_dsn", None)
+ new_way_dsn = sentry_config_opts.pop("dsn", None)
+ # supported backward compatibility with old way dsn option
+ dsn = old_way_dsn or new_way_dsn
+
+ # Resolve before_send and transport to callables if configured
+ if before_send := conf.getimport("sentry", "before_send",
fallback=None):
+ sentry_config_opts["before_send"] = before_send
else:
- dsn = None
Review Comment:
Why was `dsn` being cleared here before? Any idea?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]