appsignal 2.5.3 → 2.6.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +10 -1
  3. data/.rubocop_todo.yml +1 -1
  4. data/.travis.yml +8 -1
  5. data/CHANGELOG.md +12 -0
  6. data/appsignal.gemspec +2 -2
  7. data/benchmark.rake +6 -0
  8. data/ext/agent.yml +35 -35
  9. data/ext/appsignal_extension.c +27 -9
  10. data/lib/appsignal.rb +15 -19
  11. data/lib/appsignal/auth_check.rb +2 -0
  12. data/lib/appsignal/capistrano.rb +2 -0
  13. data/lib/appsignal/cli.rb +2 -0
  14. data/lib/appsignal/cli/demo.rb +2 -0
  15. data/lib/appsignal/cli/diagnose.rb +2 -0
  16. data/lib/appsignal/cli/helpers.rb +2 -0
  17. data/lib/appsignal/cli/install.rb +15 -1
  18. data/lib/appsignal/cli/notify_of_deploy.rb +8 -0
  19. data/lib/appsignal/config.rb +44 -5
  20. data/lib/appsignal/demo.rb +2 -0
  21. data/lib/appsignal/event_formatter.rb +2 -0
  22. data/lib/appsignal/event_formatter/action_view/render_formatter.rb +2 -0
  23. data/lib/appsignal/event_formatter/active_record/instantiation_formatter.rb +2 -0
  24. data/lib/appsignal/event_formatter/active_record/sql_formatter.rb +2 -0
  25. data/lib/appsignal/event_formatter/elastic_search/search_formatter.rb +2 -0
  26. data/lib/appsignal/event_formatter/faraday/request_formatter.rb +2 -0
  27. data/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter.rb +2 -0
  28. data/lib/appsignal/event_formatter/moped/query_formatter.rb +2 -0
  29. data/lib/appsignal/extension.rb +2 -0
  30. data/lib/appsignal/extension/jruby.rb +15 -13
  31. data/lib/appsignal/garbage_collection_profiler.rb +2 -0
  32. data/lib/appsignal/hooks.rb +2 -0
  33. data/lib/appsignal/hooks/action_cable.rb +2 -0
  34. data/lib/appsignal/hooks/active_support_notifications.rb +2 -0
  35. data/lib/appsignal/hooks/celluloid.rb +2 -0
  36. data/lib/appsignal/hooks/data_mapper.rb +2 -0
  37. data/lib/appsignal/hooks/delayed_job.rb +2 -0
  38. data/lib/appsignal/hooks/mongo_ruby_driver.rb +2 -0
  39. data/lib/appsignal/hooks/net_http.rb +2 -0
  40. data/lib/appsignal/hooks/passenger.rb +2 -0
  41. data/lib/appsignal/hooks/puma.rb +2 -0
  42. data/lib/appsignal/hooks/que.rb +2 -0
  43. data/lib/appsignal/hooks/rake.rb +2 -0
  44. data/lib/appsignal/hooks/redis.rb +2 -0
  45. data/lib/appsignal/hooks/sequel.rb +2 -0
  46. data/lib/appsignal/hooks/shoryuken.rb +6 -2
  47. data/lib/appsignal/hooks/sidekiq.rb +4 -2
  48. data/lib/appsignal/hooks/unicorn.rb +2 -0
  49. data/lib/appsignal/hooks/webmachine.rb +2 -0
  50. data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +2 -0
  51. data/lib/appsignal/integrations/data_mapper.rb +2 -0
  52. data/lib/appsignal/integrations/delayed_job_plugin.rb +6 -2
  53. data/lib/appsignal/integrations/grape.rb +2 -0
  54. data/lib/appsignal/integrations/mongo_ruby_driver.rb +2 -0
  55. data/lib/appsignal/integrations/object.rb +2 -0
  56. data/lib/appsignal/integrations/padrino.rb +3 -4
  57. data/lib/appsignal/integrations/que.rb +2 -0
  58. data/lib/appsignal/integrations/railtie.rb +2 -0
  59. data/lib/appsignal/integrations/rake.rb +2 -0
  60. data/lib/appsignal/integrations/resque.rb +2 -0
  61. data/lib/appsignal/integrations/resque_active_job.rb +6 -2
  62. data/lib/appsignal/integrations/sinatra.rb +2 -0
  63. data/lib/appsignal/integrations/webmachine.rb +2 -0
  64. data/lib/appsignal/js_exception_transaction.rb +2 -0
  65. data/lib/appsignal/marker.rb +2 -0
  66. data/lib/appsignal/minutely.rb +2 -0
  67. data/lib/appsignal/rack/generic_instrumentation.rb +2 -0
  68. data/lib/appsignal/rack/js_exception_catcher.rb +2 -0
  69. data/lib/appsignal/rack/rails_instrumentation.rb +2 -0
  70. data/lib/appsignal/rack/sinatra_instrumentation.rb +2 -0
  71. data/lib/appsignal/rack/streaming_listener.rb +2 -0
  72. data/lib/appsignal/system.rb +2 -0
  73. data/lib/appsignal/transaction.rb +13 -10
  74. data/lib/appsignal/transmitter.rb +2 -0
  75. data/lib/appsignal/utils.rb +3 -1
  76. data/lib/appsignal/utils/{params_sanitizer.rb → hash_sanitizer.rb} +12 -11
  77. data/lib/appsignal/utils/query_params_sanitizer.rb +2 -0
  78. data/lib/appsignal/version.rb +3 -1
  79. data/lib/sequel/extensions/appsignal_integration.rb +2 -0
  80. data/resources/appsignal.yml.erb +5 -0
  81. data/spec/lib/appsignal/auth_check_spec.rb +11 -2
  82. data/spec/lib/appsignal/cli/install_spec.rb +33 -0
  83. data/spec/lib/appsignal/config_spec.rb +76 -18
  84. data/spec/lib/appsignal/extension_spec.rb +3 -3
  85. data/spec/lib/appsignal/integrations/padrino_spec.rb +8 -28
  86. data/spec/lib/appsignal/transaction_spec.rb +63 -30
  87. data/spec/lib/appsignal/utils/{params_sanitizer_spec.rb → hash_sanitizer_spec.rb} +6 -6
  88. data/spec/lib/appsignal_spec.rb +180 -158
  89. data/spec/support/helpers/std_streams_helper.rb +19 -12
  90. data/spec/support/project_fixture/config/appsignal.yml +21 -0
  91. metadata +11 -11
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  # @todo Move to sub-namespace
3
5
  # @api private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  class Hooks
