tingyun_rpm 1.6.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ting_yun/agent.rb +9 -2
  3. data/lib/ting_yun/agent/agent.rb +3 -2
  4. data/lib/ting_yun/agent/collector/error_collector/noticed_error.rb +1 -1
  5. data/lib/ting_yun/agent/collector/sql_sampler.rb +2 -2
  6. data/lib/ting_yun/agent/collector/transaction_sampler.rb +2 -2
  7. data/lib/ting_yun/agent/collector/transaction_sampler/class_method.rb +22 -7
  8. data/lib/ting_yun/agent/collector/transaction_sampler/slowest_sample_buffer.rb +3 -3
  9. data/lib/ting_yun/agent/collector/transaction_sampler/transaction_sample_buffer_base.rb +15 -2
  10. data/lib/ting_yun/agent/cross_app/cross_app_monitor.rb +22 -19
  11. data/lib/ting_yun/agent/cross_app/cross_app_tracing.rb +48 -14
  12. data/lib/ting_yun/agent/database.rb +1 -1
  13. data/lib/ting_yun/agent/datastore.rb +13 -2
  14. data/lib/ting_yun/agent/datastore/metric_helper.rb +8 -7
  15. data/lib/ting_yun/agent/instance_methods/connect.rb +21 -8
  16. data/lib/ting_yun/agent/instance_methods/container_data_manager.rb +20 -8
  17. data/lib/ting_yun/agent/instance_methods/start.rb +3 -3
  18. data/lib/ting_yun/agent/instance_methods/start_worker_thread.rb +9 -4
  19. data/lib/ting_yun/agent/method_tracer_helpers.rb +29 -1
  20. data/lib/ting_yun/agent/transaction.rb +24 -6
  21. data/lib/ting_yun/agent/transaction/attributes.rb +17 -2
  22. data/lib/ting_yun/agent/transaction/class_method.rb +1 -0
  23. data/lib/ting_yun/agent/transaction/instance_method.rb +10 -4
  24. data/lib/ting_yun/agent/transaction/request_attributes.rb +42 -3
  25. data/lib/ting_yun/agent/transaction/trace.rb +53 -6
  26. data/lib/ting_yun/agent/transaction/trace_node.rb +48 -12
  27. data/lib/ting_yun/agent/transaction/traced_method_stack.rb +1 -1
  28. data/lib/ting_yun/agent/transaction/transaction_sample_builder.rb +12 -11
  29. data/lib/ting_yun/agent/transaction/transaction_state.rb +16 -5
  30. data/lib/ting_yun/agent/transaction/transaction_timings.rb +1 -1
  31. data/lib/ting_yun/configuration/default_source.rb +327 -16
  32. data/lib/ting_yun/configuration/manager.rb +0 -1
  33. data/lib/ting_yun/configuration/server_source.rb +8 -2
  34. data/lib/ting_yun/configuration/yaml_source.rb +1 -1
  35. data/lib/ting_yun/frameworks/instance_methods.rb +2 -2
  36. data/lib/ting_yun/frameworks/rails.rb +2 -2
  37. data/lib/ting_yun/http/abstract_request.rb +12 -0
  38. data/lib/ting_yun/http/curb_wrappers.rb +1 -1
  39. data/lib/ting_yun/http/excon_wrappers.rb +9 -1
  40. data/lib/ting_yun/http/http_client_request.rb +13 -2
  41. data/lib/ting_yun/http/net_http_request.rb +10 -2
  42. data/lib/ting_yun/http/typhoeus_wrappers.rb +1 -1
  43. data/lib/ting_yun/instrumentation/active_record.rb +3 -5
  44. data/lib/ting_yun/instrumentation/bunny.rb +48 -44
  45. data/lib/ting_yun/instrumentation/grape.rb +4 -2
  46. data/lib/ting_yun/instrumentation/http_client.rb +1 -1
  47. data/lib/ting_yun/instrumentation/kafka.rb +18 -15
  48. data/lib/ting_yun/instrumentation/middleware_proxy.rb +3 -2
  49. data/lib/ting_yun/instrumentation/mongo.rb +2 -2
  50. data/lib/ting_yun/instrumentation/mongo_command_log_subscriber.rb +9 -9
  51. data/lib/ting_yun/instrumentation/rails3/action_controller.rb +3 -3
  52. data/lib/ting_yun/instrumentation/rake.rb +2 -1
  53. data/lib/ting_yun/instrumentation/redis.rb +6 -0
  54. data/lib/ting_yun/instrumentation/sidekiq.rb +1 -1
  55. data/lib/ting_yun/instrumentation/sinatra/action.rb +1 -1
  56. data/lib/ting_yun/instrumentation/support/action_cable_subscriber.rb +2 -2
  57. data/lib/ting_yun/instrumentation/support/action_controller_subscriber.rb +4 -4
  58. data/lib/ting_yun/instrumentation/support/action_view_subscriber.rb +14 -1
  59. data/lib/ting_yun/instrumentation/support/active_record_helper.rb +6 -2
  60. data/lib/ting_yun/instrumentation/support/active_record_subscriber.rb +14 -7
  61. data/lib/ting_yun/instrumentation/support/event_formatter.rb +7 -2
  62. data/lib/ting_yun/instrumentation/support/external_error.rb +1 -1
  63. data/lib/ting_yun/instrumentation/support/external_helper.rb +27 -4
  64. data/lib/ting_yun/instrumentation/support/javascript_instrumentor.rb +1 -1
  65. data/lib/ting_yun/instrumentation/support/method_instrumentation.rb +6 -1
  66. data/lib/ting_yun/instrumentation/support/parameter_filtering.rb +1 -1
  67. data/lib/ting_yun/instrumentation/support/thrift_helper.rb +4 -3
  68. data/lib/ting_yun/instrumentation/thrift.rb +7 -7
  69. data/lib/ting_yun/logger/create_logger_helper.rb +1 -1
  70. data/lib/ting_yun/middleware/agent_middleware.rb +1 -1
  71. data/lib/ting_yun/middleware/browser_monitoring.rb +3 -2
  72. data/lib/ting_yun/support/collector.rb +7 -1
  73. data/lib/ting_yun/ting_yun_service.rb +38 -21
  74. data/lib/ting_yun/ting_yun_service/http.rb +5 -3
  75. data/lib/ting_yun/ting_yun_service/request.rb +32 -6
  76. data/lib/ting_yun/ting_yun_service/upload_service.rb +25 -3
  77. data/lib/ting_yun/version.rb +4 -3
  78. data/lib/tingyun_rpm.rb +0 -2
  79. data/tingyun_rpm.gemspec +1 -0
  80. metadata +2 -2
