Skip to content

Commit ec7cd14

Browse files
feat: non-experimental option
1 parent 7264a9f commit ec7cd14

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sentry_sdk/consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,7 @@ def __init__(
10051005
enable_logs=False, # type: bool
10061006
before_send_log=None, # type: Optional[Callable[[Log, Hint], Optional[Log]]]
10071007
trace_ignore_status_codes=frozenset(), # type: AbstractSet[int]
1008+
before_send_metric=None, # type: Optional[Callable[[Metric, Hint], Optional[Metric]]]
10081009
):
10091010
# type: (...) -> None
10101011
"""Initialize the Sentry SDK with the given parameters. All parameters described here can be used in a call to `sentry_sdk.init()`.

sentry_sdk/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2052,4 +2052,6 @@ def get_before_send_metric(options):
20522052
if options is None:
20532053
return None
20542054

2055-
return options["_experiments"].get("before_send_metric")
2055+
return options.get("before_send_metric") or options["_experiments"].get(
2056+
"before_send_metric"
2057+
)

0 commit comments

Comments
 (0)