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

Hazelcast Cache Metrics, "put" operation count incorrect #3556

Closed
neilstevenson opened this issue Dec 4, 2022 · 1 comment · Fixed by #3558
Closed

Hazelcast Cache Metrics, "put" operation count incorrect #3556

neilstevenson opened this issue Dec 4, 2022 · 1 comment · Fixed by #3558
Labels
bug A general bug module: micrometer-core An issue that is related to our core module
Milestone

Comments

@neilstevenson
Copy link

Describe the bug
Hazelcast has two variations for IMap writing, "put" and "set".

Hazelcast's Spring Cache uses the latter
(https://github.com/hazelcast/hazelcast/blob/master/hazelcast-spring/src/main/java/com/hazelcast/spring/cache/HazelcastCache.java#L114)

Micrometer counts the former (https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/HazelcastCacheMetrics.java#L125)

It should use localMapStats.getPutOperationCount() + localMapStats.getSetOperationCount()

Environment
N/a

To Reproduce
I don't have code, but anything @Cacheable in Spring that saves to Hazelcast should be enough.

Expected behavior
Cache "put" counts should report as non-zero

Additional context
See also hazelcast/hazelcast#23063, which may change the implement from IMap set to IMap put

@izeye
Copy link
Contributor

izeye commented Dec 8, 2022

I created #3558 to try to resolve this.

@jonatan-ivanov jonatan-ivanov added bug A general bug and removed waiting-for-triage labels Jan 11, 2023
@shakuzen shakuzen added the module: micrometer-core An issue that is related to our core module label Jan 12, 2023
izeye added a commit to izeye/micrometer that referenced this issue Jan 12, 2023
@jonatan-ivanov jonatan-ivanov added this to the 1.9.x milestone Jan 12, 2023
@jonatan-ivanov jonatan-ivanov modified the milestones: 1.9.x, 1.9.8 Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A general bug module: micrometer-core An issue that is related to our core module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants