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_producer!31
  • Loading branch information
bibendi committed Jun 17, 2024
2 parents 689981e + 44e6d51 commit bed1f9b
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.2.2] - 2024-06-15

### Fixed

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

## [2.2.1] - 2024-06-07

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,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
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sbmt/kafka_producer/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Sbmt
module KafkaProducer
VERSION = "2.2.1"
VERSION = "2.2.2"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,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 bed1f9b

Please sign in to comment.