Support multiple environments for sentry

Change-Id: I2db87d41b9302692a14822c1b5dc9c7a385a2b61
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254540
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
This commit is contained in:
Jacob Burroughs 2020-12-07 16:03:26 -06:00
parent b9119b3a99
commit bcad417c5f
2 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,7 @@ if settings.present?
config.logger = Rails.logger
config.silence_ready = true
config.dsn = settings[:dsn]
config.current_environment = Canvas.environment
config.tags = settings.fetch(:tags, {}).merge('canvas_revision' => Canvas.revision)
config.release = Canvas.revision
config.sanitize_fields += Rails.application.config.filter_parameters.map(&:to_s)

View File

@ -332,4 +332,8 @@ module Canvas
def self.cluster
nil
end
def self.environment
Rails.environment
end
end