3
5
  module DataMapperLogListener
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  class Hooks
3
5
  # @api private
@@ -30,8 +32,10 @@ module Appsignal
30
32
  class_name, method_name = class_and_method_name.split("#")
31
33
  end
32
34
 
33
- params = Appsignal::Utils::ParamsSanitizer.sanitize args,
34
- :filter_parameters => Appsignal.config[:filter_parameters]
35
+ params = Appsignal::Utils::HashSanitizer.sanitize(
36
+ args,
37
+ Appsignal.config[:filter_parameters]
38
+ )
35
39
 
36
40
  Appsignal.monitor_transaction(
37
41
  "perform_job.delayed_job",
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  # @todo Move to sub-namespace
3
5
  # @api private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  class Hooks
3
5
  # @api private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Object
2
4
  def self.appsignal_instrument_class_method(method_name, options = {})
3
5
  singleton_class.send \
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "appsignal"
2
4
 
3
5
  module Appsignal
@@ -60,9 +62,6 @@ module Padrino::Routing::InstanceMethods
60
62
  controller_name = request.controller if request.respond_to?(:controller)
61
63
  action_name = request.action if request.respond_to?(:action)
62
64
  action_name ||= ""
63
- if action_name.empty? && request.respond_to?(:fullpath)
64
- action_name = request.fullpath
65
- end
66
65
 
67
66
  unless action_name.empty?
68
67
  return "#{settings.name}:#{controller_name}##{action_name}"
@@ -75,7 +74,7 @@ module Padrino::Routing::InstanceMethods
75
74
 
76
75
  # Fall back to the application name if we haven't found an action name in
77
76
  # any previous methods.
78
- settings.name.to_s
77
+ "#{settings.name}#unknown"
79
78
  end
80
79
  end
81
80
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Integrations
3
5
  module QuePlugin
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Appsignal.logger.info("Loading Rails (#{Rails.version}) integration")
2
4
 
3
5
  require "appsignal/rack/rails_instrumentation"
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Since version 1.0 requiring this file is not necessary anymore to get
2
4
  # Rake integration, it's just here for backward compatibility.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Integrations
3
5
  # @api private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Integrations
3
5
  # @api private
@@ -7,8 +9,10 @@ module Appsignal
7
9
  def self.included(base)
8
10
  base.class_eval do
9
11
  around_perform do |job, block|
10
- params = Appsignal::Utils::ParamsSanitizer.sanitize job.arguments,
11
- :filter_parameters => Appsignal.config[:filter_parameters]
12
+ params = Appsignal::Utils::HashSanitizer.sanitize(
13
+ job.arguments,
14
+ Appsignal.config[:filter_parameters]
15
+ )
12
16
 
13
17
  Appsignal.monitor_single_transaction(
14
18
  "perform_job.resque",
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "appsignal"
2
4
  require "appsignal/rack/sinatra_instrumentation"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Integrations
3
5
  # @api private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  class JSExceptionTransaction
3
5
  attr_reader :uuid, :ext
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  # Deploy markers are used on AppSignal.com to indicate changes in an
3
5
  # application, "Deploy markers" indicate a deploy of an application.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  # @api private
3
5
  class Minutely
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rack"
2
4
 
3
5
  module Appsignal
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  # @api private
3
5
  module Rack
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rack"
2
4
 
3
5
  module Appsignal
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rack"
2
4
 
3
5
  module Appsignal
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Rack
3
5
  # Appsignal module that tracks exceptions in Streaming rack responses.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  # System environment detection module.
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
 
3
5
  module Appsignal
@@ -9,7 +11,7 @@ module Appsignal
9
11
  BLANK = "".freeze
10
12
 
11
13
  # Based on what Rails uses + some variables we'd like to show
12
- ENV_METHODS = %w[
14
+ FALLBACK_REQUEST_HEADERS = %w[
13
15
  CONTENT_LENGTH AUTH_TYPE GATEWAY_INTERFACE
14
16
  PATH_TRANSLATED REMOTE_HOST REMOTE_IDENT REMOTE_USER REMOTE_ADDR
15
17
  REQUEST_METHOD SERVER_NAME SERVER_PORT SERVER_PROTOCOL REQUEST_URI
@@ -382,11 +384,8 @@ module Appsignal
382
384
  def sanitized_params
383
385
  return unless Appsignal.config[:send_params]
384
386
 
385
- options = {}
386
- if Appsignal.config[:filter_parameters]
387
- options[:filter_parameters] = Appsignal.config[:filter_parameters]
388
- end
389
- Appsignal::Utils::ParamsSanitizer.sanitize params, options
387
+ filter_keys = Appsignal.config[:filter_parameters] || []
388
+ Appsignal::Utils::HashSanitizer.sanitize params, filter_keys
390
389
  end
391
390
 
392
391
  def request_params
@@ -406,7 +405,8 @@ module Appsignal
406
405
  # The environment of a transaction can contain a lot of information, not
407
406
  # all of it useful for debugging.
408
407
  #
409
- # Only the values from the keys specified in {ENV_METHODS} are returned.
408
+ # Only the values from the keys specified in {FALLBACK_REQUEST_HEADERS} are
409
+ # returned.
410
410
  #
411
411
  # @return [nil] if no environment is present.
412
412
  # @return [Hash<String, Object>]
@@ -415,7 +415,8 @@ module Appsignal
415
415
  return if env.empty?
416
416
 
417
417
  {}.tap do |out|
418
- ENV_METHODS.each do |key|
418
+ (Appsignal.config[:request_headers] ||
419
+ FALLBACK_REQUEST_HEADERS).each do |key|
419
420
  out[key] = env[key] if env[key]
420
421
  end
421
422
  end
@@ -423,7 +424,7 @@ module Appsignal
423
424
 
424
425
  # Returns sanitized session data.
425
426
  #
426
- # The session data is sanitized by the {Appsignal::Utils::ParamsSanitizer}.
427
+ # The session data is sanitized by the {Appsignal::Utils::HashSanitizer}.
427
428
  #
428
429
  # @return [nil] if `:skip_session_data` config is set to `true`.
429
430
  # @return [nil] if the {#request} object doesn't respond to `#session`.
@@ -435,7 +436,9 @@ module Appsignal
435
436
  session = request.session
436
437
  return unless session
437
438
 
438
- Appsignal::Utils::ParamsSanitizer.sanitize(session.to_hash)
439
+ Appsignal::Utils::HashSanitizer.sanitize(
440
+ session.to_hash, Appsignal.config[:filter_session_data]
441
+ )
439
442
  end
440
443
 
441
444
  # Returns metadata from the environment.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "net/http"
2
4
  require "net/https"
3
5
  require "uri"
@@ -1,4 +1,6 @@
1
- require "appsignal/utils/params_sanitizer"
1
+ # frozen_string_literal: true
2
+
3
+ require "appsignal/utils/hash_sanitizer"
2
4
  require "appsignal/utils/query_params_sanitizer"
3
5
 
4
6
  module Appsignal
@@ -1,22 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Utils
3
5
  # @api private
4
- class ParamsSanitizer
6
+ class HashSanitizer
5
7
  FILTERED = "[FILTERED]".freeze
6
8
 
7
9
  class << self
8
- def sanitize(params, options = {})
9
- sanitize_value(params, options)
10
+ def sanitize(value, filter_keys = [])
11
+ sanitize_value(value, filter_keys)
10
12
  end
11
13
 
12
14
  private
13
15
 
14
- def sanitize_value(value, options = {})
16
+ def sanitize_value(value, filter_keys)
15
17
  case value
16
18
  when Hash
17
- sanitize_hash(value, options)
19
+ sanitize_hash(value, filter_keys)
18
20
  when Array
19
- sanitize_array(value, options)
21
+ sanitize_array(value, filter_keys)
20
22
  when TrueClass, FalseClass, NilClass, Integer, String, Symbol, Float
21
23
  unmodified(value)
22
24
  else
@@ -24,24 +26,23 @@ module Appsignal
24
26
  end
25
27
  end
26
28
 
27
- def sanitize_hash(source, options)
28
- filter_keys = options.fetch(:filter_parameters, [])
29
+ def sanitize_hash(source, filter_keys)
29
30
  {}.tap do |hash|
30
31
  source.each_pair do |key, value|
31
32
  hash[key] =
32
33
  if filter_keys.include?(key.to_s)
33
34
  FILTERED
34
35
  else
35
- sanitize_value(value, options)
36
+ sanitize_value(value, filter_keys)
36
37
  end
37
38
  end
38
39
  end
39
40
  end
40
41
 
41
- def sanitize_array(source, options)
42
+ def sanitize_array(source, filter_keys)
42
43
  [].tap do |array|
43
44
  source.each_with_index do |item, index|
44
- array[index] = sanitize_value(item, options)
45
+ array[index] = sanitize_value(item, filter_keys)
45
46
  end
46
47
  end
47
48
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
4
  module Utils
3
5
  # @api private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Appsignal
2
- VERSION = "2.5.3".freeze
4
+ VERSION = "2.6.0.beta.1".freeze
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This is just a placeholder file, as +Sequel.extensions+ forcefully loads it
2
4
  # instead of assuming we already did. If you're looking for the integration
3
5
  # implementation, you can find it in +lib/appsignal/instrumentations/sequel.rb+
@@ -6,6 +6,11 @@ default: &defaults
6
6
  # Your app's name
7
7
  name: "<%= app_name %>"
8
8
 
9
+ # Request headers that should be recorded per sample
10
+ request_headers: [
11
+ <%= request_headers %>
12
+ ]
13
+
9
14
  # Actions that should not be monitored by AppSignal
10
15
  # ignore_actions:
11
16
  # - ApplicationController#isup
@@ -2,13 +2,13 @@ describe Appsignal::AuthCheck do
2
2
  let(:config) { project_fixture_config }
3
3
  let(:auth_check) { Appsignal::AuthCheck.new(config) }
4
4
  let(:auth_url) do
5
- query = {
5
+ query = build_uri_query_string(
6
6
  :api_key => config[:push_api_key],
7
7
  :environment => config.env,
8
8
  :gem_version => Appsignal::VERSION,
9
9
  :hostname => config[:hostname],
10
10
  :name => config[:name]
11
- }.map { |k, v| "#{k}=#{v}" }.join("&")
11
+ )
12
12
 
13
13
  URI(config[:endpoint]).tap do |uri|
14
14
  uri.path = "/1/auth"
@@ -19,6 +19,15 @@ describe Appsignal::AuthCheck do
19
19
  WebMock.stub_request(:post, auth_url).with(:body => "{}")
20
20
  end
21
21
 
22
+ def build_uri_query_string(hash)
23
+ hash.map do |k, v|
24
+ k.to_s.tap do |s|
25
+ next unless v
26
+ s << "=#{v}"
27
+ end
28
+ end.join("&")
29
+ end
30
+
22
31
  describe "#perform" do
23
32
  subject { auth_check.perform }
24
33
 
@@ -39,6 +39,16 @@ describe Appsignal::CLI::Install do
39
39
  actual.include?("export APPSIGNAL_APP_NAME=#{name}")
40
40
  end
41
41
  end
42
+ define :include_env_request_headers do
43
+ match do |actual|
44
+ actual.include?(
45
+ "export APPSIGNAL_REQUEST_HEADERS=HTTP_ACCEPT,HTTP_ACCEPT_CHARSET," \
46
+ "HTTP_ACCEPT_ENCODING,HTTP_ACCEPT_LANGUAGE,HTTP_CACHE_CONTROL," \
47
+ "HTTP_CONNECTION,CONTENT_LENGTH,PATH_INFO,HTTP_RANGE," \
48
+ "REQUEST_METHOD,REQUEST_URI,SERVER_NAME,SERVER_PORT,SERVER_PROTOCOL"
49
+ )
50
+ end
51
+ end
42
52
 
43
53
  define :configure_app_name do |name|
44
54
  match do |file_contents|
@@ -50,6 +60,17 @@ describe Appsignal::CLI::Install do
50
60
  file_contents =~ /^ push_api_key: "#{key}"/
51
61
  end
52
62
  end
63
+ define :configure_request_headers do
64
+ match do |file_contents|
65
+ file_contents =~ /^ request_headers: \[/ &&
66
+ file_contents =~ /^ "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",/ &&
67
+ file_contents =~ /^ "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION",/ &&
68
+ file_contents =~ /^ "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE",/ &&
69
+ file_contents =~ /^ "REQUEST_METHOD", "REQUEST_URI", "SERVER_NAME", "SERVER_PORT",/ &&
70
+ file_contents =~ /^ "SERVER_PROTOCOL"/ &&
71
+ file_contents =~ /^ \]/
72
+ end
73
+ end
53
74
  define :configure_environment do |env|
54
75
  match do |file_contents|
55
76
  file_contents =~ /^#{env}:$/
@@ -272,6 +293,7 @@ describe Appsignal::CLI::Install do
272
293
  expect(output).to include_file_config
273
294
  expect(config_file).to configure_app_name(app_name)
274
295
  expect(config_file).to configure_push_api_key(push_api_key)
296
+ expect(config_file).to configure_request_headers
275
297
  expect(config_file).to_not configure_environment("development")
276
298
  expect(config_file).to_not configure_environment("staging")
277
299
  expect(config_file).to configure_environment("production")
@@ -299,6 +321,7 @@ describe Appsignal::CLI::Install do
299
321
 
300
322
  expect(output).to include_env_push_api_key(push_api_key)
301
323
  expect(output).to_not include_env_app_name
324
+ expect(output).to include_env_request_headers
302
325
  end
303
326
 
304
327
  it "completes the installation" do
@@ -322,6 +345,7 @@ describe Appsignal::CLI::Install do
322
345
  expect(output).to include_file_config
323
346
  expect(config_file).to configure_app_name(app_name)
324
347
  expect(config_file).to configure_push_api_key(push_api_key)
348
+ expect(config_file).to configure_request_headers
325
349
  expect(config_file).to configure_environment("development")
326
350
  expect(config_file).to configure_environment("staging")
327
351
  expect(config_file).to configure_environment("production")
@@ -366,6 +390,7 @@ describe Appsignal::CLI::Install do
366
390
 
367
391
  expect(output).to include_env_push_api_key(push_api_key)
368
392
  expect(output).to include_env_app_name(app_name)
393
+ expect(output).to include_env_request_headers
369
394
  end
370
395
 
371
396
  it "completes the installation" do
@@ -392,6 +417,7 @@ describe Appsignal::CLI::Install do
392
417
  expect(output).to include_file_config
393
418
  expect(config_file).to configure_app_name(app_name)
394
419
  expect(config_file).to configure_push_api_key(push_api_key)
420
+ expect(config_file).to configure_request_headers
395
421
  expect(config_file).to configure_environment("development")
396
422
  expect(config_file).to configure_environment("staging")
397
423
  expect(config_file).to configure_environment("production")
@@ -437,6 +463,7 @@ describe Appsignal::CLI::Install do
437
463
 
438
464
  expect(output).to include_env_push_api_key(push_api_key)
439
465
  expect(output).to include_env_app_name(app_name)
466
+ expect(output).to include_env_request_headers
440
467
  end
441
468
 
442
469
  it "completes the installation" do
@@ -460,6 +487,7 @@ describe Appsignal::CLI::Install do
460
487
  expect(output).to include_file_config
461
488
  expect(config_file).to configure_app_name(app_name)
462
489
  expect(config_file).to configure_push_api_key(push_api_key)
490
+ expect(config_file).to configure_request_headers
463
491
  expect(config_file).to configure_environment("development")
464
492
  expect(config_file).to configure_environment("staging")
465
493
  expect(config_file).to configure_environment("production")
@@ -504,6 +532,7 @@ describe Appsignal::CLI::Install do
504
532
 
505
533
  expect(output).to include_env_push_api_key(push_api_key)
506
534
  expect(output).to include_env_app_name(app_name)
535
+ expect(output).to include_env_request_headers
507
536
  end
508
537
 
509
538
  it "completes the installation" do
@@ -527,6 +556,7 @@ describe Appsignal::CLI::Install do
527
556
  expect(output).to include_file_config
528
557
  expect(config_file).to configure_app_name(app_name)
529
558
  expect(config_file).to configure_push_api_key(push_api_key)
559
+ expect(config_file).to configure_request_headers
530
560
  expect(config_file).to configure_environment("development")
531
561
  expect(config_file).to configure_environment("staging")
532
562
  expect(config_file).to configure_environment("production")
@@ -571,6 +601,7 @@ describe Appsignal::CLI::Install do
571
601
 
572
602
  expect(output).to include_env_push_api_key(push_api_key)
573
603
  expect(output).to include_env_app_name(app_name)
604
+ expect(output).to include_env_request_headers
574
605
  end
575
606
 
576
607
  it "completes the installation" do
@@ -594,6 +625,7 @@ describe Appsignal::CLI::Install do
594
625
  expect(output).to include_file_config
595
626
  expect(config_file).to configure_app_name(app_name)
596
627
  expect(config_file).to configure_push_api_key(push_api_key)
628
+ expect(config_file).to configure_request_headers
597
629
  expect(config_file).to configure_environment("development")
598
630
  expect(config_file).to configure_environment("staging")
599
631
  expect(config_file).to configure_environment("production")
@@ -625,6 +657,7 @@ describe Appsignal::CLI::Install do
625
657
  "\e[31mWarning:\e[0m We could not detect which framework you are using."
626
658
  expect(output).to_not include_env_push_api_key
627
659
  expect(output).to_not include_env_app_name
660
+ expect(output).to_not include_env_request_headers
628
661
  expect(File.exist?(config_file_path)).to be_falsy
629
662
  end
630
663
  end