Problem Statement
allow_sentry_reports/2 documentation says that
Child processes are now automatically tracked via $callers.
(It also says that it will be removed in v13.0.0, but it still exists as a no-op)
Without this functionality, it is not possible to use Sentry.Test e.g. in async integration tests using phoenix_test_playwright or when testing e.g. Broadway, where the caller module is not in $callers.
Solution Brainstorm
Bring back possibility to manually allow sentry reports. For reference, e.g. Broadway documentation recommends using passing pid_with_access in metadata + allowing SQL sandbox via a telemetry hook to make it work with async tests. The same mechanism could be used with Sentry (in my case, instead of Ecto.Adapters.SQL.Sandbox.allow I would call MyApp.TestSandbox.allow, which would call both Sentry.Test.allow_sentry_reports and Ecto.Adapters.SQL.Sandbox.allow etc)
For reference also see https://hexdocs.pm/nimble_ownership/NimbleOwnership.html#allow/5 which is the standard way of implementing this
Problem Statement
allow_sentry_reports/2documentation says that(It also says that it will be removed in v13.0.0, but it still exists as a no-op)
Without this functionality, it is not possible to use
Sentry.Teste.g. in async integration tests usingphoenix_test_playwrightor when testing e.g. Broadway, where the caller module is not in$callers.Solution Brainstorm
Bring back possibility to manually allow sentry reports. For reference, e.g. Broadway documentation recommends using passing
pid_with_accessin metadata + allowing SQL sandbox via a telemetry hook to make it work with async tests. The same mechanism could be used with Sentry (in my case, instead ofEcto.Adapters.SQL.Sandbox.allowI would callMyApp.TestSandbox.allow, which would call bothSentry.Test.allow_sentry_reportsandEcto.Adapters.SQL.Sandbox.allowetc)For reference also see https://hexdocs.pm/nimble_ownership/NimbleOwnership.html#allow/5 which is the standard way of implementing this