oneapm_rpm 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +30 -0
  3. data/.rubocop.yml +725 -0
  4. data/Gemfile +3 -0
  5. data/Guardfile +7 -0
  6. data/LICENSE +1 -0
  7. data/README.md +3 -0
  8. data/config/cert/cacert.pem +1177 -0
  9. data/config/database.yml +5 -0
  10. data/lib/initializers/goliath.rb +11 -0
  11. data/lib/initializers/other.rb +1 -0
  12. data/lib/initializers/rails.rb +15 -0
  13. data/lib/one_apm/agent.rb +253 -0
  14. data/lib/one_apm/agent/agent.rb +283 -0
  15. data/lib/one_apm/agent/agent/connect.rb +175 -0
  16. data/lib/one_apm/agent/agent/container_data_manager.rb +218 -0
  17. data/lib/one_apm/agent/agent/forkable_dispatcher_functions.rb +96 -0
  18. data/lib/one_apm/agent/agent/helpers.rb +45 -0
  19. data/lib/one_apm/agent/agent/start.rb +226 -0
  20. data/lib/one_apm/agent/agent/start_worker_thread.rb +148 -0
  21. data/lib/one_apm/agent/busy_calculator.rb +115 -0
  22. data/lib/one_apm/agent/cross_app/cross_app_monitor.rb +181 -0
  23. data/lib/one_apm/agent/cross_app/cross_app_tracing.rb +336 -0
  24. data/lib/one_apm/agent/database.rb +308 -0
  25. data/lib/one_apm/agent/database/active_record_helper.rb +80 -0
  26. data/lib/one_apm/agent/database/obfuscation_helpers.rb +76 -0
  27. data/lib/one_apm/agent/database/obfuscator.rb +78 -0
  28. data/lib/one_apm/agent/database/postgres_explain_obfuscator.rb +45 -0
  29. data/lib/one_apm/agent/datastores.rb +175 -0
  30. data/lib/one_apm/agent/datastores/metric_helper.rb +83 -0
  31. data/lib/one_apm/agent/datastores/mongo.rb +27 -0
  32. data/lib/one_apm/agent/datastores/mongo/metric_translator.rb +189 -0
  33. data/lib/one_apm/agent/datastores/mongo/obfuscator.rb +37 -0
  34. data/lib/one_apm/agent/datastores/mongo/statement_formatter.rb +51 -0
  35. data/lib/one_apm/agent/event/event_listener.rb +40 -0
  36. data/lib/one_apm/agent/event/event_loop.rb +191 -0
  37. data/lib/one_apm/agent/event/worker_loop.rb +97 -0
  38. data/lib/one_apm/agent/harvester.rb +48 -0
  39. data/lib/one_apm/agent/inbound_request_monitor.rb +30 -0
  40. data/lib/one_apm/agent/javascript_instrumentor.rb +186 -0
  41. data/lib/one_apm/agent/pipe/pipe_channel_manager.rb +275 -0
  42. data/lib/one_apm/agent/pipe/pipe_service.rb +81 -0
  43. data/lib/one_apm/agent/sampler.rb +55 -0
  44. data/lib/one_apm/agent/sampler_collection.rb +65 -0
  45. data/lib/one_apm/agent/samplers/cpu_sampler.rb +49 -0
  46. data/lib/one_apm/agent/samplers/delayed_job_sampler.rb +109 -0
  47. data/lib/one_apm/agent/samplers/memory_sampler.rb +144 -0
  48. data/lib/one_apm/agent/samplers/object_sampler.rb +22 -0
  49. data/lib/one_apm/agent/samplers/vm_sampler.rb +124 -0
  50. data/lib/one_apm/agent/synthetics_monitor.rb +48 -0
  51. data/lib/one_apm/agent/threading/agent_thread.rb +74 -0
  52. data/lib/one_apm/agent/threading/backtrace_node.rb +133 -0
  53. data/lib/one_apm/agent/threading/backtrace_service.rb +259 -0
  54. data/lib/one_apm/agent/threading/thread_profile.rb +155 -0
  55. data/lib/one_apm/collector/collector/helper.rb +139 -0
  56. data/lib/one_apm/collector/collector/http_connection.rb +254 -0
  57. data/lib/one_apm/collector/collector/server_methods.rb +71 -0
  58. data/lib/one_apm/collector/collector_service.rb +123 -0
  59. data/lib/one_apm/collector/commands/agent_command.rb +17 -0
  60. data/lib/one_apm/collector/commands/thread_profiler_session.rb +108 -0
  61. data/lib/one_apm/collector/commands/xray_session.rb +53 -0
  62. data/lib/one_apm/collector/commands/xray_session_collection.rb +156 -0
  63. data/lib/one_apm/collector/containers/agent_command_router.rb +153 -0
  64. data/lib/one_apm/collector/containers/custom_event_aggregator.rb +94 -0
  65. data/lib/one_apm/collector/containers/error_collector.rb +349 -0
  66. data/lib/one_apm/collector/containers/sql_sampler.rb +331 -0
  67. data/lib/one_apm/collector/containers/stats_engine.rb +34 -0
  68. data/lib/one_apm/collector/containers/transaction_event_aggregator.rb +249 -0
  69. data/lib/one_apm/collector/containers/transaction_sampler.rb +352 -0
  70. data/lib/one_apm/collector/containers/utilization_data.rb +36 -0
  71. data/lib/one_apm/collector/stats_engine/gc_profiler.rb +106 -0
  72. data/lib/one_apm/collector/stats_engine/metric_stats.rb +243 -0
  73. data/lib/one_apm/collector/stats_engine/stats_hash.rb +105 -0
  74. data/lib/one_apm/configuration.rb +429 -0
  75. data/lib/one_apm/configuration/autostart.rb +41 -0
  76. data/lib/one_apm/configuration/default_source.rb +1026 -0
  77. data/lib/one_apm/configuration/environment_source.rb +113 -0
  78. data/lib/one_apm/configuration/high_security_source.rb +56 -0
  79. data/lib/one_apm/configuration/manual_source.rb +13 -0
  80. data/lib/one_apm/configuration/server_source.rb +60 -0
  81. data/lib/one_apm/configuration/yaml_source.rb +134 -0
  82. data/lib/one_apm/errors/agent_errors.rb +26 -0
  83. data/lib/one_apm/errors/internal_agent_error.rb +16 -0
  84. data/lib/one_apm/errors/noticed_error.rb +79 -0
  85. data/lib/one_apm/frameworks/external.rb +15 -0
  86. data/lib/one_apm/frameworks/rails.rb +103 -0
  87. data/lib/one_apm/frameworks/rails3.rb +37 -0
  88. data/lib/one_apm/frameworks/rails4.rb +21 -0
  89. data/lib/one_apm/frameworks/ruby.rb +21 -0
  90. data/lib/one_apm/frameworks/sinatra.rb +12 -0
  91. data/lib/one_apm/inst/3rd/active_merchant.rb +35 -0
  92. data/lib/one_apm/inst/3rd/acts_as_solr.rb +70 -0
  93. data/lib/one_apm/inst/3rd/authlogic.rb +23 -0
  94. data/lib/one_apm/inst/3rd/sunspot.rb +31 -0
  95. data/lib/one_apm/inst/background_job/active_job.rb +88 -0
  96. data/lib/one_apm/inst/background_job/delayed_job.rb +52 -0
  97. data/lib/one_apm/inst/background_job/delayed_job_injection.rb +8 -0
  98. data/lib/one_apm/inst/background_job/resque.rb +107 -0
  99. data/lib/one_apm/inst/background_job/sidekiq.rb +64 -0
  100. data/lib/one_apm/inst/dispatcher/passenger.rb +25 -0
  101. data/lib/one_apm/inst/dispatcher/rainbows.rb +23 -0
  102. data/lib/one_apm/inst/framework/grape.rb +94 -0
  103. data/lib/one_apm/inst/framework/padrino.rb +30 -0
  104. data/lib/one_apm/inst/framework/sinatra.rb +185 -0
  105. data/lib/one_apm/inst/framework/sinatra/ignorer.rb +50 -0
  106. data/lib/one_apm/inst/framework/sinatra/transaction_namer.rb +54 -0
  107. data/lib/one_apm/inst/http_clients/curb.rb +189 -0
  108. data/lib/one_apm/inst/http_clients/excon.rb +70 -0
  109. data/lib/one_apm/inst/http_clients/excon/connection.rb +31 -0
  110. data/lib/one_apm/inst/http_clients/excon/middleware.rb +55 -0
  111. data/lib/one_apm/inst/http_clients/httpclient.rb +44 -0
  112. data/lib/one_apm/inst/http_clients/net.rb +34 -0
  113. data/lib/one_apm/inst/http_clients/typhoeus.rb +76 -0
  114. data/lib/one_apm/inst/nosql/memcache.rb +134 -0
  115. data/lib/one_apm/inst/nosql/mongo.rb +126 -0
  116. data/lib/one_apm/inst/nosql/mongo_moped.rb +85 -0
  117. data/lib/one_apm/inst/nosql/redis.rb +83 -0
  118. data/lib/one_apm/inst/orm/active_record.rb +99 -0
  119. data/lib/one_apm/inst/orm/active_record_4.rb +28 -0
  120. data/lib/one_apm/inst/orm/data_mapper.rb +180 -0
  121. data/lib/one_apm/inst/orm/sequel.rb +47 -0
  122. data/lib/one_apm/inst/rack.rb +38 -0
  123. data/lib/one_apm/inst/rack/rack.rb +44 -0
  124. data/lib/one_apm/inst/rack/rack_builder.rb +51 -0
  125. data/lib/one_apm/inst/rails/action_controller.rb +118 -0
  126. data/lib/one_apm/inst/rails/action_web_service.rb +44 -0
  127. data/lib/one_apm/inst/rails/errors.rb +43 -0
  128. data/lib/one_apm/inst/rails3/action_controller.rb +172 -0
  129. data/lib/one_apm/inst/rails3/errors.rb +43 -0
  130. data/lib/one_apm/inst/rails4/action_controller.rb +27 -0
  131. data/lib/one_apm/inst/rails4/action_controller_subscriber.rb +121 -0
  132. data/lib/one_apm/inst/rails4/action_view.rb +23 -0
  133. data/lib/one_apm/inst/rails4/action_view_subscriber.rb +93 -0
  134. data/lib/one_apm/inst/rails4/active_record_subscriber.rb +96 -0
  135. data/lib/one_apm/inst/rails4/errors.rb +42 -0
  136. data/lib/one_apm/inst/rails_middleware.rb +40 -0
  137. data/lib/one_apm/inst/support/evented_subscriber.rb +98 -0
  138. data/lib/one_apm/inst/support/ignore_actions.rb +39 -0
  139. data/lib/one_apm/inst/support/queue_time.rb +76 -0
  140. data/lib/one_apm/inst/transaction_base.rb +405 -0
  141. data/lib/one_apm/logger/agent_logger.rb +206 -0
  142. data/lib/one_apm/logger/audit_logger.rb +78 -0
  143. data/lib/one_apm/logger/memory_logger.rb +50 -0
  144. data/lib/one_apm/logger/null_logger.rb +19 -0
  145. data/lib/one_apm/metrics/metric_data.rb +72 -0
  146. data/lib/one_apm/metrics/metric_spec.rb +82 -0
  147. data/lib/one_apm/metrics/stats.rb +173 -0
  148. data/lib/one_apm/probe.rb +16 -0
  149. data/lib/one_apm/probe/framework_loader.rb +53 -0
  150. data/lib/one_apm/probe/instance_methods.rb +105 -0
  151. data/lib/one_apm/probe/instrumentation.rb +60 -0
  152. data/lib/one_apm/rack/browser_monitoring.rb +144 -0
  153. data/lib/one_apm/rack/middleware_base.rb +27 -0
  154. data/lib/one_apm/rack/middleware_hooks.rb +17 -0
  155. data/lib/one_apm/rack/middleware_tracing.rb +81 -0
  156. data/lib/one_apm/rack/middleware_wrapper.rb +86 -0
  157. data/lib/one_apm/support/chained_call.rb +15 -0
  158. data/lib/one_apm/support/coerce.rb +81 -0
  159. data/lib/one_apm/support/collection_helper.rb +79 -0
  160. data/lib/one_apm/support/dotted_hash.rb +45 -0
  161. data/lib/one_apm/support/encoders.rb +34 -0
  162. data/lib/one_apm/support/environment_report.rb +127 -0
  163. data/lib/one_apm/support/event_buffer.rb +82 -0
  164. data/lib/one_apm/support/event_buffer/sampled_buffer.rb +45 -0
  165. data/lib/one_apm/support/event_buffer/sized_buffer.rb +21 -0
  166. data/lib/one_apm/support/event_buffer/synthetics_event_buffer.rb +40 -0
  167. data/lib/one_apm/support/helper.rb +49 -0
  168. data/lib/one_apm/support/hostname.rb +13 -0
  169. data/lib/one_apm/support/http_clients/curb_wrappers.rb +65 -0
  170. data/lib/one_apm/support/http_clients/excon_wrappers.rb +63 -0
  171. data/lib/one_apm/support/http_clients/httpclient_wrappers.rb +61 -0
  172. data/lib/one_apm/support/http_clients/net_http_wrappers.rb +48 -0
  173. data/lib/one_apm/support/http_clients/typhoeus_wrappers.rb +73 -0
  174. data/lib/one_apm/support/http_clients/uri_util.rb +39 -0
  175. data/lib/one_apm/support/json_marshaller.rb +68 -0
  176. data/lib/one_apm/support/json_wrapper.rb +130 -0
  177. data/lib/one_apm/support/language_support.rb +142 -0
  178. data/lib/one_apm/support/library_detection.rb +119 -0
  179. data/lib/one_apm/support/local_environment.rb +196 -0
  180. data/lib/one_apm/support/marshaller.rb +62 -0
  181. data/lib/one_apm/support/method_tracer.rb +334 -0
  182. data/lib/one_apm/support/method_tracer/helpers.rb +92 -0
  183. data/lib/one_apm/support/method_tracer/traced_method_stack.rb +103 -0
  184. data/lib/one_apm/support/obfuscator.rb +47 -0
  185. data/lib/one_apm/support/okjson.rb +601 -0
  186. data/lib/one_apm/support/parameter_filtering.rb +35 -0
  187. data/lib/one_apm/support/rules_engine.rb +56 -0
  188. data/lib/one_apm/support/rules_engine/replacement_rule.rb +80 -0
  189. data/lib/one_apm/support/rules_engine/segment_terms_rule.rb +46 -0
  190. data/lib/one_apm/support/server.rb +11 -0
  191. data/lib/one_apm/support/supported_versions.rb +257 -0
  192. data/lib/one_apm/support/system_info.rb +211 -0
  193. data/lib/one_apm/support/timer_lib.rb +29 -0
  194. data/lib/one_apm/support/version_number.rb +51 -0
  195. data/lib/one_apm/support/vm.rb +30 -0
  196. data/lib/one_apm/support/vm/jruby_vm.rb +38 -0
  197. data/lib/one_apm/support/vm/monotonic_gc_profiler.rb +43 -0
  198. data/lib/one_apm/support/vm/mri_vm.rb +85 -0
  199. data/lib/one_apm/support/vm/rubinius_vm.rb +129 -0
  200. data/lib/one_apm/support/vm/snapshot.rb +18 -0
  201. data/lib/one_apm/transaction.rb +336 -0
  202. data/lib/one_apm/transaction/class_methods.rb +132 -0
  203. data/lib/one_apm/transaction/instance_helpers.rb +82 -0
  204. data/lib/one_apm/transaction/metric_constants.rb +42 -0
  205. data/lib/one_apm/transaction/sample_buffer/force_persist_sample_buffer.rb +21 -0
  206. data/lib/one_apm/transaction/sample_buffer/slowest_sample_buffer.rb +21 -0
  207. data/lib/one_apm/transaction/sample_buffer/synthetics_sample_buffer.rb +21 -0
  208. data/lib/one_apm/transaction/sample_buffer/transaction_sample_buffer.rb +101 -0
  209. data/lib/one_apm/transaction/sample_buffer/xray_sample_buffer.rb +60 -0
  210. data/lib/one_apm/transaction/segment.rb +193 -0
  211. data/lib/one_apm/transaction/segment_summary.rb +51 -0
  212. data/lib/one_apm/transaction/thread_local_access.rb +73 -0
  213. data/lib/one_apm/transaction/transaction_analysis.rb +78 -0
  214. data/lib/one_apm/transaction/transaction_apdex.rb +20 -0
  215. data/lib/one_apm/transaction/transaction_cpu.rb +22 -0
  216. data/lib/one_apm/transaction/transaction_finish_append.rb +67 -0
  217. data/lib/one_apm/transaction/transaction_ignore.rb +33 -0
  218. data/lib/one_apm/transaction/transaction_jruby_functions.rb +40 -0
  219. data/lib/one_apm/transaction/transaction_metrics.rb +53 -0
  220. data/lib/one_apm/transaction/transaction_name.rb +90 -0
  221. data/lib/one_apm/transaction/transaction_namer.rb +49 -0
  222. data/lib/one_apm/transaction/transaction_sample.rb +204 -0
  223. data/lib/one_apm/transaction/transaction_sample_builder.rb +168 -0
  224. data/lib/one_apm/transaction/transaction_state.rb +149 -0
  225. data/lib/one_apm/transaction/transaction_summary.rb +28 -0
  226. data/lib/one_apm/transaction/transaction_synthetics.rb +40 -0
  227. data/lib/one_apm/transaction/transaction_timings.rb +54 -0
  228. data/lib/one_apm/version.rb +13 -0
  229. data/lib/oneapm_rpm.rb +16 -0
  230. data/lib/sequel/extensions/oneapm_instrumentation.rb +84 -0
  231. data/lib/sequel/plugins/oneapm_instrumentation.rb +66 -0
  232. data/oneapm.yml +135 -0
  233. data/oneapm_rpm.gemspec +58 -0
  234. metadata +474 -0
