You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "clebert suconic (Jira)" <ji...@apache.org> on 2019/08/26 15:48:06 UTC
[jira] [Reopened] (ARTEMIS-2429) Swapped arguments to
registerQueueGauge cause wrong tags on metrics
[ https://issues.apache.org/jira/browse/ARTEMIS-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
clebert suconic reopened ARTEMIS-2429:
--------------------------------------
> Swapped arguments to registerQueueGauge cause wrong tags on metrics
> -------------------------------------------------------------------
>
> Key: ARTEMIS-2429
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2429
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.9.0
> Reporter: Jiri Daněk
> Priority: Major
> Fix For: 2.10.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {noformat}
> *** CID 1483198: API usage errors (SWAPPED_ARGUMENTS)
> /activemq-artemis/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java: 3872 in org.apache.activemq.artemis.core.server.impl.QueueImpl.registerMeters()()
> 3866 String addressName = address.toString();
> 3867 String queueName = name.toString();
> 3868
> 3869 if (server != null && server.getMetricsManager() != null) {
> 3870 MetricsManager metricsManager = server.getMetricsManager();
> 3871
> >>> CID 1483198: API usage errors (SWAPPED_ARGUMENTS)
> >>> The positions of arguments in the call to "registerQueueGauge" do not match the ordering of the parameters:
> * "queueName" is passed to "address"
> * "addressName" is passed to "queue"
> 3872 metricsManager.registerQueueGauge(queueName, addressName, (builder) -> {
> 3873 builder.register(QueueMetricNames.MESSAGE_COUNT, pendingMetrics, metrics -> Double.valueOf(pendingMetrics.getMessageCount()), QueueControl.MESSAGE_COUNT_DESCRIPTION);
> 3874 builder.register(QueueMetricNames.DURABLE_MESSAGE_COUNT, pendingMetrics, metrics -> Double.valueOf(pendingMetrics.getDurableMessageCount()), QueueControl.DURABLE_MESSAGE_COUNT_DESCRIPTION);
> 3875 builder.register(QueueMetricNames.PERSISTENT_SIZE, pendingMetrics, metrics -> Double.valueOf(pendingMetrics.getPersistentSize()), QueueControl.PERSISTENT_SIZE_DESCRIPTION);
> 3876 builder.register(QueueMetricNames.DURABLE_PERSISTENT_SIZE, pendingMetrics, metrics -> Double.valueOf(pendingMetrics.getDurablePersistentSize()), QueueControl.DURABLE_PERSISTENT_SIZE_DESCRIPTION);
> 3877
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)