logstash-codec-kafka_time_machine 0.1.0 → 0.1.1

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: 6a00a02e273acd58d4a7e6a06573f02e100202d2
4
- data.tar.gz: 6c0dfc8295cb4d4cc769c26beb3deca3220b5fb1
3
+ metadata.gz: 42b80b69357776f92c17abeadbae911f7914c5e4
4
+ data.tar.gz: 84871530eb440f8275e46244fdc08f9d843199fc
5
5
  SHA512:
6
- metadata.gz: 3163b97371f86c32c2725e5813781c2e20c4bd458ba5090d0dad0cc8fccf116b1a7c499cbdee940cf20fcdae98d8aa1c2d3a31423af2b233d17df85bfc71595a
7
- data.tar.gz: f61e0581276644f12d0d301145f9ac9be37a78e198329ade28bcfc92ddc1850b25c99b68bfa78aeaeeef80413df85e622a7431d2e1ec0bd7df2b916414a81257
6
+ metadata.gz: 1d7bdcfd319559c39e28aca9dd3156691b5241c18e22210338ade70fc002cff216b9fa01c0ea5f1f827aca639760342e915afcd6d73f27bb04ee69d2d4af05db
7
+ data.tar.gz: c87e09a8a8229e50dfcc39ae3e907c99f7bf3073098b7887e66d7d2645399f90fce30b1e0d9d949464d933cc9f82443fa1038e88647678c6fa76ec8a9daab015
@@ -47,8 +47,8 @@ class LogStash::Codecs::KafkaTimeMachine < LogStash::Codecs::Base
47
47
  kafka_datacenter_producer = event.get("[@metadata][kafka_datacenter_producer]")
48
48
  kafka_topic_producer = event.get("[@metadata][kafka_topic_producer]")
49
49
  kafka_consumer_group_producer = event.get("[@metadata][kafka_consumer_group_producer]")
50
- kafka_append_time_producer = Integer(event.get("[@metadata][kafka_append_time_producer]")) rescue nil
51
- logstash_kafka_read_time_producer = Integer(event.get("[@metadata][logstash_kafka_read_time_producer]")) rescue nil
50
+ kafka_append_time_producer = Float(event.get("[@metadata][kafka_append_time_producer]")) rescue nil
51
+ logstash_kafka_read_time_producer = Float(event.get("[@metadata][logstash_kafka_read_time_producer]")) rescue nil
52
52
 
53
53
  kafka_producer_array = Array[kafka_datacenter_producer, kafka_topic_producer, kafka_consumer_group_producer, kafka_append_time_producer, logstash_kafka_read_time_producer]
54
54
  @logger.debug("kafka_producer_array: #{kafka_producer_array}")
@@ -60,6 +60,8 @@ class LogStash::Codecs::KafkaTimeMachine < LogStash::Codecs::Base
60
60
  else
61
61
  @logger.debug("kafka_producer_array valid")
62
62
  producer_valid = true
63
+ logstash_kafka_read_time_producer = logstash_kafka_read_time_producer.to_i
64
+ kafka_append_time_producer = kafka_append_time_producer.to_i
63
65
  kafka_producer_lag_ms = logstash_kafka_read_time_producer - kafka_append_time_producer
64
66
  end
65
67
 
@@ -67,8 +69,8 @@ class LogStash::Codecs::KafkaTimeMachine < LogStash::Codecs::Base
67
69
  kafka_datacenter_aggregate = event.get("[@metadata][kafka_datacenter_aggregate]")
68
70
  kafka_topic_aggregate = event.get("[@metadata][kafka_topic_aggregate]")
69
71
  kafka_consumer_group_aggregate = event.get("[@metadata][kafka_consumer_group_aggregate]")
70
- kafka_append_time_aggregate = Integer(event.get("[@metadata][kafka_append_time_aggregate]")) rescue nil
71
- logstash_kafka_read_time_aggregate = Integer(event.get("[@metadata][logstash_kafka_read_time_aggregate]")) rescue nil
72
+ kafka_append_time_aggregate = Float(event.get("[@metadata][kafka_append_time_aggregate]")) rescue nil
73
+ logstash_kafka_read_time_aggregate = Float(event.get("[@metadata][logstash_kafka_read_time_aggregate]")) rescue nil
72
74
 
73
75
  kafka_aggregate_array = Array[kafka_datacenter_aggregate, kafka_topic_aggregate, kafka_consumer_group_aggregate, kafka_append_time_aggregate, logstash_kafka_read_time_aggregate]
74
76
  @logger.debug("kafka_aggregate_array: #{kafka_aggregate_array}")
@@ -80,6 +82,8 @@ class LogStash::Codecs::KafkaTimeMachine < LogStash::Codecs::Base
80
82
  else
81
83
  @logger.debug("kafka_aggregate_array valid")
82
84
  aggregate_valid = true
85
+ logstash_kafka_read_time_aggregate = logstash_kafka_read_time_aggregate.to_i
86
+ kafka_append_time_aggregate = kafka_append_time_aggregate.to_i
83
87
  kafka_aggregate_lag_ms = logstash_kafka_read_time_aggregate - kafka_append_time_aggregate
84
88
  end
85
89
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-codec-kafka_time_machine'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.1'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Calculate total time of logstash event that traversed 2 Kafka queues from a producer site to an aggregate site"
6
6
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-kafka_time_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Foster
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-11 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core-plugin-api