Closed MeterSoft closed 6 years ago
You should be able to add the config to only the app that uses rollbar.
yes, i added it to umbrella app ../apps/app_1/config/ but when i compile app_2 it load all config file import_config "../apps/*/config/config.exs" so two configs are merged and it is not possible to setup different rollbar
Do you want to configure and report to multiple rollbar instances?
When I set up a test umbrella project with rollbax as dependency and configure it in one of the child apps everything seems to work when I run from any of the apps or the root. Can you show the error you are getting?
app1/config
config :rollbax, access_token: "aaa", environment: "production"
app2/config
config :rollbax, access_token: "bbb", environment: "production"
then from main folder
mix release --env=prod --name=app1
in this case app1 will have setting from app2
if before run mix release --env=prod --name=app1
go to apps/app1
and then run mix release --env=prod --name=app1
it will have correct setting
for example for logger i can do next config :logger, backends: [{LoggerFileBackend, :app1}]
config :logger, :app1, level: :debug, metadata_filter: [aplication: :app1]
You can't have different rollbar reporting for different applications, since the logger (or error reporter in 0.9) is global for your release. Because of this you have to select a single rollbax configuration you want use.
Having a configuration option such as config :app_name, :rollbax, access_token: "123"
would not not help because at some point you still have to select a single configuration to use.
@MeterSoft Eric is right, Logger being global prevents us to have multiple Rollbax applications. One thing we could do is support different Rollbax backends, and then you could have different filters for each backend, but it would be hard to filter by application, so there's no plan to support that for now.
It is possible use config like this
config :app_name, :rollbax, access_token: "123"
I use it only for one app in umbrella project and wont to add this to deps only for this project. if set justconfig :rollbar
i need to add rollbar to all projects