@@ -0,0 +1,41 @@
1
+ # encoding: utf-8
2
+
3
+ module OneApm
4
+ module Configuration
5
+ module Autostart
6
+ extend self
7
+
8
+ def agent_should_start?
9
+ !blacklisted_constants? &&
10
+ !blacklisted_executables? &&
11
+ !in_blacklisted_rake_task?
12
+ end
13
+
14
+ def blacklisted_constants?
15
+ blacklisted?(OneApm::Agent.config[:'autostart.blacklisted_constants']) do |name|
16
+ OneApm::LanguageSupport.constant_is_defined?(name)
17
+ end
18
+ end
19
+
20
+ def blacklisted_executables?
21
+ blacklisted?(OneApm::Agent.config[:'autostart.blacklisted_executables']) do |bin|
22
+ File.basename($0) == bin
23
+ end
24
+ end
25
+
26
+ def blacklisted?(value, &block)
27
+ value.split(/\s*,\s*/).any?(&block)
28
+ end
29
+
30
+ def in_blacklisted_rake_task?
31
+ tasks = begin
32
+ ::Rake.application.top_level_tasks
33
+ rescue => e
34
+ ::OneApm::Agent.logger.debug("Not in Rake environment so skipping blacklisted_rake_tasks check: #{e}")
35
+ []
36
+ end
37
+ !(tasks & ::OneApm::Agent.config[:'autostart.blacklisted_rake_tasks'].split(/\s*,\s*/)).empty?
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,1026 @@
1
+ # encoding: utf-8
2
+
3
+ module OneApm
4
+ module Configuration
5
+
6
+ # Helper since default Procs are evaluated in the context of this module
7
+ def self.value_of(key)
8
+ Proc.new do
9
+ OneApm::Agent.config[key]
10
+ end
11
+ end
12
+
13
+ class Boolean; end
14
+
15
+ class DefaultSource
16
+ attr_reader :defaults
17
+
18
+ extend Forwardable
19
+ def_delegators :@defaults, :has_key?, :each, :merge, :delete, :keys, :[], :to_hash
20
+
21
+ def initialize
22
+ @defaults = default_values
23
+ end
24
+
25
+ def default_values
26
+ result = {}
27
+ ::OneApm::Configuration::DEFAULTS.each do |key, value|
28
+ result[key] = value[:default]
29
+ end
30
+ result
31
+ end
32
+
33
+ def self.transform_for(key)
34
+ default_settings = ::OneApm::Configuration::DEFAULTS[key]
35
+ default_settings[:transform] if default_settings
36
+ end
37
+
38
+ def self.config_search_paths
39
+ Proc.new {
40
+ paths = [File.join(OneApm::Probe.instance.root, "config", "oneapm.yml")]
41
+
42
+ # JRuby war
43
+ if ENV["GEM_HOME"] && ENV["GEM_HOME"].end_with?(".jar!")
44
+ app_name = File.basename(ENV["GEM_HOME"], ".jar!")
45
+ paths << File.join(ENV["GEM_HOME"], app_name, "config", "oneapm.yml")
46
+ end
47
+
48
+ paths
49
+ }
50
+ end
51
+
52
+ def self.config_path
53
+ Proc.new {
54
+ found_path = OneApm::Agent.config[:config_search_paths].detect do |file|
55
+ File.expand_path(file) if File.exists? file
56
+ end
57
+ found_path || ""
58
+ }
59
+ end
60
+
61
+ def self.framework
62
+ Proc.new {
63
+ case
64
+ when defined?(::OneApm::TEST) then :test
65
+ when defined?(::Rails::VERSION)
66
+ case Rails::VERSION::MAJOR
67
+ when 0..2
68
+ :rails
69
+ when 3
70
+ :rails3
71
+ when 4
72
+ :rails4
73
+ else
74
+ ::OneApm::Agent.logger.error "Detected unsupported Rails version #{Rails::VERSION::STRING}"
75
+ end
76
+ when defined?(::Sinatra) && defined?(::Sinatra::Base) then :sinatra
77
+ when defined?(::OneApm::IA) then :external
78
+ else :ruby
79
+ end
80
+ }
81
+ end
82
+
83
+ def self.agent_enabled
84
+ Proc.new {
85
+ OneApm::Agent.config[:enabled] &&
86
+ OneApm::Agent.config[:monitor_mode] &&
87
+ OneApm::Configuration::Autostart.agent_should_start?
88
+ }
89
+ end
90
+
91
+ def self.audit_log_path
92
+ Proc.new {
93
+ File.join(OneApm::Agent.config[:log_file_path], 'oneapm_audit.log')
94
+ }
95
+ end
96
+
97
+ def self.app_name
98
+ Proc.new { OneApm::Probe.instance.env }
99
+ end
100
+
101
+ def self.dispatcher
102
+ Proc.new { OneApm::Probe.instance.local_env.discovered_dispatcher }
103
+ end
104
+
105
+ def self.marshaller
106
+ Proc.new { OneApm::Support::JsonMarshaller.is_supported? ? 'json' : 'pruby' }
107
+ end
108
+
109
+ # On Rubies with string encodings support (1.9.x+), default to always
110
+ # normalize encodings since it's safest and fast. Without that support
111
+ # the conversions are too expensive, so only enable if overridden to.
112
+ def self.normalize_json_string_encodings
113
+ Proc.new { OneApm::LanguageSupport.supports_string_encodings? }
114
+ end
115
+
116
+ def self.thread_profiler_enabled
117
+ Proc.new { OneApm::Agent::Threading::BacktraceService.is_supported? }
118
+ end
119
+
120
+ # This check supports the js_errors_beta key we've asked clients to
121
+ # set. Once JS errors are GA, browser_monitoring.loader can stop
122
+ # being dynamic.
123
+ def self.browser_monitoring_loader
124
+ Proc.new { OneApm::Agent.config[:js_errors_beta] ? "full" : "rum"}
125
+ end
126
+
127
+ def self.transaction_tracer_transaction_threshold
128
+ Proc.new { OneApm::Agent.config[:apdex_t] * 4 }
129
+ end
130
+
131
+ def self.port
132
+ Proc.new { OneApm::Agent.config[:ssl] ? 443 : 80 }
133
+ end
134
+
135
+ def self.rules_ignore
136
+ Proc.new do |rules|
137
+ rules = convert_to_list(rules)
138
+
139
+ rules.map do |rule|
140
+ /#{rule}/
141
+ end
142
+ end
143
+ end
144
+
145
+ def self.convert_to_list(value)
146
+ case value
147
+ when String
148
+ value.split(',')
149
+ when Array
150
+ value
151
+ else
152
+ raise ArgumentError.new("Config value '#{value}' couldn't be turned into a list.")
153
+ end
154
+ end
155
+ end
156
+
157
+ AUTOSTART_BLACKLISTED_RAKE_TASKS = [
158
+ 'about',
159
+ 'assets:clean',
160
+ 'assets:clobber',
161
+ 'assets:environment',
162
+ 'assets:precompile',
163
+ 'assets:precompile:all',
164
+ 'db:create',
165
+ 'db:drop',
166
+ 'db:fixtures:load',
167
+ 'db:migrate',
168
+ 'db:migrate:status',
169
+ 'db:rollback',
170
+ 'db:schema:cache:clear',
171
+ 'db:schema:cache:dump',
172
+ 'db:schema:dump',
173
+ 'db:schema:load',
174
+ 'db:seed',
175
+ 'db:setup',
176
+ 'db:structure:dump',
177
+ 'db:version',
178
+ 'doc:app',
179
+ 'log:clear',
180
+ 'middleware',
181
+ 'notes',
182
+ 'notes:custom',
183
+ 'rails:template',
184
+ 'rails:update',
185
+ 'routes',
186
+ 'secret',
187
+ 'spec',
188
+ 'spec:features',
189
+ 'spec:requests',
190
+ 'spec:controllers',
191
+ 'spec:helpers',
192
+ 'spec:models',
193
+ 'spec:views',
194
+ 'spec:routing',
195
+ 'spec:rcov',
196
+ 'stats',
197
+ 'test',
198
+ 'test:all',
199
+ 'test:all:db',
200
+ 'test:recent',
201
+ 'test:single',
202
+ 'test:uncommitted',
203
+ 'time:zones:all',
204
+ 'tmp:clear',
205
+ 'tmp:create'
206
+ ].join(',').freeze
207
+
208
+ DEFAULTS = {
209
+ :license_key => {
210
+ :default => '',
211
+ :public => true,
212
+ :type => String,
213
+ :description => 'Your OneApm license key.'
214
+ },
215
+ :agent_enabled => {
216
+ :default => DefaultSource.agent_enabled,
217
+ :public => true,
218
+ :type => Boolean,
219
+ :description => 'Enable or disable the agent.'
220
+ },
221
+ :enabled => {
222
+ :default => true,
223
+ :public => false,
224
+ :type => Boolean,
225
+ :aliases => [:enable],
226
+ :description => 'Enable or disable the agent.'
227
+ },
228
+ :app_name => {
229
+ :default => DefaultSource.app_name,
230
+ :public => true,
231
+ :type => String,
232
+ :description => 'Semicolon-delimited list of Naming your application.'
233
+ },
234
+ :monitor_mode => {
235
+ :default => value_of(:enabled),
236
+ :public => true,
237
+ :type => Boolean,
238
+ :description => 'Enable or disable the transmission of data to the OneApm collector).'
239
+ },
240
+ :log_level => {
241
+ :default => 'info',
242
+ :public => true,
243
+ :type => String,
244
+ :description => 'Log level for agent logging: error, warn, info or debug.'
245
+ },
246
+ :high_security => {
247
+ :default => false,
248
+ :public => true,
249
+ :type => Boolean,
250
+ :description => 'Enable or disable high security mode, a suite of security features designed to protect data in an enterprise setting.'
251
+ },
252
+ :ssl => {
253
+ :default => true,
254
+ :allow_nil => true,
255
+ :public => true,
256
+ :type => Boolean,
257
+ :description => 'Enable or disable SSL for transmissions to the OneApm collector). Defaults to true'
258
+ },
259
+ :proxy_host => {
260
+ :default => nil,
261
+ :allow_nil => true,
262
+ :public => true,
263
+ :type => String,
264
+ :description => 'Defines a host for communicating with OneApm via a proxy server.'
265
+ },
266
+ :proxy_port => {
267
+ :default => nil,
268
+ :allow_nil => true,
269
+ :public => true,
270
+ :type => Fixnum,
271
+ :description => 'Defines a port for communicating with OneApm via a proxy server.'
272
+ },
273
+ :proxy_user => {
274
+ :default => nil,
275
+ :allow_nil => true,
276
+ :public => true,
277
+ :type => String,
278
+ :local_only => true,
279
+ :description => 'Defines a user for communicating with OneApm via a proxy server.'
280
+ },
281
+ :proxy_pass => {
282
+ :default => nil,
283
+ :allow_nil => true,
284
+ :public => true,
285
+ :type => String,
286
+ :local_only => true,
287
+ :description => 'Defines a password for communicating with OneApm via a proxy server.'
288
+ },
289
+ :capture_params => {
290
+ :default => false,
291
+ :public => true,
292
+ :type => Boolean,
293
+ :description => 'Enable or disable the capture of HTTP request parameters to be attached to transaction traces and traced errors.'
294
+ },
295
+ :config_path => {
296
+ :default => DefaultSource.config_path,
297
+ :public => true,
298
+ :type => String,
299
+ :description => 'Path to <b>oneapm.yml</b>. When omitted the agent will check (in order) <b>config/oneapm.yml</b>, <b>oneapm.yml</b>, <b>$HOME/.oneapm/oneapm.yml</b> and <b>$HOME/oneapm.yml</b>.'
300
+ },
301
+ :config_search_paths => {
302
+ :default => DefaultSource.config_search_paths,
303
+ :public => false,
304
+ :type => Array,
305
+ :description => "An array of candidate locations for the agent's configuration file."
306
+ },
307
+ :dispatcher => {
308
+ :default => DefaultSource.dispatcher,
309
+ :public => false,
310
+ :type => Symbol,
311
+ :description => 'Autodetected application component that reports metrics to OneApm.'
312
+ },
313
+ :framework => {
314
+ :default => DefaultSource.framework,
315
+ :public => false,
316
+ :type => Symbol,
317
+ :description => 'Autodetected application framework used to enable framework-specific functionality.'
318
+ },
319
+ :'autostart.blacklisted_constants' => {
320
+ :default => 'Rails::Console',
321
+ :public => true,
322
+ :type => String,
323
+ :description => 'Defines a comma-delimited list of constants. When these constants are present, the agent will not start automatically (e.g. \'Rails::Console, UninstrumentedBackgroundJob\').'
324
+ },
325
+ :'autostart.blacklisted_executables' => {
326
+ :default => 'irb,rspec',
327
+ :public => true,
328
+ :type => String,
329
+ :description => 'Defines a comma-delimited list of executables that should not be instrumented by the agent (e.g. \'rake,my_ruby_script.rb\').'
330
+ },
331
+ :'autostart.blacklisted_rake_tasks' => {
332
+ :default => AUTOSTART_BLACKLISTED_RAKE_TASKS,
333
+ :public => true,
334
+ :type => String,
335
+ :description => 'Defines a comma-delimited list of rake tasks that should not be instrumented by the agent (e.g. \'assets:precompile,db:migrate\').'
336
+ },
337
+ :apdex_t => {
338
+ :default => 0.5,
339
+ :public => true,
340
+ :type => Float,
341
+ :deprecated => true,
342
+ :description => 'Apdex score, Apdex T is the threshold at which OneApm will begin alerting. By default the agent will send alerts when the Apdex score drops below 0.5, or when more than half of users are experiencing degraded application performance.'
343
+ },
344
+ :'strip_exception_messages.enabled' => {
345
+ :default => value_of(:high_security),
346
+ :public => true,
347
+ :type => Boolean,
348
+ :description => 'Defines whether the agent should strip messages from all exceptions that are not specified in the whitelist. Enabled automatically in high security mode.'
349
+ },
350
+ :'strip_exception_messages.whitelist' => {
351
+ :default => '',
352
+ :public => true,
353
+ :type => String,
354
+ :description => 'Defines a comma-delimited list of exceptions from which the agent will not strip messages when strip_exception_messages is enabled (such as \'ImportantException, PreserveMessageException\').'
355
+ },
356
+ :host => {
357
+ :default => 'tpm.oneapm.com',
358
+ :public => false,
359
+ :type => String,
360
+ :description => "URI for the OneApm data collection service."
361
+ },
362
+ :port => {
363
+ :default => DefaultSource.port,
364
+ :public => false,
365
+ :type => Fixnum,
366
+ :description => 'Port for the OneApm data collection service.'
367
+ },
368
+ :sync_startup => {
369
+ :default => false,
370
+ :public => true,
371
+ :type => Boolean,
372
+ :description => 'Enable or disable synchronous connection to the OneApm data collection service during application startup.'
373
+ },
374
+ :send_data_on_exit => {
375
+ :default => true,
376
+ :public => true,
377
+ :type => Boolean,
378
+ :description => 'Enable or disable the exit handler that sends data to the OneApm collector) before shutting down.'
379
+ },
380
+ :post_size_limit => {
381
+ :default => 2 * 1024 * 1024, # 2MB
382
+ :public => false,
383
+ :type => Fixnum,
384
+ :description => 'Maximum number of bytes to send to the OneApm data collection service.'
385
+ },
386
+ :timeout => {
387
+ :default => 2 * 60, # 2 minutes
388
+ :public => true,
389
+ :type => Fixnum,
390
+ :description => 'Maximum number of seconds to attempt to contact the OneApm collector).'
391
+ },
392
+ :force_send => {
393
+ :default => false,
394
+ :public => false,
395
+ :type => Boolean,
396
+ :description => 'Enable or disable the forced sending of data to the OneApm data collection service when shutting down.'
397
+ },
398
+ :send_environment_info => {
399
+ :default => true,
400
+ :public => false,
401
+ :type => Boolean,
402
+ :description => 'Enable or disable transmission of application environment information to the OneApm data collection service.'
403
+ },
404
+ :'resque.use_harvest_lock' => {
405
+ :default => false,
406
+ :public => true,
407
+ :type => Boolean,
408
+ :description => 'Enable or disable synchronizing Resque job forking with OneApm\'s harvest thread. The default is false. This helps prevent Resque jobs from deadlocking, but prevents OneApm from starting new jobs during harvest.'
409
+ },
410
+ :data_report_period => {
411
+ :default => 60,
412
+ :public => false,
413
+ :type => Fixnum,
414
+ :description => 'Number of seconds betwixt connections to the OneApm data collection service. Note that transaction events have a separate report period, specified by data_report_periods.analytic_event_data.'
415
+ },
416
+ :'data_report_periods.analytic_event_data' => {
417
+ :default => 60,
418
+ :public => false,
419
+ :type => Fixnum,
420
+ :dynamic_name => true,
421
+ :description => 'Number of seconds between connections to the OneApm data collection service for sending transaction event data.'
422
+ },
423
+ :keep_retrying => {
424
+ :default => true,
425
+ :public => false,
426
+ :type => Boolean,
427
+ :deprecated => true,
428
+ :description => 'Enable or disable retrying failed connections to the OneApm data collection service.'
429
+ },
430
+ :force_reconnect => {
431
+ :default => false,
432
+ :public => false,
433
+ :type => Boolean,
434
+ :description => 'Force a new connection to the server before running the worker loop. Creates a separate agent run and is recorded as a separate instance by the OneApm data collection service.'
435
+ },
436
+ :report_instance_busy => {
437
+ :default => true,
438
+ :public => false,
439
+ :type => Boolean,
440
+ :description => 'Enable or disable transmission of metrics recording the percentage of time application instances spend servicing requests (duty cycle metrics).'
441
+ },
442
+ :log_file_name => {
443
+ :default => 'oneapm_agent.log',
444
+ :public => true,
445
+ :type => String,
446
+ :description => 'Defines a name for the log file.'
447
+ },
448
+ :log_file_path => {
449
+ :default => 'log/',
450
+ :public => true,
451
+ :type => String,
452
+ :description => 'Defines a path to the agent log file, excluding the filename.'
453
+ },
454
+ :'audit_log.enabled' => {
455
+ :default => false,
456
+ :public => true,
457
+ :type => Boolean,
458
+ :description => 'Enable or disable the audit log, a log of communications with the OneApm collector).'
459
+ },
460
+ :'audit_log.path' => {
461
+ :default => DefaultSource.audit_log_path,
462
+ :public => true,
463
+ :type => String,
464
+ :description => 'Specifies a path to the audit log file (including the filename).'
465
+ },
466
+ :disable_samplers => {
467
+ :default => false,
468
+ :public => true,
469
+ :type => Boolean,
470
+ :description => 'Enable or disable the collection of sampler metrics. Sampler metrics are metrics that are not event-based (such as CPU time or memory usage).'
471
+ },
472
+ :disable_resque => {
473
+ :default => false,
474
+ :public => true,
475
+ :type => Boolean,
476
+ :description => 'Enable or disable Resque instrumentation.'
477
+ },
478
+ :disable_sidekiq => {
479
+ :default => false,
480
+ :public => true,
481
+ :type => Boolean,
482
+ :description => 'Enable or disable Sidekiq instrumentation.'
483
+ },
484
+ :disable_dj => {
485
+ :default => false,
486
+ :public => true,
487
+ :type => Boolean,
488
+ :description => 'Enable or disable Delayed::Job instrumentation.'
489
+ },
490
+ :disable_sinatra => {
491
+ :default => false,
492
+ :public => true,
493
+ :type => Boolean,
494
+ :description => 'Enable or disable Sinatra instrumentation.'
495
+ },
496
+ :disable_sinatra_auto_middleware => {
497
+ :default => false,
498
+ :public => true,
499
+ :type => Boolean,
500
+ :description => 'Enable or disable agent middleware for Sinatra. This middleware is responsible for Sinatra advanced feature support; for example, cross application tracing, page load timing (sometimes referred to as real user monitoring or RUM), and error collection.'
501
+ },
502
+ :disable_view_instrumentation => {
503
+ :default => false,
504
+ :public => true,
505
+ :type => Boolean,
506
+ :description => 'Enable or disable view instrumentation.'
507
+ },
508
+ :disable_backtrace_cleanup => {
509
+ :default => false,
510
+ :public => true,
511
+ :type => Boolean,
512
+ :description => 'Defines whether the agent will remove oneapm_rpm from backtraces.'
513
+ },
514
+ :disable_harvest_thread => {
515
+ :default => false,
516
+ :public => false,
517
+ :type => Boolean,
518
+ :description => 'Enable or disable the harvest thread.'
519
+ },
520
+ :disable_activerecord => {
521
+ :default => false,
522
+ :public => true,
523
+ :type => Boolean,
524
+ :description => 'Enable or disable active record instrumentation.'
525
+ },
526
+ :disable_activejob => {
527
+ :default => false,
528
+ :public => true,
529
+ :type => Boolean,
530
+ :dynamic_name => true,
531
+ :description => 'Enable or disable ActiveJob instrumentation.'
532
+ },
533
+ :disable_memcache => {
534
+ :default => false,
535
+ :public => true,
536
+ :type => Boolean,
537
+ :description => 'Enable or disable memcache instrumentation.'
538
+ },
539
+ :disable_redis => {
540
+ :default => false,
541
+ :public => true,
542
+ :type => Boolean,
543
+ :description => 'Enable or disable redis instrumentation.'
544
+ },
545
+ :disable_gc_profiler => {
546
+ :default => false,
547
+ :public => true,
548
+ :type => Boolean,
549
+ :description => 'Enable or disable the use of GC::Profiler to measure time spent in garbage collection'
550
+ },
551
+ :'sidekiq.capture_params' => {
552
+ :default => false,
553
+ :public => true,
554
+ :type => Boolean,
555
+ :description => 'Enable or disable the capture of job arguments for transaction traces and traced errors in Sidekiq.'
556
+ },
557
+ :'resque.capture_params' => {
558
+ :default => false,
559
+ :public => true,
560
+ :type => Boolean,
561
+ :description => 'Enable or disable the capture of job arguments for transaction traces and traced errors in Resque.'
562
+ },
563
+ :capture_memcache_keys => {
564
+ :default => false,
565
+ :public => true,
566
+ :type => Boolean,
567
+ :description => 'Enable or disable the capture of memcache keys from transaction traces.'
568
+ },
569
+ :'transaction_tracer.enabled' => {
570
+ :default => true,
571
+ :public => true,
572
+ :type => Boolean,
573
+ :description => 'Enable or disable transaction traces.'
574
+ },
575
+ :'transaction_tracer.transaction_threshold' => {
576
+ :default => DefaultSource.transaction_tracer_transaction_threshold,
577
+ :public => true,
578
+ :type => Float,
579
+ :description => 'The agent will collect traces for transactions that exceed this time threshold (in seconds). Specify a float value or apdex_f.'
580
+ },
581
+ :'transaction_tracer.record_sql' => {
582
+ :default => 'obfuscated',
583
+ :public => true,
584
+ :type => String,
585
+ :description => 'Obfuscation level for SQL queries reported in transaction trace segments. Valid options are obfuscated, raw, none.'
586
+ },
587
+ :'transaction_tracer.capture_attributes' => {
588
+ :default => true,
589
+ :public => true,
590
+ :type => Boolean,
591
+ :description => 'Enable or disable collection of custom attributes on transaction traces.'
592
+ },
593
+ :'transaction_tracer.explain_threshold' => {
594
+ :default => 0.5,
595
+ :public => true,
596
+ :type => Float,
597
+ :description => 'Threshold (in seconds) above which the agent will collect explain plans. Relevant only when explain_enabled is true.'
598
+ },
599
+ :'transaction_tracer.explain_enabled' => {
600
+ :default => true,
601
+ :public => true,
602
+ :type => Boolean,
603
+ :description => 'Enable or disable the collection of explain plans in transaction traces. This setting will also apply to explain plans in Slow SQL traces if slow_sql.explain_enabled is not set separately.'
604
+ },
605
+ :'transaction_tracer.stack_trace_threshold' => {
606
+ :default => 0.5,
607
+ :public => true,
608
+ :type => Float,
609
+ :description => 'Stack traces will be included in transaction trace segments when their duration exceeds this threshold.'
610
+ },
611
+ :'transaction_tracer.limit_segments' => {
612
+ :default => 4000,
613
+ :public => true,
614
+ :type => Fixnum,
615
+ :description => 'Maximum number of transaction trace segments to record in a single transaction trace.'
616
+ },
617
+ :disable_sequel_instrumentation => {
618
+ :default => false,
619
+ :public => true,
620
+ :type => Boolean,
621
+ :description => 'Enable or disable Sequel instrumentation.'
622
+ },
623
+ :disable_mongo => {
624
+ :default => false,
625
+ :public => true,
626
+ :type => Boolean,
627
+ :dynamic_name => true,
628
+ :description => 'Defines whether the agent will install instrumentation for the Mongo gem.'
629
+ },
630
+ :disable_mongo_moped => {
631
+ :default => false,
632
+ :public => true,
633
+ :type => Boolean,
634
+ :dynamic_name => true,
635
+ :description => 'Defines whether the agent will install instrumentation for the Mongoid Moped gem.'
636
+ },
637
+ :'slow_sql.enabled' => {
638
+ :default => value_of(:'transaction_tracer.enabled'),
639
+ :public => true,
640
+ :type => Boolean,
641
+ :description => 'Enable or disable collection of slow SQL queries.'
642
+ },
643
+ :'slow_sql.explain_threshold' => {
644
+ :default => value_of(:'transaction_tracer.explain_threshold'),
645
+ :public => true,
646
+ :type => Float,
647
+ :description => 'Defines a duration threshold, over which the agent will collect explain plans in slow SQL queries.'
648
+ },
649
+ :'slow_sql.explain_enabled' => {
650
+ :default => value_of(:'transaction_tracer.explain_enabled'),
651
+ :public => true,
652
+ :type => Boolean,
653
+ :description => 'Enable or disable the collection of explain plans in slow SQL queries. If this setting is omitted, the transaction_tracer.explain_enabled setting will be applied as the default setting for explain plans in Slow SQL as well.'
654
+ },
655
+ :'slow_sql.record_sql' => {
656
+ :default => value_of(:'transaction_tracer.record_sql'),
657
+ :public => true,
658
+ :type => String,
659
+ :description => 'Defines an obfuscation level for slow SQL queries. Valid options are obfuscated, raw, none).'
660
+ },
661
+ :'mongo.capture_queries' => {
662
+ :default => true,
663
+ :public => true,
664
+ :type => Boolean,
665
+ :description => 'Enable or disable capturing Mongo queries in transaction traces.'
666
+ },
667
+ :'mongo.obfuscate_queries' => {
668
+ :default => true,
669
+ :public => true,
670
+ :type => Boolean,
671
+ :description => 'Enable or disable obfuscation of Mongo queries in transaction traces.'
672
+ },
673
+ :'error_collector.enabled' => {
674
+ :default => true,
675
+ :public => true,
676
+ :type => Boolean,
677
+ :description => 'Enable or disable recording of traced errors and error count metrics.'
678
+ },
679
+ :'error_collector.capture_attributes' => {
680
+ :default => true,
681
+ :public => true,
682
+ :type => Boolean,
683
+ :description => 'Enable or disable collection of custom attributes on errors.'
684
+ },
685
+ :'error_collector.ignore_errors' => {
686
+ :default => 'ActionController::RoutingError,Sinatra::NotFound',
687
+ :public => true,
688
+ :type => String,
689
+ :description => 'Specifies a comma-delimited list of error classes that the agent should ignore.'
690
+ },
691
+ :'rum.enabled' => {
692
+ :default => true,
693
+ :public => false,
694
+ :type => Boolean,
695
+ :description => 'Enable or disable page load timing (sometimes referred to as real user monitoring or RUM).'
696
+ },
697
+ :browser_key => {
698
+ :default => '',
699
+ :public => false,
700
+ :type => String,
701
+ :description => 'Real user monitoring license key for the browser timing header.'
702
+ },
703
+ :beacon => {
704
+ :default => '',
705
+ :public => false,
706
+ :type => String,
707
+ :description => 'Beacon for real user monitoring.'
708
+ },
709
+ :error_beacon => {
710
+ :default => '',
711
+ :public => false,
712
+ :type => String,
713
+ :description => 'Error beacon for real user monitoring.'
714
+ },
715
+ :application_id => {
716
+ :default => '',
717
+ :public => false,
718
+ :type => String,
719
+ :description => 'Application ID for real user monitoring.'
720
+ },
721
+ :js_agent_file => {
722
+ :default => '',
723
+ :public => false,
724
+ :type => String,
725
+ :description => 'Javascript agent file for real user monitoring.'
726
+ },
727
+ :'browser_monitoring.auto_instrument' => {
728
+ :default => value_of(:'rum.enabled'),
729
+ :public => true,
730
+ :type => Boolean,
731
+ :description => 'Enable or disable automatic insertion of the JavaScript header into outgoing responses for page load timing (sometimes referred to as real user monitoring or RUM).'
732
+ },
733
+ :'browser_monitoring.capture_attributes' => {
734
+ :default => false,
735
+ :public => true,
736
+ :type => Boolean,
737
+ :description => 'Forward custom attributes to Browser for collection by OneApm Insights.'
738
+ },
739
+ :'browser_monitoring.loader' => {
740
+ :default => DefaultSource.browser_monitoring_loader,
741
+ :public => private,
742
+ :type => String,
743
+ :description => 'Type of JavaScript agent loader to use for browser monitoring instrumentation.'
744
+ },
745
+ :'browser_monitoring.loader_version' => {
746
+ :default => '',
747
+ :public => private,
748
+ :type => String,
749
+ :description => 'Version of JavaScript agent loader (returned from the OneApm collector).)'
750
+ },
751
+ :'browser_monitoring.debug' => {
752
+ :default => false,
753
+ :public => false,
754
+ :type => Boolean,
755
+ :description => 'Enable or disable debugging version of JavaScript agent loader for browser monitoring instrumentation.'
756
+ },
757
+ :'browser_monitoring.ssl_for_http' => {
758
+ :default => nil,
759
+ :allow_nil => true,
760
+ :public => false,
761
+ :type => Boolean,
762
+ :description => 'Enable or disable HTTPS instrumentation by JavaScript agent on HTTP pages.'
763
+ },
764
+ :'capture_attributes.page_view_events' => {
765
+ :default => false,
766
+ :public => false,
767
+ :type => Boolean,
768
+ :deprecated => true,
769
+ :description => 'Correct setting is browser_monitoring.capture_attributes.'
770
+ },
771
+ :js_agent_loader => {
772
+ :default => '',
773
+ :public => false,
774
+ :type => String,
775
+ :description => 'JavaScript agent loader content.'
776
+ },
777
+ :js_errors_beta => {
778
+ :default => false,
779
+ :public => false,
780
+ :type => Boolean,
781
+ :description => 'Enable or disable beta JavaScript error reporting.'
782
+ },
783
+ :trusted_account_ids => {
784
+ :default => [],
785
+ :public => false,
786
+ :type => Array,
787
+ :description => 'List of trusted OneApm account IDs for the purposes of cross-application tracing. Inbound requests from applications including cross-application headers that do not come from an account in this list will be ignored.'
788
+ },
789
+ :"cross_application_tracer.enabled" => {
790
+ :default => true,
791
+ :public => true,
792
+ :type => Boolean,
793
+ :description => 'Enable or disable cross application tracing.'
794
+ },
795
+ :encoding_key => {
796
+ :default => '',
797
+ :public => false,
798
+ :type => String,
799
+ :description => 'Encoding key for cross-application tracing.'
800
+ },
801
+ :cross_process_id => {
802
+ :default => '',
803
+ :public => false,
804
+ :type => String,
805
+ :description => 'Cross process ID for cross-application tracing.'
806
+ },
807
+ :'thread_profiler.enabled' => {
808
+ :default => DefaultSource.thread_profiler_enabled,
809
+ :public => true,
810
+ :type => Boolean,
811
+ :description => 'Enable or disable the thread profiler.'
812
+ },
813
+ :'xray_session.enabled' => {
814
+ :default => true,
815
+ :public => true,
816
+ :type => Boolean,
817
+ :description => 'Enable or disable X-Ray sessions.'
818
+ },
819
+ :'xray_session.allow_traces' => {
820
+ :default => true,
821
+ :public => false,
822
+ :type => Boolean,
823
+ :description => 'Enable or disable X-Ray sessions recording transaction traces.'
824
+ },
825
+ :'xray_session.allow_profiles' => {
826
+ :default => true,
827
+ :public => false,
828
+ :type => Boolean,
829
+ :description => 'Enable or disable X-Ray sessions taking thread profiles.'
830
+ },
831
+ :'xray_session.max_samples' => {
832
+ :default => 10,
833
+ :public => false,
834
+ :type => Fixnum,
835
+ :description => 'Maximum number of transaction traces to buffer for active X-Ray sessions'
836
+ },
837
+ :'xray_session.max_profile_overhead' => {
838
+ :default => 0.05,
839
+ :public => false,
840
+ :type => Float,
841
+ :description => 'Maximum overhead percentage for thread profiling before agent reduces polling frequency'
842
+ },
843
+ :marshaller => {
844
+ :default => DefaultSource.marshaller,
845
+ :public => true,
846
+ :type => String,
847
+ :description => 'Specifies a marshaller for transmitting data to the OneApm collector) (e.g json, pruby).'
848
+ },
849
+ :'analytics_events.enabled' => {
850
+ :default => true,
851
+ :public => true,
852
+ :type => Boolean,
853
+ :description => 'Enable or disable analytics event sampling.'
854
+ },
855
+ :'analytics_events.max_samples_stored' => {
856
+ :default => 1200,
857
+ :public => true,
858
+ :type => Fixnum,
859
+ :description => 'Defines the maximum number of request events reported from a single harvest.'
860
+ },
861
+ :'analytics_events.capture_attributes' => {
862
+ :default => true,
863
+ :public => true,
864
+ :type => Boolean,
865
+ :description => 'Include custom attributes in analytics event data.'
866
+ },
867
+ :restart_thread_in_children => {
868
+ :default => true,
869
+ :public => false,
870
+ :type => Boolean,
871
+ :description => 'Controls whether to check on running a transaction whether to respawn the harvest thread.'
872
+ },
873
+ :normalize_json_string_encodings => {
874
+ :default => DefaultSource.normalize_json_string_encodings,
875
+ :public => false,
876
+ :type => Boolean,
877
+ :description => 'Controls whether to normalize string encodings prior to serializing data for the collector to JSON.'
878
+ },
879
+ :disable_vm_sampler => {
880
+ :default => false,
881
+ :public => true,
882
+ :type => Boolean,
883
+ :dynamic_name => true,
884
+ :description => 'Defines whether the agent will sample performance measurements from the Ruby VM.'
885
+ },
886
+ :disable_memory_sampler => {
887
+ :default => false,
888
+ :public => true,
889
+ :type => Boolean,
890
+ :dynamic_name => true,
891
+ :description => 'Defines whether the agent will sample the memory usage of the host process.'
892
+ },
893
+ :disable_cpu_sampler => {
894
+ :default => false,
895
+ :public => true,
896
+ :type => Boolean,
897
+ :dynamic_name => true,
898
+ :description => 'Defines whether the agent will sample the CPU usage of the host process.'
899
+ },
900
+ :disable_delayed_job_sampler => {
901
+ :default => false,
902
+ :public => true,
903
+ :type => Boolean,
904
+ :dynamic_name => true,
905
+ :description => 'Defines whether the agent will measure the depth of Delayed Job queues.'
906
+ },
907
+ :disable_curb => {
908
+ :default => false,
909
+ :public => true,
910
+ :type => Boolean,
911
+ :dynamic_name => true,
912
+ :description => 'Defines whether the agent will install instrumentation for the curb gem.'
913
+ },
914
+ :disable_excon => {
915
+ :default => false,
916
+ :public => true,
917
+ :type => Boolean,
918
+ :dynamic_name => true,
919
+ :description => 'Defines whether the agent will install instrumentation for the excon gem.'
920
+ },
921
+ :disable_httpclient => {
922
+ :default => false,
923
+ :public => true,
924
+ :type => Boolean,
925
+ :dynamic_name => true,
926
+ :description => 'Defines whether the agent will install instrumentation for the httpclient gem.'
927
+ },
928
+ :disable_net_http => {
929
+ :default => false,
930
+ :public => true,
931
+ :type => Boolean,
932
+ :dynamic_name => true,
933
+ :description => 'Defines whether the agent will install instrumentation for Net::HTTP.'
934
+ },
935
+ :disable_rack => {
936
+ :default => false,
937
+ :public => true,
938
+ :type => Boolean,
939
+ :dynamic_name => true,
940
+ :description => 'Defines whether the agent will hook into Rack::Builder\'s to_app method to find gems to instrument during application startup.'
941
+ },
942
+ :disable_typhoeus => {
943
+ :default => false,
944
+ :public => true,
945
+ :type => Boolean,
946
+ :dynamic_name => true,
947
+ :description => 'Defines whether the agent will install instrumentation for the typhoeus gem.'
948
+ },
949
+ :disable_rack_middleware => {
950
+ :default => false,
951
+ :public => true,
952
+ :type => Boolean,
953
+ :description => 'Defines whether the agent will wrap third-party middlewares in instrumentation (regardless of whether they are installed via Rack::Builder or Rails).'
954
+ },
955
+ :labels => {
956
+ :default => '',
957
+ :public => true,
958
+ :type => String,
959
+ :description => 'A dictionary of label names and values that will be applied to the data sent from this agent. May also be expressed as a semi-colon delimited string of colon-separated pairs (e.g. "Server:One;Data Center:Primary".'
960
+ },
961
+ :aggressive_keepalive => {
962
+ :default => true,
963
+ :public => false,
964
+ :type => Boolean,
965
+ :description => 'If true, attempt to keep the TCP connection to the collector alive between harvests.'
966
+ },
967
+ :keep_alive_timeout => {
968
+ :default => 60,
969
+ :public => false,
970
+ :type => Fixnum,
971
+ :description => 'Timeout for keep alive on TCP connection to collector if supported by Ruby version. Only used in conjunction when aggressive_keepalive is enabled.'
972
+ },
973
+ :ca_bundle_path => {
974
+ :default => nil,
975
+ :allow_nil => true,
976
+ :public => true,
977
+ :type => String,
978
+ :description => "Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by OneApm's data collection service."
979
+ },
980
+ :collect_utilization => {
981
+ :default => false,
982
+ :public => false,
983
+ :type => Boolean,
984
+ :description => "Controls whether to collect processor and instance sizing data and send it to OneApm"
985
+ },
986
+ :'rules.ignore_url_regexes' => {
987
+ :default => [],
988
+ :public => true,
989
+ :type => Array,
990
+ :transform => DefaultSource.rules_ignore,
991
+ :description => 'A list of patterns that will cause a transaction to be ignored if any of them match the URI.'
992
+ },
993
+ :'synthetics.traces_limit' => {
994
+ :default => 20,
995
+ :public => false,
996
+ :type => Fixnum,
997
+ :description => 'Maximum number of synthetics transaction traces to hold for a given harvest'
998
+ },
999
+ :'synthetics.events_limit' => {
1000
+ :default => 200,
1001
+ :public => false,
1002
+ :type => Fixnum,
1003
+ :description => 'Maximum number of synthetics transaction events to hold for a given harvest'
1004
+ },
1005
+ :'custom_insights_events.enabled' => {
1006
+ :default => true,
1007
+ :public => true,
1008
+ :type => Boolean,
1009
+ :description => 'Enable or disable custom Insights event recording.'
1010
+ },
1011
+ :'custom_insights_events.max_samples_stored' => {
1012
+ :default => 1000,
1013
+ :public => true,
1014
+ :type => Fixnum,
1015
+ :description => 'Maximum number of custom Insights events buffered in memory at a time.',
1016
+ :dynamic_name => true
1017
+ },
1018
+ :disable_grape => {
1019
+ :default => false,
1020
+ :public => true,
1021
+ :type => Boolean,
1022
+ :description => 'Disables installation of Grape instrumentation.'
1023
+ }
1024
+ }.freeze
1025
+ end
1026
+ end