rollbar

从单体到微服务再合并,我们找到了平衡点

白昼怎懂夜的黑 提交于 2020-08-10 07:18:15
云栖号资讯:【 点击查看更多行业资讯 】 在这里您可以找到不同行业的第一手的上云资讯,还在等什么,快来! 有人说,程序员总是对好的东西如数家珍,对不好的东西置若罔闻。2015 年,当微服务炒作开始飞起,每个人都在议论它的好处: 弹性; 伸缩性; 易于部署; 清晰的边界。 我们公司也从单体转向了微服务,但最后在二者之间找到了一个平衡点。微服务的一些好处是切实存在的,但它的一些缺点和潜在风险也不可忽视。 从单体到微服务 我于 2017 年加入公司,当时我们的团队大约有 20 名工程师,我们的应用程序是一个部署在 ECS 上的 Django 单体。 在过去两年里,我们开发了很多新服务,以下是一个不完整的清单: 票据服务:管理客户票据; 收费服务:管理 Stripe 的收费和支付; 定价服务:管理服务定价; 匹配服务:为企业经理和供应商之间牵线搭桥; 消息服务:管理聊天功能; 通知服务:管理推送通知、应用内通知和邮件; 审核服务:供应商审核客户; Netsuite 同步服务:将数据同步到 Netsuite; Salesforce 同步服务:将数据同步到 Salesforce; Stripe 同步服务:Stripe 和我们的系统之间的一个传输层; RDS 监控服务:确保我们的 Postgres 数据库正确备份; Datadog 监控服务:监控 Datadog 代理运行正常; GitHub

How to mock third party library using jest

半城伤御伤魂 提交于 2020-02-25 09:48:30
问题 I am developing a node.js application using nestjs I have a class called LoggerService as below export class LoggerService { private logger: Rollbar; constructor() { this.logger = this.setupLogger(); } critical(...args: Array<string | Error | object | Date | any[]>) { this.logger.error(...args); } private setupLogger(): Rollbar { if (this.logger == null) { this.logger = new Rollbar({ accessToken: 'token', environment: 'dev', captureUncaught: true, captureUnhandledRejections: true, }); }

RuntimeError: can't modify frozen Array (Rollbar, Rails 5.1 upgrade)

大憨熊 提交于 2020-01-05 05:31:14
问题 Unable to use rspec and rollbar after upgrading to rails 5. Create a Rails 4 app Upgrade gemfile to use rails 5 Try adding rollbar gem/support Standard config/environment.rb: # Load the Rails application. require_relative 'application' # Initialize the Rails application. Rails.application.initialize! Error when running rspec: An error occurred while loading {path to specific spec file} Failure/Error: require File.expand_path('../../config/environment', __FILE__) RuntimeError: can't modify

How can I use Rails 5.2 credentials in capistrano's deploy.rb file?

强颜欢笑 提交于 2020-01-02 02:24:05
问题 I've just updated my Rails app to 5.2, and configured it to use the new config/credentials.yml.enc file. When I try to deploy, I get this error: NameError: uninitialized constant Rails /Users/me/Documents/project/config/deploy.rb:27:in `<top (required)>' That's pointing to this line in my config/deploy.rb file: set :rollbar_token, Rails.application.credentials[:rollbar_token] So it appears that while capistrano is running, it doesn't have access to Rails.application.credentials . How are you

How can I use Rails 5.2 credentials in capistrano's deploy.rb file?

血红的双手。 提交于 2019-12-05 08:10:22
I've just updated my Rails app to 5.2, and configured it to use the new config/credentials.yml.enc file. When I try to deploy, I get this error: NameError: uninitialized constant Rails /Users/me/Documents/project/config/deploy.rb:27:in `<top (required)>' That's pointing to this line in my config/deploy.rb file: set :rollbar_token, Rails.application.credentials[:rollbar_token] So it appears that while capistrano is running, it doesn't have access to Rails.application.credentials . How are you all handling this? I've got some ideas... Set this one variable as an ENV variable I don't love how