Skip to content

Conversation

@josevalim
Copy link
Contributor

The downside of conditional module definition is that
it may not work as expected in umbrellas. Given the
Sentry Logger configuration in an umbrella project is
shared across all apps, if we do:

config :logger, :backends, [Sentry.LoggerBackend]

then :sentry needs to be defined on all dependencies.
However, if a dependency is not a web application,
Sentry may be compiled before Plug! And if it is compiled
before Plug, it wouldn't define Sentry.PlugCapture and
friends, which means the web app in the umbrella wouldn't
have those modules available.

The downside of conditional module definition is that
it may not work as expected in umbrellas. Given the
Sentry Logger configuration in an umbrella project is
shared across all apps, if we do:

    config :logger, :backends, [Sentry.LoggerBackend]

then `:sentry` needs to be defined on all dependencies.
However, if a dependency is not a web application,
Sentry may be compiled before Plug! And if it is compiled
before Plug, it wouldn't define Sentry.PlugCapture and
friends, which means the web app in the umbrella wouldn't
have those modules available.
@mitchellhenke
Copy link
Contributor

Thank you!!

@mitchellhenke mitchellhenke merged commit eaca537 into getsentry:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants