You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release type (Distillery, mix release, Mix, etc.): mix release
Description
This sample code from the 8.0.0-rc2 doc causes a compile error if I try to use it in my app:
use Sentry.PlugContext, body_scrubber: &scrub_params/1
...even though there is a scrub_params/1 function defined within the module. This used to work fine when using Sentry.Plug within the Router, with locally defined functions.
Expected Behavior
If I define a local function inside the Endpoint module, then pass it to Sentry.PlugContext, I would expect it to compile fine.
Environment
Description
This sample code from the 8.0.0-rc2 doc causes a compile error if I try to use it in my app:
...even though there is a scrub_params/1 function defined within the module. This used to work fine when using
Sentry.Plug
within the Router, with locally defined functions.Expected Behavior
If I define a local function inside the Endpoint module, then pass it to
Sentry.PlugContext
, I would expect it to compile fine.Actual Behavior
Steps to Reproduce
In a Phoenix app, define this function inside the endpoint module:
Then somewhere else in the endpoint use it in PlugContext:
It doesn't matter if the function is defined before or after the plug.
Workaround
Using a tuple works:
The text was updated successfully, but these errors were encountered: