tingyun_rpm 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42cfa48ff65b496435593ce17a380b7bff332c65
|
4
|
+
data.tar.gz: f5afe74bed3f331d60977bebfdf4c51da40c3a47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba7ada9279f07888fbacfe7f1ed7334f66143d99138a7395448225f7d98e0ef2cb9db4596c8e84b3cc53ac7567477452dd6a0614b6d40d0460e0c1a55b34cc5a
|
7
|
+
data.tar.gz: 12c24299ef09a1698720cca513e4b5bdfbd2b7065cec4e1d1e350ce06a69fc4f2adb40b02acca889735933d58b9367fd9046e786369ee3fdf0c4924d62d25e5d
|
@@ -44,12 +44,6 @@ module TingYun
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
def self.metrics_for_message(product, ip_host, operation)
|
48
|
-
metrics = TingYun::Agent::Transaction.recording_web_transaction? ? [ALL_WEB, ALL] : [ALL_BACKGROUND, ALL]
|
49
|
-
metrics = metrics.map { |suffix| "Message #{product}/NULL/#{suffix}" }
|
50
|
-
metrics.unshift "Message #{product}/#{ip_host}/#{operation}"
|
51
|
-
end
|
52
|
-
|
53
47
|
def self.metrics_for(product, operation, host = UNKNOWN, port = 0, dbname = UNKNOWN, collection = nil, generic_product = nil )
|
54
48
|
dbname ||= UNKNOWN
|
55
49
|
host ||= UNKNOWN
|
@@ -39,8 +39,8 @@ TingYun::Support::LibraryDetection.defer do
|
|
39
39
|
else
|
40
40
|
metric_name << "Exchange%2F#{name}/Produce"
|
41
41
|
end
|
42
|
-
summary_metrics = TingYun::
|
43
|
-
TingYun::Agent::Transaction.wrap(state, metric_name , :
|
42
|
+
summary_metrics = TingYun::Instrumentation::Support::ExternalHelper.metrics_for_message('RabbitMQ', "#{@channel.connection.host}:#{@channel.connection.port}", 'Produce')
|
43
|
+
TingYun::Agent::Transaction.wrap(state, metric_name , :RabbitMQ, {}, summary_metrics) do
|
44
44
|
opts[:headers] = {} unless opts[:headers]
|
45
45
|
opts[:headers]["TingyunID"] = create_tingyun_id("mq") if TingYun::Agent.config[:'nbs.transaction_tracer.enabled']
|
46
46
|
TingYun::Agent.record_metric("#{metric_name}%2FByte",payload.bytesize) if payload
|
@@ -89,9 +89,9 @@ TingYun::Support::LibraryDetection.defer do
|
|
89
89
|
|
90
90
|
state.save_referring_transaction_info(tingyun_id_secret.split(';')) if cross_app_enabled?(tingyun_id_secret)
|
91
91
|
|
92
|
-
summary_metrics = TingYun::
|
92
|
+
summary_metrics = TingYun::Instrumentation::Support::ExternalHelper.metrics_for_message('RabbitMQ', "#{@channel.connection.host}:#{@channel.connection.port}", 'Consume')
|
93
93
|
|
94
|
-
TingYun::Agent::Transaction.wrap(state, "Message RabbitMQ/#{metric_name}" , :
|
94
|
+
TingYun::Agent::Transaction.wrap(state, "Message RabbitMQ/#{metric_name}" , :message, {:mq=> true}, summary_metrics) do
|
95
95
|
TingYun::Agent::Transaction.set_frozen_transaction_name!(transaction_name)
|
96
96
|
TingYun::Agent.record_metric("Message RabbitMQ/#{metric_name}%2FByte",args[2].bytesize) if args[2]
|
97
97
|
TingYun::Agent.record_metric("Message RabbitMQ/#{metric_name}%2FWait", TingYun::Helper.time_to_millis(Time.now)-state.externel_time.to_i) rescue 0
|
@@ -147,8 +147,8 @@ TingYun::Support::LibraryDetection.defer do
|
|
147
147
|
begin
|
148
148
|
state = TingYun::Agent::TransactionState.tl_get
|
149
149
|
metric_name = "#{@connection.host}:#{@connection.port}%2FQueue%2F#{args[0]}/Consume"
|
150
|
-
summary_metrics = TingYun::
|
151
|
-
TingYun::Agent::Transaction.wrap(state, "Message RabbitMQ/#{metric_name}" , :
|
150
|
+
summary_metrics = TingYun::Instrumentation::Support::ExternalHelper.metrics_for_message('RabbitMQ', "#{connection.host}:#{connection.port}", 'Consume')
|
151
|
+
TingYun::Agent::Transaction.wrap(state, "Message RabbitMQ/#{metric_name}" , :RabbitMQ, {}, summary_metrics) do
|
152
152
|
basic_get_without_tingyun(*args)
|
153
153
|
end
|
154
154
|
rescue =>e
|
@@ -23,6 +23,12 @@ module TingYun
|
|
23
23
|
end
|
24
24
|
guid
|
25
25
|
end
|
26
|
+
|
27
|
+
def self.metrics_for_message(product, ip_host, operation)
|
28
|
+
metrics =["AllWeb", "All"]
|
29
|
+
metrics = metrics.map { |suffix| "Message #{product}/NULL/#{suffix}" }
|
30
|
+
metrics.unshift "Message #{product}/#{ip_host}/#{operation}"
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
28
34
|
end
|
data/lib/ting_yun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tingyun_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tingyun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|