@@ -4,6 +4,7 @@ require 'ting_yun/support/helper'
4
4
  require 'ting_yun/support/coerce'
5
5
  require 'ting_yun/agent/database'
6
6
  require 'set'
7
+ require 'digest'
7
8
  module TingYun
8
9
  module Agent
9
10
  class Transaction
@@ -16,13 +17,13 @@ module TingYun
16
17
  @node_count = 0
17
18
  @prepared = false
18
19
  @guid = generate_guid
19
- @root_node = TingYun::Agent::Transaction::TraceNode.new(0.0, "ROOT")
20
+ @root_node = TingYun::Agent::Transaction::TraceNode.new(0.0, "ROOT",-1)
20
21
  @e_set = Set.new
21
22
  end
22
23
 
23
24
  def create_node(time_since_start, metric_name = nil)
24
25
  @node_count += 1
25
- TingYun::Agent::Transaction::TraceNode.new(time_since_start, metric_name)
26
+ TingYun::Agent::Transaction::TraceNode.new(time_since_start, metric_name,@node_count)
26
27
  end
27
28
 
28
29
  def duration
@@ -34,7 +35,7 @@ module TingYun
34
35
 
35
36
  include TingYun::Support::Coerce
36
37
 
37
- def trace_tree
38
+ def trace_treeV2
38
39
  [
39
40
  @start_time.round,
40
41
  request_params,
@@ -43,7 +44,28 @@ module TingYun
43
44
  ]
44
45
  end
45
46
 
46
- def to_collector_array(encoder)
47
+ def trace_tree
48
+ hash = {
49
+ "params" =>attributes.agent_attributes[:params],
50
+ "queryStringParameters" => attributes.agent_attributes[:queryString],
51
+ "custom" => {
52
+ :threadName => attributes.agent_attributes[:threadName]
53
+ },
54
+ "responseHeader" =>attributes.response_header,
55
+ "requestHeader" =>attributes.request_header,
56
+ "session" => attributes.agent_attributes[:cookie],
57
+ "tracers" => root_node.to_hash.flatten!
58
+ }
59
+ if attributes.agent_attributes[:method] == "GET"
60
+ hash["params"] = attributes.agent_attributes[:params]
61
+ else
62
+ hash["posts"] = attributes.agent_attributes[:params]
63
+ end
64
+
65
+ hash
66
+ end
67
+
68
+ def to_collector_arrayV2(encoder)
47
69
  [
48
70
  @start_time.round,
49
71
  duration,
@@ -55,6 +77,31 @@ module TingYun
55
77
  ] + array_size
56
78
  end
57
79
 
80
+ def to_collector_array(encoder)
81
+ hash = {
82
+ "time" => @start_time.round,
83
+ "tid" => attributes.agent_attributes[:tx_id],
84
+ "rid" => guid,
85
+ "duration" => duration,
86
+ "ip"=> attributes.agent_attributes[:ip]||"",
87
+ "method" => attributes.agent_attributes[:method]||"UNKNOWN",
88
+ "status" => attributes.agent_attributes[:httpStatus]||0,
89
+ "custom" => attributes.custom_params,
90
+ "detail" => trace_tree
91
+ }
92
+ hash["user"] = attributes.user_info unless attributes.user_info.empty?
93
+ hash["cross"] = attributes.agent_attributes[:cross] unless attributes.agent_attributes[:cross].nil?
94
+ hash["refid"] = attributes.agent_attributes[:refid] unless attributes.agent_attributes[:refid].nil?
95
+ actionName = TingYun::Helper.correctly_encoded(attributes.agent_attributes[:metric_name])
96
+ unless actionName.nil?
97
+ hash["tmd5"] = attributes.agent_attributes[:tmd5] || Digest::MD5.hexdigest(actionName)
98
+ hash["action"]= actionName
99
+ end
100
+ url = TingYun::Helper.correctly_encoded(attributes.agent_attributes[:url])
101
+ hash["url"]=url unless url.nil?
102
+ hash
103
+ end
104
+
58
105
  def prepare_to_send!
59
106
  return self if @prepared
60
107
 
@@ -72,7 +119,7 @@ module TingYun
72
119
 
73
120
  def collect_explain_plans!
74
121
  return unless TingYun::Agent::Database.should_action_collect_explain_plans?
75
- threshold = TingYun::Agent.config[:'nbs.action_tracer.action_threshold']
122
+ threshold = TingYun::Agent.config[:'action_tracer.action_threshold']
76
123
  root_node.each_call do |node|
77
124
  if node[:sql] && node.duration > threshold
78
125
  node[:explainPlan] = node.explain_sql
@@ -108,7 +155,7 @@ module TingYun
108
155
  end
109
156
 
110
157
  def request_params
111
- return {} unless TingYun::Agent.config['nbs.capture_params']
158
+ return {} unless TingYun::Agent.config['action_tracer.capture_params']
112
159
  attributes.request_params
113
160
  end
114
161
 
