Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReliableTopic totalPublishes metric is always 0 #19555

Closed
erosb opened this issue Sep 17, 2021 · 0 comments · Fixed by #19642
Closed

ReliableTopic totalPublishes metric is always 0 #19555

erosb opened this issue Sep 17, 2021 · 0 comments · Fixed by #19642

Comments

@erosb
Copy link
Contributor

erosb commented Sep 17, 2021

This was reported by a community user at: https://groups.google.com/g/hazelcast/c/AaNdgDamGtc

Describe the bug

The reliableTopic.totalPublishes metric is always 0.

Expected behavior
The reliableTopic.totalPublishes should be incremented on each publish, just like topic.totalPublishes

To Reproduce

Steps to reproduce the behavior:

  1. Start a HZ 4.2.2 (or 5.0-BETA-2) member with docker run -p 5701:5701 hazelcast/hazelcast:4.2.2
  2. Start MC with java -Dhazelcast.mc.prometheusExporter.enabled=true -Dhazelcast.mc.license='<any-valid-license>' -jar target/hazelcast-management-center-5.0-SNAPSHOT.jar
  3. Start running the following client snippet:
        HazelcastInstance client = HazelcastClient.newHazelcastClient();
        ITopic<String> reliableTopic = client.getReliableTopic("myRB");
        ITopic<String> topic = client.getTopic("my-topic");
        for (int i = 0; ; ++i) {
            Thread.sleep(50);
            reliableTopic.publish("my message " + i);
            topic.publish("my message " + i);
        }
  1. run curl http://localhost:8080/metrics

Expected output: the hz_reliableTopic_totalPublishes{mc_cluster="dev",mc_member="172.17.0.2:5701",name="myRB",unit="COUNT",} metric has a value higher than 0
Actual output: hz_reliableTopic_totalPublishes{mc_cluster="dev",mc_member="172.17.0.2:5701",name="myRB",unit="COUNT",} is 0.0 in the metric dump

Additional context

It is reproducible with

  • HZ 4.2.2 and MC 4.2021.6
  • HZ 4.2.2 and MC 5.0-SNAPSHOT
  • HZ 5.0-BETA-2 and MC 5.0-SNAPSHOT
@promanenko promanenko self-assigned this Sep 22, 2021
@mmedenjak mmedenjak added this to the 5.1 milestone Sep 28, 2021
promanenko added a commit that referenced this issue Sep 28, 2021
Previously ReliableTopic stats (published/received messages) were reported only when ReliableTopicProxy was used. No stats were reported If ClientReliableTopicProxy was used. Since ReliableTopic is always backed by a RingBuffer, we can report ReliableTopic stats from the RB operations if the RB name has a prefix "_hz_rb_"

Fixes #19555
promanenko added a commit to promanenko/hazelcast that referenced this issue Sep 28, 2021
Previously ReliableTopic stats (published/received messages) were reported only when ReliableTopicProxy was used. No stats were reported If ClientReliableTopicProxy was used. Since ReliableTopic is always backed by a RingBuffer, we can report ReliableTopic stats from the RB operations if the RB name has a prefix "_hz_rb_"

Fixes hazelcast#19555
promanenko added a commit to promanenko/hazelcast that referenced this issue Sep 28, 2021
Previously ReliableTopic stats (published/received messages) were reported only when ReliableTopicProxy was used. No stats were reported If ClientReliableTopicProxy was used. Since ReliableTopic is always backed by a RingBuffer, we can report ReliableTopic stats from the RB operations if the RB name has a prefix "_hz_rb_"

Fixes hazelcast#19555
promanenko added a commit that referenced this issue Sep 29, 2021
Previously ReliableTopic stats (published/received messages) were reported only when ReliableTopicProxy was used. No stats were reported If ClientReliableTopicProxy was used. Since ReliableTopic is always backed by a RingBuffer, we can report ReliableTopic stats from the RB operations if the RB name has a prefix "_hz_rb_"

Fixes #19555
promanenko added a commit that referenced this issue Sep 29, 2021
Previously ReliableTopic stats (published/received messages) were reported only when ReliableTopicProxy was used. No stats were reported If ClientReliableTopicProxy was used. Since ReliableTopic is always backed by a RingBuffer, we can report ReliableTopic stats from the RB operations if the RB name has a prefix "_hz_rb_"

Fixes #19555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants