Skip to content

Commit

Permalink
Force rdkafka metrics to use same prom-client
Browse files Browse the repository at this point in the history
We need to forcefully resolve prom-client to the same version, so that
the packages can be de-duped and the kakfa metrics end up in the
metrics registry we expose.

Issue: BB-443
  • Loading branch information
francoisferrand committed Oct 13, 2023
1 parent 2d7353d commit 344245f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
"vaultclient": "scality/vaultclient#8.3.11",
"werelogs": "scality/werelogs#8.1.2"
},
"resolutions": {
"node-rdkafka-prometheus/prom-client": "14.2.0"
},
"devDependencies": {
"@zenko/cloudserver": "git+https://github.com/scality/cloudserver#8.6.8",
"eslint": "^8.14.0",
Expand Down
3 changes: 3 additions & 0 deletions tests/functional/lib/BackbeatConsumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ describe('BackbeatConsumer main tests', () => {
producer.send(messages, err => {
assert.ifError(err);
});

// Check that rdkafka metrics are indeed exported
assert(metrics.ZenkoMetrics.getMetric('rdkafka_cgrp_assignment_size') !== undefined);
}).timeout(30000);

it('should not consume messages when paused and when resumed, consume ' +
Expand Down
16 changes: 1 addition & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4544,34 +4544,20 @@ prom-client@10.2.3:
dependencies:
tdigest "^0.1.1"

prom-client@14.2.0:
prom-client@14.2.0, prom-client@^12.0.0, prom-client@^14.0.1:
version "14.2.0"
resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-14.2.0.tgz#ca94504e64156f6506574c25fb1c34df7812cf11"
integrity sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA==
dependencies:
tdigest "^0.1.1"

prom-client@^12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-12.0.0.tgz#9689379b19bd3f6ab88a9866124db9da3d76c6ed"
integrity sha512-JbzzHnw0VDwCvoqf8y1WDtq4wSBAbthMB1pcVI/0lzdqHGJI3KBJDXle70XK+c7Iv93Gihqo0a5LlOn+g8+DrQ==
dependencies:
tdigest "^0.1.1"

prom-client@^13.1.0:
version "13.2.0"
resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-13.2.0.tgz#99d13357912dd400f8911b77df19f7b328a93e92"
integrity sha512-wGr5mlNNdRNzEhRYXgboUU2LxHWIojxscJKmtG3R8f4/KiWqyYgXTLHs0+Ted7tG3zFT7pgHJbtomzZ1L0ARaQ==
dependencies:
tdigest "^0.1.1"

prom-client@^14.0.1:
version "14.0.1"
resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-14.0.1.tgz#bdd9583e02ec95429677c0e013712d42ef1f86a8"
integrity sha512-HxTArb6fkOntQHoRGvv4qd/BkorjliiuO2uSWC2KC17MUTKYttWdDoXX/vxOhQdkoECEM9BBH0pj2l8G8kev6w==
dependencies:
tdigest "^0.1.1"

prometheus-query@^3.3.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/prometheus-query/-/prometheus-query-3.3.2.tgz#b1f605fad7d771b8992d77c61087bd6fbbf180cc"
Expand Down

0 comments on commit 344245f

Please sign in to comment.