@@ -12,17 +12,28 @@ module TingYun
12
12
  attr_reader :entry_timestamp, :parent_node, :called_nodes
13
13
  attr_accessor :metric_name, :exit_timestamp, :uri, :count, :klass, :method, :name
14
14
 
15
+ attr_accessor :tracerId, :parentTracerId, :type,:params_data,:datas,:backtrace,:exception
16
+
15
17
 
16
18
 
17
19
  UNKNOWN_NODE_NAME = '<unknown>'.freeze
18
20
 
19
21
 
20
- def initialize(timestamp, metric_name)
22
+ def initialize(timestamp, metric_name,tracerId,option={})
23
+ @type = option[:type] || 'Java'
21
24
  @entry_timestamp = timestamp
22
- @metric_name = metric_name || UNKNOWN_NODE_NAME
25
+ @metric_name = metric_name
23
26
  @called_nodes = nil
24
27
  @count = 1
25
- self["exception"] ||= []
28
+ if metric_name == "ROOT"
29
+ @parentTracerId = -1
30
+ @tracerId = 0
31
+ else
32
+ @tracerId = tracerId
33
+ end
34
+ @exception = []
35
+ @params_data = {}
36
+ @backtrace = []
26
37
  end
27
38
 
28
39
  def add_called_node(s)
@@ -32,6 +43,7 @@ module TingYun
32
43
  end
33
44
 
34
45
  def end_trace(timestamp)
46
+ @parentTracerId = @parent_node.tracerId unless @parent_node.nil?
35
47
  @exit_timestamp = timestamp
36
48
  end
37
49
 
@@ -43,7 +55,7 @@ module TingYun
43
55
 
44
56
  def pre_metric_name(metric_name)
45
57
  @name ||= if metric_name.start_with?('Database ')
46
- "#{metric_name.split('/')[0]}%2F#{metric_name.split('%2F')[-1]}"
58
+ "#{metric_name.split('/')[0]}/#{metric_name.split('/')[-1]}"
47
59
  else
48
60
  metric_name
49
61
  end
@@ -61,6 +73,25 @@ module TingYun
61
73
  [(@called_nodes ? @called_nodes.map{|s| s.to_array} : [])]
62
74
  end
63
75
 
76
+ def to_hash
77
+ hash = {
78
+ "parentTracerId" => @parentTracerId,
79
+ "start" => TingYun::Helper.time_to_millis(entry_timestamp),
80
+ "end" => TingYun::Helper.time_to_millis(exit_timestamp),
81
+ "type"=> params[:type] || @type
82
+ }
83
+ hash["tracerId"]= @tracerId if @tracerId!=0
84
+ method = params[:method] || TingYun::Support::Coerce.string(method)
85
+ hash["method"] = method unless method.nil?
86
+ hash["metric"] = TingYun::Support::Coerce.string(metric_name) unless (metric_name.nil? or metric_name=="ROOT")
87
+ clazz = params[:klass] || TingYun::Support::Coerce.string(klass)
88
+ hash["clazz"] = clazz unless clazz.nil?
89
+ hash["params"] = params_data unless params_data.empty?
90
+ hash["backtrace"] = backtrace unless backtrace.empty?
91
+ hash["exception"] = exception unless exception.empty?
92
+ [hash].concat([(@called_nodes ? @called_nodes.map{|s| s.to_hash} : nil)].compact)
93
+ end
94
+
64
95
  def custom_params
65
96
  {}
66
97
  end
@@ -113,18 +144,23 @@ module TingYun
113
144
 
114
145
  def add_error(error)
115
146
  if error.respond_to?(:tingyun_external)
116
- self["exception"] << {"message" => error.message,
117
- "class" => "External #{error.tingyun_code}"
118
- }
147
+ exception << {"msg" => error.message,
148
+ "name" => "External #{error.tingyun_code}",
149
+ "stack"=> error.backtrace,
150
+ "error"=> false
151
+ }
119
152
  else
120
153
  if ::TingYun::Agent.config[:'nbs.exception.stack_enabled']
