We have multiple applications in Bugsnag and each one is deployed in multiple stages (dev, qa, prod) and regions (US, EU). Security good practices say we should have an API key per deployment (one key for each stage-region combination, e.g., dev-us, dev-eu, prod-us, prod-eu), but in Bugsnag we only have one API key per project. We could have one Bugsnag project per deployment but a single project per application it's simpler to watch all errors and to filter.
- Is it possible to have multiple API keys per Bugsnag project?
- What's the common practice, one Bugsnag project per application or per deployment?
Yes, it's possible to have multiple projects per staging environment in a single application.
First, you'd have to create a new project within Bugsnag's dashboard for each stage (e.g. dev-us, dev-eu, prod-us, etc). Now, you'll have a new API key per project.
I will share a Java example of how you can accomplish this:
You can find similar examples of how to accomplish this with the various Bugsnag notifiers here.