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

Incorrectly enabling/disabling metrics #1709

Open
lasanthaS opened this issue Jul 10, 2019 · 0 comments
Open

Incorrectly enabling/disabling metrics #1709

lasanthaS opened this issue Jul 10, 2019 · 0 comments

Comments

@lasanthaS
Copy link
Contributor

Description:
On enabling and disabling memory metrics from the SiddhiAppRuntime, memory metrics are removed and added back to the metrics registry[1][2]. This implementation is incorrect and cause issues when looking up for the metrics by name. Hence instead of removing and adding, metrics level should be set to OFF and other relevant levels.

[1] https://github.com/wso2/carbon-analytics/blob/master/components/org.wso2.carbon.si.metrics.core/src/main/java/org/wso2/carbon/si/metrics/core/SPMemoryUsageMetric.java#L65
[2] https://github.com/wso2/carbon-analytics/blob/master/components/org.wso2.carbon.si.metrics.core/src/main/java/org/wso2/carbon/si/metrics/core/SPMemoryUsageMetric.java#L73

Affected Product Version:
3.0.0-SNAPSHOT

OS, DB, other environment details and versions:

Steps to reproduce:
Refer https://github.com/wso2/carbon-analytics/blob/master/components/org.wso2.carbon.si.metrics.core/src/test/java/org/wso2/carbon/sp/metrics/core/StatisticsTestCase.java

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

No branches or pull requests

1 participant