121
- self["exception"] << {"message" => error.message,
122
- "class" => error.class.name ,
123
- "stacktrace"=> error.backtrace.reject! { |t| t.include?('tingyun_rpm') }
154
+ exception << {"msg" => error.message,
155
+ "name" => error.class.name ,
156
+ "stack"=> error.backtrace.reject! { |t| t.include?('tingyun_rpm') },
157
+ "error"=> false
124
158
  }
125
159
  else
126
- self["exception"] << {"message" => error.message,
127
- "class" => error.class.name
160
+ exception << {"msg" => error.message,
161
+ "name" => error.class.name,
162
+ "stack"=> error.backtrace,
163
+ "error"=> false
128
164
  }
129
165
  end
130
166
  end
@@ -60,7 +60,7 @@ module TingYun
60
60
 
61
61
 
62
62
  def sampler_enabled?
63
- TingYun::Agent.config[:'nbs.action_tracer.enabled']
63
+ TingYun::Agent.config[:'action_tracer.enabled']
64
64
  end
65
65
 
66
66
  def transaction_sampler
@@ -35,12 +35,12 @@ module TingYun
35
35
  end
36
36
 
37
37
  def trace_entry(time)
38
- if @trace.node_count == 0
39
- node = @trace.create_node(time - @trace_start)
40
- @trace.root_node = node
41
- @current_node = node
42
- return @current_node
43
- end
38
+ # if @trace.node_count == 0
39
+ # node = @trace.create_node(time - @trace_start)
40
+ # @trace.root_node = node
41
+ # @current_node = node
42
+ # return @current_node
43
+ # end
44
44
  if @trace.node_count < node_limit
45
45
  node = @trace.create_node(time - @trace_start)
46
46
  @current_node.add_called_node(node)
@@ -74,9 +74,10 @@ module TingYun
74
74
  if error
75
75
  unless trace.e_set.member? error.object_id
76
76
  trace.e_set.add error.object_id
77
- @current_node["exception"] << {"message" => error.message,
78
- "class" => error.class.to_s,
79
- "stacktrace"=> error.backtrace
77
+ @current_node.exception << {"msg" => error.message,
78
+ "name" => error.class.to_s,
79
+ "stack"=> error.backtrace,
80
+ "error"=> false
80
81
  }
81
82
  end
82
83
  end
@@ -98,12 +99,12 @@ module TingYun
98
99
 
99
100
 
100
101
  def transaction_trace_threshold
101
- Agent.config[:'nbs.action_tracer.action_threshold']
102
+ Agent.config[:'action_tracer.action_threshold']
102
103
  end
103
104
 
104
105
 
105
106
  def set_txId_and_txData(txid, txdata)
106
- @current_node[:txId] = txid
107
+ @current_node[:tx_id] = txid
107
108
  @current_node[:txData] = txdata
108
109
  end
109
110
 
@@ -19,7 +19,10 @@ module TingYun
19
19
  :client_req_id,
20
20
  :thrift_return_data,
21
21
  :extenel_req_id,
22
- :externel_time
22
+ :externel_time,
23
+ :transaction_name_md5,
24
+ :action_type,
25
+ :call_list
23
26
 
24
27
 
25
28
 
@@ -52,6 +55,8 @@ module TingYun
52
55
  @current_transaction = nil
53
56
  @traced_method_stack = TingYun::Agent::TracedMethodStack.new
54
57
  @record_tt = nil
58
+ @action_type = "Transaction" #[WebAction, Transaction]
59
+ @client_tingyun_id_secret = TingYun::Agent.config[:idSecret]
55
60
  end
56
61
 
57
62
  # This starts the timer for the transaction.
@@ -110,7 +115,6 @@ module TingYun
110
115
 
111
116
  def save_referring_transaction_info(data)
112
117
  data = Array(data)
113
- @client_tingyun_id_secret = data.shift
114
118
  data.each do |e|
115
119
  if m = e.match(/x=/)
116
120
  @client_transaction_id = m.post_match
@@ -118,8 +122,12 @@ module TingYun
118
122
  @client_req_id = m.post_match
119
123
  elsif m = e.match(/e=/)
120
124
  @extenel_req_id = m.post_match
121
- elsif m = e.match(/s=/)
122
- @externel_time = m.post_match
125
+ elsif m = e.match(/n=/)
126
+ @transaction_name_md5 = m.post_match
127
+ elsif m = e.match(/c=/)
128
+ @call_list = m.post_match
129
+ @action_type = "WebAction" if @call_list.start_with?("S|")
130
+ @client_tingyun_id_secret = "#{TingYun::Agent.config[:idSecret]},#{call_list}"
123
131
  end
124
132
  end
125
133
  end
@@ -145,7 +153,7 @@ module TingYun
145
153
  end
146
154
 
147
155
  def same_account?
148
- server_info = TingYun::Agent.config[:tingyunIdSecret].split('|')
156
+ server_info = TingYun::Agent.config[:idSecret].split('|')
149
157
  client_info = (@client_tingyun_id_secret || '').split('|')
150
158
  if server_info[0] && !server_info[0].empty? && server_info[0] == client_info[0]
151
159
  return true
@@ -172,6 +180,9 @@ module TingYun
172
180
  def add_current_node_params(hash)
173
181
  transaction_sample_builder.current_node.merge hash if transaction_sample_builder
174
182
  end
183
+ def add_current_node_paramsV3(hash)
184
+ transaction_sample_builder.current_node.params_data.merge! hash if transaction_sample_builder
185
+ end
175
186
  end
176
187
  end
177
188
  end
@@ -54,7 +54,7 @@ module TingYun
54
54
  # Helpers
55
55
 
56
56
  def slow_action_tracer?
57
- return app_time_in_millis > TingYun::Agent.config[:'nbs.action_tracer.action_threshold']
57
+ return app_time_in_millis > TingYun::Agent.config[:'action_tracer.action_thresholdaction_tracer.action_threshold']
58
58
  end
59
59
 
60
60
  def convert_to_milliseconds(value_in_seconds)
@@ -143,6 +143,13 @@ module TingYun
143
143
  :allowed_from_server => false,
144
144
  :description => 'Your Ting Yun <a href="">license key</a>.'
145
145
  },
146
+ :collector_addresses => {
147
+ :default => '',
148
+ :public => true,
149
+ :type => String,
150
+ :allowed_from_server => false,
151
+ :description => 'few of DC adr, ip:port'
152
+ },
146
153
  :enabled => {
147
154
  :default => true,
148
155
  :public => true,
@@ -150,7 +157,7 @@ module TingYun
150
157
  :allowed_from_server => true,
151
158
  :description => 'Enable or disable the agent.'
152
159
  },
153
- :'nbs.agent_enabled' => {
160
+ :'agent_enabled' => {
154
161
  :default => true,
155
162
  :public => true,
156
163
  :type => Boolean,
@@ -158,17 +165,40 @@ module TingYun
158
165
  :description => 'Enable or disable the agent.'
159
166
  },
160
167
  :app_name => {
161
- :default => DefaultSource.app_name,
168
+ :default => "",
162
169
  :public => true,
163
170
  :type => String,
164
171
  :allowed_from_server => false,
165
172
  :description => 'Semicolon-delimited list of Naming your application.'
166
173
  },
174
+ :'instance.name' => {
175
+ :default => "",
176
+ :public => true,
177
+ :type => String,
178
+ :allowed_from_server => false,
179
+ :description => ''
180
+ },
167
181
  :'nbs.auto_app_naming' => {
168
182
  :default => false,
169
183
  :public => true,
170
184
  :type => Boolean,
171
185
  :allowed_from_server => true,
186
+ :exclude_from_reported_settings => true,
187
+ :description => 'Enable or disable to identify the application name'
188
+ },
189
+ :'user_info.rules' => {
190
+ :default => "{}",
191
+ :public => true,
192
+ :type => String,
193
+ :allowed_from_server => true,
194
+ :description => ''
195
+ },
196
+ :'auto_app_naming' => {
197
+ :default => false,
198
+ :public => true,
199
+ :type => Boolean,
200
+ :allowed_from_server => true,
201
+ :exclude_from_reported_settings => true,
172
202
  :description => 'Enable or disable to identify the application name'
173
203
  },
174
204
  :'nbs.urls_captured' => {
@@ -176,12 +206,14 @@ module TingYun
176
206
  :public => true,
177
207
  :type => String,
178
208
  :allowed_from_server => true,
209
+ :exclude_from_reported_settings => true,
179
210
  :description => '换行符分隔的URL正则表达式列表,缺省为采集全部URL。若指定此参数,则仅采集列表中的URL,忽略其它用户不关心URL '
180
211
  },
181
- :'nbs.ignored_params' => {
212
+ :'action_tracer.ignored_params' => {
182
213
  :default => '',
183
214
  :public => true,
184
215
  :type => String,
216
+ :exclude_from_reported_settings => true,
185
217
  :allowed_from_server => true,
186
218
  :description => 'Enable or disable Specifies HTTP request parameters '
187
219
  },
@@ -189,6 +221,7 @@ module TingYun
189
221
  :default => true,
190
222
  :public => true,
191
223
  :type => Boolean,
224
+ :exclude_from_reported_settings => true,
192
225
  :allowed_from_server => true,
193
226
  :description => 'Enable or disable recording of traced errors and error count metrics.'
194
227
  },
@@ -196,6 +229,7 @@ module TingYun
196
229
  :default => '',
197
230
  :public => true,
198
231
  :type => String,
232
+ :exclude_from_reported_settings => true,
199
233
  :allowed_from_server => true,
200
234
  :description => 'Enable or disable Specifies HTTP response code '
201
235
  },
@@ -204,6 +238,7 @@ module TingYun
204
238
  :public => true,
205
239
  :type => String,
206
240
  :allowed_from_server => true,
241
+ :exclude_from_reported_settings => true,
207
242
  :description => 'Specify a comma-delimited list of error classes that the agent should ignore'
208
243
  },
209
244
  :"nbs.error_collector.record_db_errors" => {
@@ -211,20 +246,23 @@ module TingYun
211
246
  :public => true,
212
247
  :type => Boolean,
213
248
  :allowed_from_server => true,
249
+ :exclude_from_reported_settings => true,
214
250
  :description => ' '
215
251
  },
216
- :'nbs.action_tracer.enabled' => {
252
+ :'action_tracer.enabled' => {
217
253
  :default => true,
218
254
  :public => true,
219
255
  :type => Boolean,
220
256
  :allowed_from_server => true,
257
+ :exclude_from_reported_settings => true,
221
258
  :description => '是否启用Web事务跟踪'
222
259
  },
223
- :'nbs.action_tracer.action_threshold' => {
224
- :default => DefaultSource.action_tracer_action_threshold,
260
+ :'action_tracer.action_threshold' => {
261
+ :default => 500,
225
262
  :allow_nil => true,
226
263
  :public => true,
227
264
  :type => Fixnum,
265
+ :exclude_from_reported_settings => true,
228
266
  :allowed_from_server => true,
229
267
  :description => 'The agent will collect traces for action that exceed this time threshold (in millisecond). Specify a int value or <code><a href="">apdex_f</a></code>.'
230
268
  },
@@ -232,6 +270,7 @@ module TingYun
232
270
  :default => 'obfuscated',
233
271
  :public => true,
234
272
  :type => String,
273
+ :exclude_from_reported_settings => true,
235
274
  :allowed_from_server => true,
236
275
  :description => 'Obfuscation level for SQL queries reported in action trace nodes. Valid options are <code>obfuscated</code>, <code>raw</code>, <code>off</code>.'
237
276
  },
@@ -239,13 +278,15 @@ module TingYun
239
278
  :default => true,
240
279
  :public => true,
241
280
  :type => Boolean,
281
+ :exclude_from_reported_settings => true,
242
282
  :allowed_from_server => true,
243
283
  :description => 'Enable or disable collection of slow SQL queries.'
244
284
  },
245
- :'nbs.action_tracer.slow_sql_threshold' => {
285
+ :'action_tracer.slow_sql_threshold' => {
246
286
  :default => 500,
247
287
  :public => true,
248
288
  :type => Fixnum,
289
+ :exclude_from_reported_settings => true,
249
290
  :allowed_from_server => true,
250
291
  :description => 'The agent will collect traces for slow_sql that exceed this time threshold (in millisecond). Specify a int value or <code><a href="">apdex_f</a></code>.'
251
292
  },
@@ -253,6 +294,7 @@ module TingYun
253
294
  :default => true,
254
295
  :public => true,
255
296
  :type => Boolean,
297
+ :exclude_from_reported_settings => true,
256
298
  :allowed_from_server => true,
257
299
  :description => 'Enable or disable the collection of explain plans in action traces. This setting will also apply to explain plans in Slow SQL traces if slow_sql.explain_enabled is not set separately.'
258
300
  },
@@ -260,6 +302,7 @@ module TingYun
260
302
  :default => 500,
261
303
  :public => true,
262
304
  :type => Fixnum,
305
+ :exclude_from_reported_settings => true,
263
306
  :allowed_from_server => true,
264
307
  :description => 'Threshold (in millisecond) above which the agent will collect explain plans. Relevant only when <code><a href="">explain_enabled</a></code> is true.'
265
308
  },
