Skip to content
Snippets Groups Projects
Commit b6646e77 authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

Track the locale in Sentry so we know which ones are failing

parent bf4ec606
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,6 +7,8 @@ module Gitlab
def self.context(current_user = nil)
return unless self.enabled?
 
Raven.tags_context(locale: I18n.locale)
if current_user
Raven.user_context(
id: current_user.id,
Loading
Loading
require 'spec_helper'
describe Gitlab::Sentry do
describe '.context' do
it 'adds the locale to the tags' do
expect(described_class).to receive(:enabled?).and_return(true)
described_class.context(nil)
expect(Raven.tags_context[:locale]).to eq(I18n.locale.to_s)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment