Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ def __init__(
enable_logs=False, # type: bool
before_send_log=None, # type: Optional[Callable[[Log, Hint], Optional[Log]]]
trace_ignore_status_codes=frozenset(), # type: AbstractSet[int]
before_send_metric=None, # type: Optional[Callable[[Metric, Hint], Optional[Metric]]]
):
# type: (...) -> None
"""Initialize the Sentry SDK with the given parameters. All parameters described here can be used in a call to `sentry_sdk.init()`.
Expand Down
4 changes: 3 additions & 1 deletion sentry_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2052,4 +2052,6 @@ def get_before_send_metric(options):
if options is None:
return None

return options["_experiments"].get("before_send_metric")
return options.get("before_send_metric") or options["_experiments"].get(
"before_send_metric"
)