@@ -275,12 +318,14 @@ module TingYun
275
318
  :public => true,
276
319
  :type => Boolean,
277
320
  :allowed_from_server => true,
321
+ :exclude_from_reported_settings => true,
278
322
  :description => 'Enable or disable to trace nbs web request'
279
323
  },
280
324
  :'nbs.rum.enabled' => {
281
325
  :default => false,
282
326
  :public => true,
283
327
  :type => Boolean,
328
+ :exclude_from_reported_settings => true,
284
329
  :allowed_from_server => true,
285
330
  :description => 'Enable or disable page load timing (sometimes referred to as real user monitoring or RUM).'
286
331
  },
@@ -300,8 +345,8 @@ module TingYun
300
345
  :allowed_from_server => true,
301
346
  :description => '混合嵌码'
302
347
  },
303
- :'nbs.rum.sample_ratio' => {
304
- :default => 1,
348
+ :'rum.sample_ratio' => {
349
+ :default => 1.0,
305
350
  :public => true,
306
351
  :type => Fixnum,
307
352
  :allowed_from_server => true,
@@ -311,14 +356,16 @@ module TingYun
311
356
  :default => '',
312
357
  :allow_nil => true,
313
358
  :public => false,
359
+ :exclude_from_reported_settings => true,
314
360
  :type => String,
315
361
  :allowed_from_server => true,
316
362
  :description => 'obfuscate the special sql fields'
317
363
  },
318
- :'nbs.action_tracer.stack_trace_threshold' => {
319
- :default => 500,
364
+ :'action_tracer.stack_trace_threshold' => {
365
+ :default => 200,
320
366
  :public => true,
321
367
  :type => Fixnum,
368
+ :exclude_from_reported_settings => true,
322
369
  :allowed_from_server => true,
323
370
  :description => 'Threshold (in millisecond) above which the agent will collect stack_trace.'
324
371
  },
@@ -327,6 +374,7 @@ module TingYun
327
374
  :public => true,
328
375
  :type => String,
329
376
  :allowed_from_server => true,
377
+ :exclude_from_reported_settings => true,
330
378
  :description => 'Enable or disable Specifies External request parameters '
331
379
  },
332
380
  :agent_log_file_path => {
@@ -357,6 +405,13 @@ module TingYun
357
405
  :allowed_from_server => false,
358
406
  :description => "The remaining number of log file, delete the earliest when more than this value."
359
407
  },
408
+ :agent_log_file_count => {
409
+ :default => 10,
410
+ :public => true,
411
+ :type => Fixnum,
412
+ :allowed_from_server => false,
413
+ :description => "The remaining number of log file, delete the earliest when more than this value."
414
+ },
360
415
  :agent_log_file_check_days => {
361
416
  :default => 7,
362
417
  :public => true,
@@ -369,6 +424,7 @@ module TingYun
369
424
  :public => false,
370
425
  :type => Array,
371
426
  :allowed_from_server => false,
427
+ :exclude_from_reported_settings => true,
372
428
  :description => "An array of candidate locations for the agent's configuration file."
373
429
  },
374
430
  :dispatcher => {
@@ -399,6 +455,13 @@ module TingYun
399
455
  :allowed_from_server => false,
400
456
  :description => 'Enable or disable to log the transmission-date for developer'
401
457
  },
458
+ :'audit_mode' => {
459
+ :default => false,
460
+ :public => true,
461
+ :type => Boolean,
462
+ :allowed_from_server => false,
463
+ :description => 'Enable or disable to log the transmission-date for developer'
464
+ },
402
465
  :agent_log_level => {
403
466
  :default => 'info',
404
467
  :public => true,
@@ -412,6 +475,7 @@ module TingYun
412
475
  :public => true,
413
476
  :type => String,
414
477
  :allowed_from_server => false,
478
+ :exclude_from_reported_settings => true,
415
479
  :description => 'Defines a host for communicating with Ting Yun via a proxy server.'
416
480
  },
417
481
  :proxy_port => {
@@ -420,6 +484,7 @@ module TingYun
420
484
  :public => true,
421
485
  :type => Fixnum,
422
486
  :allowed_from_server => false,
487
+ :exclude_from_reported_settings => true,
423
488
  :description => 'Defines a port for communicating with Ting Yun via a proxy server.'
424
489
  },
425
490
  :proxy_user => {
@@ -428,6 +493,7 @@ module TingYun
428
493
  :public => true,
429
494
  :type => String,
430
495
  :allowed_from_server => false,
496
+ :exclude_from_reported_settings => true,
431
497
  :description => 'Defines a user for communicating with Ting Yun via a proxy server.'
432
498
  },
433
499
  :proxy_password => {
@@ -444,6 +510,7 @@ module TingYun
444
510
  :public => false,
445
511
  :type => String,
446
512
  :allowed_from_server => false,
513
+ :exclude_from_reported_settings => true,
447
514
  :description => "URI for the Ting Yun data collection service."
448
515
  },
449
516
  :port => {
@@ -452,6 +519,7 @@ module TingYun
452
519
  :public => false,
453
520
  :type => Fixnum,
454
521
  :allowed_from_server => false,
522
+ :exclude_from_reported_settings => true,
455
523
  :description => 'Port for the Ting Yun data collection service.'
456
524
  },
457
525
  :api_host => {
@@ -459,6 +527,7 @@ module TingYun
459
527
  :public => false,
460
528
  :type => String,
461
529
  :allowed_from_server => false,
530
+ :exclude_from_reported_settings => true,
462
531
  :description => 'API host for Ting Yun.'
463
532
  },
464
533
  :api_port => {
@@ -466,6 +535,7 @@ module TingYun
466
535
  :public => false,
467
536
  :type => Fixnum,
468
537
  :allowed_from_server => false,
538
+ :exclude_from_reported_settings => true,
469
539
  :description => 'Port for the TingYun API host.'
470
540
  },
471
541
  :disable_middleware_instrumentation => {
@@ -528,7 +598,7 @@ module TingYun
528
598
  :description => "Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by Ting Yun's data collection service."
529
599
  },
530
600
  :ssl => {
531
- :default => true,
601
+ :default => false,
532
602
  :allow_nil => true,
533
603
  :public => true,
534
604
  :type => Boolean,
@@ -554,6 +624,7 @@ module TingYun
554
624
  :public => false,
555
625
  :type => Fixnum,
556
626
  :allowed_from_server => false,
627
+ :exclude_from_reported_settings => true,
557
628
  :description => 'Number of seconds betwixt connections to the Ting Yun data collection service.'
558
629
  },
559
630
  :'action_tracer.log_sql' => {
@@ -561,6 +632,7 @@ module TingYun
561
632
  :public => true,
562
633
  :type => Boolean,
563
634
  :allowed_from_server => false,
635
+ :exclude_from_reported_settings => true,
564
636
  :description => 'Enable or disable(write into log file) collection of SQL queries.'
565
637
  },
566
638
  :daemon_debug => {
@@ -575,20 +647,22 @@ module TingYun
575
647
  :public => true,
576
648
  :type => String,
577
649
  :allowed_from_server => false,
650
+ :exclude_from_reported_settings => true,
578
651
  :description => 'Enable or disable Specifies url'
579
652
  },
580
- :'nbs.auto_action_naming' => {
653
+ :'auto_action_naming' => {
581
654
  :default => true,
582
655
  :public => true,
583
656
  :type => Boolean,
584
657
  :allowed_from_server => true,
585
658
  :description => 'Enable or disable to use default name '
586
659
  },
587
- :'nbs.capture_params' => {
660
+ :'action_tracer.capture_params' => {
588
661
  :default => false,
589
662
  :public => true,
590
663
  :type => Boolean,
591
664
  :allowed_from_server => true,
665
+ :exclude_from_reported_settings => true,
592
666
  :description => 'Enable or disable the capture of HTTP request parameters to be attached to transaction traces and traced errors.'
593
667
  },
594
668
  :config_path => {
@@ -604,6 +678,7 @@ module TingYun
604
678
  :type => Fixnum,
605
679
  :allowed_from_server => true,
606
680
  :deprecated => true,
681
+ :exclude_from_reported_settings => true,
607
682
  :description => 'millisecond'
608
683
  },
609
684
  :'transaction_tracer.limit_segments' => {
@@ -627,7 +702,7 @@ module TingYun
627
702
  :allowed_from_server => false,
628
703
  :description => 'Controls whether to normalize string encodings prior to serializing data for the collector to JSON.'
629
704
  },
630
- :tingyunIdSecret => {
705
+ :idSecret => {
631
706
  :default => '',
632
707
  :public => true,
633
708
  :type => String,
@@ -660,6 +735,7 @@ module TingYun
660
735
  :public => true,
661
736
  :type => Array,
662
737
  :allowed_from_server => false,
738
+ :exclude_from_reported_settings => true,
663
739
  :description => 'Specify an array of Rake tasks to automatically instrument.'
664
740
  },
665
741
  :'rake.black.tasks' => {
@@ -667,6 +743,7 @@ module TingYun
667
743
  :public => true,
668
744
  :type => Array,
669
745
  :allowed_from_server => false,
746
+ :exclude_from_reported_settings => true,
670
747
  :description => 'Specify an array of Rake tasks to automatically uninstrument.'
671
748
  },
672
749
  :'nbs.transaction_tracer.thrift' =>{
@@ -676,6 +753,20 @@ module TingYun
676
753
  :allowed_from_server => true,
677
754
  :description => 'Enable or disable the thrift cross application feature'
678
755
  },
756
+ :"thrift.enabled" => {
757
+ :default => false,
758
+ :public => true,
759
+ :type => Boolean,
760
+ :allowed_from_server => true,
761
+ :description => ''
762
+ },
763
+ :"function.fetch_enabled" => {
764
+ :default => true,
765
+ :public => true,
766
+ :type => Boolean,
767
+ :allowed_from_server => true,
768
+ :description => ''
769
+ },
679
770
  :restart_thread_in_children => {
680
771
  :default => true,
681
772
  :public => false,
@@ -688,9 +779,10 @@ module TingYun
688
779
  :public => true,
689
780
  :type => String,
690
781
  :allowed_from_server => true,
782
+ :exclude_from_reported_settings => true,
691
783
  :description => 'Quantile'
692
784
  },
693
- :'nbs.mq.enabled' => {
785
+ :'mq.enabled' => {
694
786
  :default => false,
695
787
  :public => true,
696
788
  :type => Boolean,
@@ -702,7 +794,226 @@ module TingYun
702
794
  :public => true,
703
795
  :type => Boolean,
704
796
  :allowed_from_server => true,
797
+ :exclude_from_reported_settings => true,
798
+ :description => 'Enable or disable the exception trace'
799
+ },
800
+ :"business_id.rules" => {
801
+ :default => "[]",
802
+ :public => true,
803
+ :type => String,
804
+ :allowed_from_server => true,
805
+ :description => ''
806
+ },
807
+ :"hotspot.black_list" => {
808
+ :default => "",
809
+ :public => true,
810
+ :type => String,
811
+ :allowed_from_server => true,
812
+ :description => ''
813
+ },
814
+ :'hotspot.enabled' => {
815
+ :default => false,
816
+ :public => true,
817
+ :type => Boolean,
818
+ :allowed_from_server => true,
819
+ :exclude_from_reported_settings => true,
705
820
  :description => 'Enable or disable the exception trace'
821
+ },
822
+ :"mTime" => {
823
+ :default => 0,
824
+ :public => true,
825
+ :type => Fixnum,
826
+ :allowed_from_server => true,
827
+ :description => ''
828
+ },
829
+ :"rum.mode" => {
830
+ :default => "",
831
+ :public => true,
832
+ :type => String,
833
+ :allowed_from_server => true,
834
+ :description => ''
835
+ },
836
+ :"action_tracer.obfuscate_sql" => {
837
+ :default => false,
838
+ :public => true,
839
+ :type => Boolean,
840
+ :allowed_from_server => true,
841
+ :description => ''
842
+ },
843
+ :"hotspot.period" => {
844
+ :default => 0,
845
+ :public => true,
846
+ :type => Fixnum,
847
+ :allowed_from_server => true,
848
+ :description => ''
849
+ },
850
+ :"action_tracer.stack_enabled" => {
851
+ :default => true,
852
+ :public => true,
853
+ :type => Boolean,
854
+ :allowed_from_server => true,
855
+ :description => ''
856
+ },
857
+ :"error_collector.stack_enabled" => {
858
+ :default => true,
859
+ :public => true,
860
+ :type => Boolean,
861
+ :allowed_from_server => true,
862
+ :description => ''
863
+ },
864
+ :"error_collector.enabled" => {
865
+ :default => true,
866
+ :public => true,
867
+ :type => Boolean,
868
+ :allowed_from_server => true,
869
+ :description => ''
870
+ },
871
+ :"hotspot.interval" => {
872
+ :default => 0,
873
+ :public => true,
874
+ :type => Fixnum,
875
+ :allowed_from_server => true,
876
+ :description => ''
877
+ },
878
+ :"action_tracer.rules" => {
879
+ :default => "[]",
880
+ :public => true,
881
+ :type => String,
882
+ :allowed_from_server => true,
883
+ :description => ''
884
+ },
885
+ :"business_error.rules" => {
886
+ :default => "[]",
887
+ :public => true,
888
+ :type => String,
889
+ :allowed_from_server => true,
890
+ :description => ''
891
+ },
892
+ :"apm_data.rules" => {
893
+ :default => "[]",
894
+ :public => true,
895
+ :type => String,
896
+ :allowed_from_server => true,
897
+ :description => ''
898
+ },
899
+ :"error_collector.ignored_exception_classes" => {
900
+ :default => "",
901
+ :public => true,
902
+ :type => String,
903
+ :allowed_from_server => true,
904
+ :description => ''
905
+ },
906
+ :"function.rules" => {
907
+ :default => "[]",
908
+ :public => true,
909
+ :type => String,
910
+ :allowed_from_server => true,
911
+ :description => ''
912
+ },
913
+ :"action_tracer.max" => {
914
+ :default => 2000,
915
+ :public => true,
916
+ :type => Fixnum,
917
+ :allowed_from_server => true,
918
+ :description => ''
919
+ },
920
+ :"log_tracking" => {
921
+ :default => true,
922
+ :public => true,
923
+ :type => Boolean,
924
+ :allowed_from_server => true,
925
+ :description => ''
926
+ },
927
+ :"data_item.rules" => {
928
+ :default => "",
929
+ :public => true,
930
+ :type => String,
931
+ :allowed_from_server => true,
932
+ :description => ''
933
+ },
934
+ :"quantile" => {
935
+ :default => "[]",
936
+ :public => true,
937
+ :type => String,
938
+ :allowed_from_server => true,
939
+ :description => ''
940
+ },
941
+ :"appId" => {
942
+ :default => 265,
943
+ :public => true,
944
+ :type => Fixnum,
945
+ :allowed_from_server => true,
946
+ :description => ''
947
+ },
948
+ :"ignore_static_resources" => {
949
+ :default => true,
950
+ :public => true,
951
+ :type => Boolean,
952
+ :allowed_from_server => true,
953
+ :description => ''
954
+ },
955
+ :"error_collector.ignored_status_codes" => {
956
+ :default => "",
957
+ :public => true,
958
+ :type => String,
959
+ :allowed_from_server => true,
960
+ :description => ''
961
+ },
962
+ :"custom_data.max" => {
963
+ :default => 1000,
964
+ :public => true,
965
+ :type => Fixnum,
966
+ :allowed_from_server => true,
967
+ :description => ''
968
+ },
969
+ :"hotspot.white_list" => {
970
+ :default => "",
971
+ :public => true,
972
+ :type => String,
973
+ :allowed_from_server => true,
974
+ :description => ''
975
+ },
976
+ :"hotspot.rules" => {
977
+ :default => "[]",
978
+ :public => true,
979
+ :type => String,
980
+ :allowed_from_server => true,
981
+ :description => ''
982
+ },
983
+ :"custom_data.rules" => {
984
+ :default => "[]",
985
+ :public => true,
986
+ :type => String,
987
+ :allowed_from_server => true,
988
+ :description => ''
989
+ },
990
+ :"business_data.rules" => {
991
+ :default => "[]",
992
+ :public => true,
993
+ :type => String,
994
+ :allowed_from_server => true,
995
+ :description => ''
996
+ },
997
+ :"nosql.rules" => {
998
+ :default => "[]",
999
+ :public => true,
1000
+ :type => String,
1001
+ :allowed_from_server => true,
1002
+ :description => ''
1003
+ },
1004
+ :"data.rules" => {
1005
+ :default => "[]",
1006
+ :public => true,
1007
+ :type => String,
1008
+ :allowed_from_server => true,
1009
+ :description => ''
1010
+ },
1011
+ :"resource_breaker" => {
1012
+ :default => {},
1013
+ :public => true,
1014
+ :type => Hash,
1015
+ :allowed_from_server => true,
1016
+ :description => ''
706
1017
  }
707
1018
  }.freeze
708
1019
  end