zuora_connect 1.7.01 → 1.7.02

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d54a3b74b6ab7f14220d17b05bc19b1d46f1aed8
4
- data.tar.gz: da0230aa45090b77d9ca3935ff223d741b2b4e39
3
+ metadata.gz: 594401d6339de6b47b3fb18df373885602d46cf2
4
+ data.tar.gz: 1e04f4996a73181a28cbd49a54544df4aaaab95c
5
5
  SHA512:
6
- metadata.gz: f9fced822a0969b0cce48de0dadfb1e5eda785c92f506b8781acac7ec2aae32e29bc5ac7e614971e6ef86667526df639ed6dd0758d783b7e8127fd48bdb5f271
7
- data.tar.gz: 491efb0af4c0f5c8d3d3c057278ea860d4b44d305e894f3b80ea1ea2bdc888d0ffb1c42bc2e305c3d5b3ed99c4d4acfc4cf37639fcadbce76b9e85f58713f4c0
6
+ metadata.gz: 124d750f69180609410a6eb3e0fca28ce8faa9fbc67b93e65c79342aa70e9d1bf1746bbe3eda7874ec74efcecb25c0af47cc08d18ae9ddfa6523d01e95543b43
7
+ data.tar.gz: 3689ba84238f716ed5d37bdd3718439154e34081fd6acade2936333141b81f0ec70f352eec94a3ac1749812aef095bc9cf5fc8f748ab561972e80ca40567e349
@@ -60,30 +60,28 @@ module ZuoraConnect
60
60
 
61
61
  # Write to telegraf
62
62
  def self.write_to_telegraf(direction: nil, tags: {}, values: {})
63
- Rails.logger.tagged("Telegraf") do
64
- time = Benchmark.measure do |bench|
65
- # To avoid writing metrics from rspec tests
66
- if ENV['DEIS_APP'] || true
67
- # Getting the process type
68
- p_type = self.get_process_type
69
- app_instance = Thread.current[:appinstance].present? ? Thread.current[:appinstance].id : 0
70
- tags = tags.merge({ app_name: ZuoraConnect.configuration.app_name, process_type: p_type, app_instance: app_instance})
71
-
72
- if direction == :inbound && ZuoraConnect.configuration.enable_inbound_metrics_flag
73
- series = ZuoraConnect.configuration.influxdb_series_name_inbound
74
- self.write_metric(series: series, tags: tags, values: values)
75
- elsif direction == :outbound && ZuoraConnect.configuration.enable_outbound_metrics_flag
76
- series = ZuoraConnect.configuration.influxdb_series_name_outbound
77
- self.write_metric(series: series, tags: tags, values: values)
78
- end
79
-
63
+ time = Benchmark.measure do |bench|
64
+ # To avoid writing metrics from rspec tests
65
+ if ENV['DEIS_APP'] || true
66
+ # Getting the process type
67
+ p_type = self.get_process_type
68
+ app_instance = Thread.current[:appinstance].present? ? Thread.current[:appinstance].id : 0
69
+ tags = tags.merge({ app_name: ZuoraConnect.configuration.app_name, process_type: p_type, app_instance: app_instance})
70
+
71
+ if direction == :inbound && ZuoraConnect.configuration.enable_inbound_metrics_flag
72
+ series = ZuoraConnect.configuration.influxdb_series_name_inbound
73
+ self.write_metric(series: series, tags: tags, values: values)
74
+ elsif direction == :outbound && ZuoraConnect.configuration.enable_outbound_metrics_flag
75
+ series = ZuoraConnect.configuration.influxdb_series_name_outbound
76
+ self.write_metric(series: series, tags: tags, values: values)
80
77
  end
78
+
81
79
  end
82
- if ZuoraConnect.configuration.telegraf_debug
83
- Rails.logger.debug(tags.to_s)
84
- Rails.logger.debug(values.to_s)
85
- Rails.logger.debug("Writing #{direction.capitalize}: #{time.real.round(4)}")
86
- end
80
+ end
81
+ if ZuoraConnect.configuration.telegraf_debug
82
+ Rails.logger.debug(tags.to_s)
83
+ Rails.logger.debug(values.to_s)
84
+ Rails.logger.debug("Writing #{direction.capitalize}: #{time.real.round(4)}")
87
85
  end
88
86
  end
89
87
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.7.01"
2
+ VERSION = "1.7.02"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.01
4
+ version: 1.7.02
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team