chore: Ability to Disable Sentry Transactions (#4989)

fixes: #4866
This commit is contained in:
Sojan Jose 2022-07-07 17:07:05 +02:00 committed by GitHub
parent 2f3bdbdea2
commit f014d9d13b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ if ENV['SENTRY_DSN']
# To activate performance monitoring, set one of these options.
# We recommend adjusting the value in production:
config.traces_sample_rate = 0.1
config.traces_sample_rate = 0.1 if ENV['ENABLE_SENTRY_TRANSACTIONS']
config.excluded_exceptions += ['Rack::Timeout::RequestTimeoutException']

View file

@ -49,7 +49,7 @@ RSpec.describe 'Inboxes API', type: :request do
get "/api/v1/accounts/#{account.id}/inboxes",
headers: admin.create_new_auth_token,
as: :json
expect(JSON.parse(response.body)['payload'].last.key?('provider_config')).to eq(true)
expect(response.body).to include('provider_config')
end
it 'will not return provider config for agent' do
@ -57,7 +57,7 @@ RSpec.describe 'Inboxes API', type: :request do
headers: agent.create_new_auth_token,
as: :json
expect(JSON.parse(response.body)['payload'].last.key?('provider_config')).to eq(false)
expect(response.body).not_to include('provider_config')
end
end
end