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:
switch (stage) {
case "dev-us":
Bugsnag bugsnag = new Bugsnag("your-devus-project-api-key-here");
bugsnag.setReleaseStage("dev-us");
break;
case "dev-eu":
Bugsnag bugsnag = new Bugsnag("your-deveu-project-api-key-here");
bugsnag.setReleaseStage("dev-eu");
break;
case "prod-us":
Bugsnag bugsnag = new Bugsnag("your-produs-project-api-key-here");
bugsnag.setReleaseStage("prod-us");
break;
}
You can find similar examples of how to accomplish this with the various Bugsnag notifiers here.
Related
I have multiple agents in Dialogflow and would like to connect them into a single app. However, since each agent is created in their respective GCP project, how do I connect one agent into another which I am using to run firebase hosting.
This sounds like you could be looking for a feature such as Mega Agents.
It allows you to run multiple agents under one parent agent and so combining multiple bots together in one experience.
Do note that it is a beta feature at this time, so it could be that some features changes in the future.
I use multiple AWS API Gateway for many of our backend services.
This is the standard structure of the Gateway (in relation to my question);
API Gateway
2 stages (test and prod)
AWS CLI Tool for automated changes and deployments
The problem I'm having (this has been since I started using AWS API Gateway);
The Gateway manages versionsing of the API perfectly fine, however, not model versioning...
During a quarter (we work in 3 month sprints), we would make changes multiple models. This stage would be deployed tested and things would continue to work as expected.
The problem comes when we need to make a hotfix, during the quarter.
A hotfix would only contain a small part of development we would like to release into the production environment, however, the Gateway only holds one version of model. Meaning, if i've made changes to 10 models during our quarter, and then need to release a hotfix that affects only 1 model, we're in trouble.
I typically would need to roll back all model changes, to match that of initial prod release, add the 1 new model change and release to live - then go back and re-add all the models that I had to remove (sync test and prod back up).
I can get around this (dirty hack) by creating multiple Gateways (called Gateway-test and Gateway-live). These would each be a duplicate of each other with 1 stage each, but have their own models. That way, when production needs changes for a hotfix, i'll simple add what's needed and deploy it. At the end of the quarter, i'd sync them both up and deploy live.
I'm sure you can see how this can become a pain - as now, instead of managing versions of models, I have to manage 2 completely separate Gateways.
I've spoken with AWS support and our AWS architect (business support), however, this seems to be a case of "it's possibly getting added to the roadmap".
Has anyone else managed to get around this issue?
Thanks in advance.
In some of my application I have to manage environment specific attributes / variables like:
- folder path
- rest api urls
- credentials
- ...
At the moment I'm manually setting variables in the configuration registry of each server. This is quite heavy when you've to deploy a new server because you've to recreate everything manually (I haven't find a way to initialize the repository from an xml file for instance)
I've seen different approaches like
- writing different version of the endpoints, sequences,... and create different car for distribution on each environment
- Using local registry with different entries
- Using governance registry (I've no experience with this)
What is according to you the best approach for this?
Thanks for helping
You can find the best practices guide for WSO2 Enterprise Integrator (ESB, DSS, BPS and MB) at [1]. It also explains how to manage environment specific variables.
[1] https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Best+Practices
Finally what I've done (and what is working since some weeks now) is for each of my project :
Create a "master" maven project that will contain:
An ESB project
One registry project per environment that contains all environment dependant variables (like hosts, passwords, paths, ...)
One Composite Application project per environment that will package the ESB project with the correct registry values (Note that if you deploy everything in the ESB event the registry project must be considered as a "EnterpriseServiceBus" Role)
Next step will be to integrate everything in jenkins and automatize the building of car with maven.
There are many things that are different in deployment and production. For example, in case of using Facebook API, I need to change id of application(because there are different id for testing and production) every time I push update to the app.
I update only app, so what do usually django developers do in this case? Possibly saving a variable to settings.py and then getting it from there or creating separated file in virtual environment folder, which in my case at least is also separated ?
There is no official way of splitting your Django settings for prod and dev -- developers are encouraged to find a way that works for them. The Django docs list out several good options here: https://code.djangoproject.com/wiki/SplitSettings
Been searching for the last few days for an alternative to the AWS Console Web ui.
We want to give this to our employees to manage their development/test environment their self without interaction from the IT team.
What we want is an extra Web ui that does the following "management tasks"
List all instances (maybe based on tags)
Stop / Start instances
Create / Destroy instances (from specific AMI's)
Also we would like to have logs + authentication (preferable LDAP)
I found a few but none of them actually was that simple.
We would also prefer to have a django/python based application but sinatra is also fine.
Alternatives that I found:
Asgard from netflix
Spurios (has no EC2 instances)
We also found Flask app builder to build our own app but it would be nice if some things already exsists. I believe many company's want the same but are they keeping that for internal use only ?
Maybe you know more projects that I, for some reason, did not stumble on.