Skip to content

Commit

Permalink
Merge branch 'feat/DEX-2306/fix-metrics' into 'master'
Browse files Browse the repository at this point in the history
[DEX-2306] feat: fix metrics

Closes DEX-2306

See merge request nstmrt/rubygems/sbmt-kafka_consumer!53
  • Loading branch information
bibendi committed Jun 17, 2024
2 parents 3efb821 + 035b80d commit f3d0c62
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

## [2.4.1] - 2024-06-15

### Fixed

- Fixed display of metrics `kafka_api_calls` and `kafka_api_errors`

## [2.4.0] - 2024-06-06

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ def report_broker_stats(brokers)
}

Yabeda.kafka_api.calls
.increment(broker_tags, by: broker_statistics["tx"])
.increment(broker_tags, by: broker_statistics["tx_d"])
Yabeda.kafka_api.latency
.measure(broker_tags, broker_statistics["rtt"]["avg"])
Yabeda.kafka_api.request_size
.measure(broker_tags, broker_statistics["txbytes"])
Yabeda.kafka_api.response_size
.measure(broker_tags, broker_statistics["rxbytes"])
Yabeda.kafka_api.errors
.increment(broker_tags, by: broker_statistics["txerrs"] + broker_statistics["rxerrs"])
.increment(broker_tags, by: broker_statistics["txerrs_d"] + broker_statistics["rxerrs_d"])
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/sbmt/kafka_consumer/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Sbmt
module KafkaConsumer
VERSION = "2.4.0"
VERSION = "2.4.1"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"name" => "kafka:9092/1001",
"nodeid" => 1001,
"nodename" => "kafka:9092",
"tx" => 7,
"tx_d" => 7,
"txbytes" => 338,
"txerrs" => 0,
"txerrs_d" => 0,
"rx" => 7,
"rxbytes" => 827,
"rxerrs" => 0,
"rxerrs_d" => 0,
"rtt" => {
"avg" => 1984
}
Expand Down

0 comments on commit f3d0c62

Please sign in to comment.