[JBoss JIRA] (DROOLS-2552) KieBase Deserialization: NullPointerException
by Florian Braun (Jira)
[ https://issues.jboss.org/browse/DROOLS-2552?page=com.atlassian.jira.plugi... ]
Florian Braun commented on DROOLS-2552:
---------------------------------------
Thank you. This must have changed between 6 and 7? This was our one stumbling block trying to upgrade and since maven is the canonical way to build the kiebases the lack of documentation made this hard to figure out.
Our project has been using drools since 4 and we have a lot of our own code to mark up and build kiebases and serialize them. I am trying to move the project to maven but doing so is not an easy process so in the meantime the ability to programmatically build and serialize is needed and appreciated. Thank you again.
> KieBase Deserialization: NullPointerException
> ---------------------------------------------
>
> Key: DROOLS-2552
> URL: https://issues.jboss.org/browse/DROOLS-2552
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.7.0.Final
> Environment: Windows 7, Java 1.8, Drools 7.7.0.Final, jBPM 7.7.0.Final
> Reporter: Florian Braun
> Assignee: Mario Fusco
> Priority: Critical
>
> I have run into an issue with the KieBase serialization throwing a NullPointerException when using exists and parentheses around an or when rules are in a RuleFlowGroup.
> Example rules:
> package com.sample.rules
> rule "Your First Rule"
> ruleflow-group "group1"
> when
> exists ( String(this == "Hello") or String(this == "World") )
> then
> System.out.println("Hello or World");
> end
> rule "Your Second Rule"
> ruleflow-group "group1"
> when
> $string: String(this == "Hello World")
> then
> System.out.println($string);
> end
> Having the first rule wrap the or in () will cause a deserialization NPE:
> Exception in thread "main" java.lang.NullPointerException
> at org.drools.core.common.BaseNode.getSinks(BaseNode.java:241)
> at org.drools.core.impl.KnowledgeBaseImpl.rewireNodeAfterDeserialization(KnowledgeBaseImpl.java:494)
> at org.drools.core.impl.KnowledgeBaseImpl.rewireNodeAfterDeserialization(KnowledgeBaseImpl.java:511)
> at org.drools.core.impl.KnowledgeBaseImpl.rewireNodeAfterDeserialization(KnowledgeBaseImpl.java:511)
> at org.drools.core.impl.KnowledgeBaseImpl.rewireNodeAfterDeserialization(KnowledgeBaseImpl.java:511)
> at org.drools.core.impl.KnowledgeBaseImpl.rewireReteAfterDeserialization(KnowledgeBaseImpl.java:489)
> at org.drools.core.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:483)
> ....
> Some testing shows this:
> If the first rule is on its own then this error does *not* occur.
> If the first rule does not use () the error does *not* occur. This of course means that the rule behaves differently
> If the rules are not in an rfg this error does *not* occur
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-11374) Master Artemis in Wildfly 10.1.0.Final is not announcing backup when restarted
by Miroslav Novak (Jira)
[ https://issues.jboss.org/browse/WFLY-11374?page=com.atlassian.jira.plugin... ]
Miroslav Novak commented on WFLY-11374:
---------------------------------------
All the ways to stop server are correct. There must not be a difference.
You're right that I used ctrl+c to stop master/live. However when I tried to stop live/master using kill -15 or /jboss-cli.sh -c ...--command=":shutdown()" and then started again then I could master announcing itself as backup:
{code}
14:58:01,308 INFO [org.apache.activemq.artemis.core.server] (AMQ119000: Activation for server ActiveMQServerImpl::serverUUID=null) AMQ221109: Apache ActiveMQ Artemis Backup Server version 1.1.0.wildfly-017 [null] started, waiting live to fail before it gets active
14:58:01,433 ERROR [org.apache.activemq.artemis.core.server] (Thread-3 (ActiveMQ-client-netty-threads-1057127915)) AMQ224056: Live server will not fail-back automatically
14:58:01,618 ERROR [org.apache.activemq.artemis.core.server] (Thread-3 (ActiveMQ-client-netty-threads-1057127915)) AMQ224056: Live server will not fail-back automatically
14:58:01,912 INFO [org.apache.activemq.artemis.core.server] (Thread-3 (ActiveMQ-client-netty-threads-1057127915)) AMQ221024: Backup server ActiveMQServerImpl::serverUUID=35296b07-f173-11e8-a098-53ea761b98b6 is synchronized with live-server.
14:58:03,299 INFO [org.apache.activemq.artemis.core.server] (Thread-2 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$2@726c395e-929999223)) AMQ221031: backup announced
{code}
What is the custom way by which you start the servers?
> Master Artemis in Wildfly 10.1.0.Final is not announcing backup when restarted
> ------------------------------------------------------------------------------
>
> Key: WFLY-11374
> URL: https://issues.jboss.org/browse/WFLY-11374
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 10.1.0.Final
> Reporter: Srinivas ev
> Assignee: Jeff Mesnil
> Priority: Blocker
> Attachments: active standalone full ha.xml, master and slave log samples on startup.txt, master restart.txt, master shutdown.txt, master-server-linux.log, master-server-windows.log, master.xml, rotateserver_active.log, rotateserver_active.log, rotateserver_backup.log, rotateserver_slave.log, slave standalone full ha.xml, slave-server-linux.log, slave-server-windows.log, slave.xml
>
>
> I have 2 wildfly servers acting as artemis master and slave. I am expecting failback and replication and the related configurations are done for this to work.
> This is working as expected when I have the setup in Windows. Failing in linux RHEL 7.3 machine.
> master in standalone-full-ha.xml - refer master.xml
> slave in standalone-full-ha.xml - refer slave.xml
> In the startup script, I am passing all the values for placeholders of my server host ip's accordingly.
> Test scenario -
> 1. Bring master up.
> 2. Bring slave up.
> 3. slave will announce the backup. (AMQ221031: backup announced).
> 4. Make master down.
> 5. Replication is success.
> 6. Slave is acting as master/live.
> 7. Make master up.
> Issue - master is unable to announce the backup and starts normally as a standalone wildfly.
> This backup announcement works fine in windows and failover also works as expected.
> Please let me know if anything specific required along with this details.
> Artemis jar version - artemis-*****-1.1.0.wildfly-017.jar
> in path - /opt/aor/${my project}/wildfly/modules/system/layers/base/org/apache/activemq/artemis/main
> Few logs I found which may be impacting and I am not clear -
> 1.2018-11-21 14:28:07,238 TRACE [org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionBridge] (Thread-18 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$2@38e819b6-2112524495)) Setting up bridge between TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&httpPpgradeEndpoint=http-acceptor&port=12080&host=135-250-139-30 and ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&httpPpgradeEndpoint=http-acceptor&port=12080&host=135-250-139-41], discoveryGroupConfiguration=null]: java.lang.Exception: trace
> at org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionBridge.<init>(ClusterConnectionBridge.java:129)
> at org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl.createNewRecord(ClusterConnectionImpl.java:778)
> at org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl.nodeUP(ClusterConnectionImpl.java:698)
> at org.apache.activemq.artemis.core.client.impl.Topology$1.run(Topology.java:264)
> at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:103)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> 2.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-11434) Set the iiop bound port of the socket binding
by Claudio Miranda (Jira)
[ https://issues.jboss.org/browse/WFLY-11434?page=com.atlassian.jira.plugin... ]
Claudio Miranda commented on WFLY-11434:
----------------------------------------
[~tomekadamski] I already have the fix and will submit the PR soon.
> Set the iiop bound port of the socket binding
> ---------------------------------------------
>
> Key: WFLY-11434
> URL: https://issues.jboss.org/browse/WFLY-11434
> Project: WildFly
> Issue Type: Enhancement
> Components: IIOP
> Reporter: Claudio Miranda
> Assignee: Tomasz Adamski
> Priority: Minor
>
> iiop and iiop-ssl socket binding doesn't show the runtime attributes *bound, bound-address, bound-port* as set, making it difficult to map the open ports to the socket bindings when the server is launched with a port offset.
> {code}
> "address" => [
> ("host" => "master"),
> ("server" => "server-three"),
> ("socket-binding-group" => "full-ha-sockets"),
> ("socket-binding" => "iiop")
> ],
> "outcome" => "success",
> "result" => {
> "bound" => false,
> "bound-address" => undefined,
> "bound-port" => undefined,
> "client-mappings" => undefined,
> "fixed-port" => false,
> "interface" => "unsecure",
> "multicast-address" => undefined,
> "multicast-port" => undefined,
> "name" => "iiop",
> "port" => 3528
> }
> },
> {
> "address" => [
> ("host" => "master"),
> ("server" => "server-three"),
> ("socket-binding-group" => "full-ha-sockets"),
> ("socket-binding" => "iiop-ssl")
> ],
> "outcome" => "success",
> "result" => {
> "bound" => false,
> "bound-address" => undefined,
> "bound-port" => undefined,
> "client-mappings" => undefined,
> "fixed-port" => false,
> "interface" => "unsecure",
> "multicast-address" => undefined,
> "multicast-port" => undefined,
> "name" => "iiop-ssl",
> "port" => 3529
> }
> },
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-11434) Set the iiop bound port of the socket binding
by Claudio Miranda (Jira)
[ https://issues.jboss.org/browse/WFLY-11434?page=com.atlassian.jira.plugin... ]
Claudio Miranda reassigned WFLY-11434:
--------------------------------------
Assignee: Claudio Miranda (was: Tomasz Adamski)
> Set the iiop bound port of the socket binding
> ---------------------------------------------
>
> Key: WFLY-11434
> URL: https://issues.jboss.org/browse/WFLY-11434
> Project: WildFly
> Issue Type: Enhancement
> Components: IIOP
> Reporter: Claudio Miranda
> Assignee: Claudio Miranda
> Priority: Minor
>
> iiop and iiop-ssl socket binding doesn't show the runtime attributes *bound, bound-address, bound-port* as set, making it difficult to map the open ports to the socket bindings when the server is launched with a port offset.
> {code}
> "address" => [
> ("host" => "master"),
> ("server" => "server-three"),
> ("socket-binding-group" => "full-ha-sockets"),
> ("socket-binding" => "iiop")
> ],
> "outcome" => "success",
> "result" => {
> "bound" => false,
> "bound-address" => undefined,
> "bound-port" => undefined,
> "client-mappings" => undefined,
> "fixed-port" => false,
> "interface" => "unsecure",
> "multicast-address" => undefined,
> "multicast-port" => undefined,
> "name" => "iiop",
> "port" => 3528
> }
> },
> {
> "address" => [
> ("host" => "master"),
> ("server" => "server-three"),
> ("socket-binding-group" => "full-ha-sockets"),
> ("socket-binding" => "iiop-ssl")
> ],
> "outcome" => "success",
> "result" => {
> "bound" => false,
> "bound-address" => undefined,
> "bound-port" => undefined,
> "client-mappings" => undefined,
> "fixed-port" => false,
> "interface" => "unsecure",
> "multicast-address" => undefined,
> "multicast-port" => undefined,
> "name" => "iiop-ssl",
> "port" => 3529
> }
> },
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-11434) Set the iiop bound port of the socket binding
by Claudio Miranda (Jira)
Claudio Miranda created WFLY-11434:
--------------------------------------
Summary: Set the iiop bound port of the socket binding
Key: WFLY-11434
URL: https://issues.jboss.org/browse/WFLY-11434
Project: WildFly
Issue Type: Enhancement
Components: IIOP
Reporter: Claudio Miranda
Assignee: Tomasz Adamski
iiop and iiop-ssl socket binding doesn't show the runtime attributes *bound, bound-address, bound-port* as set, making it difficult to map the open ports to the socket bindings when the server is launched with a port offset.
{code}
"address" => [
("host" => "master"),
("server" => "server-three"),
("socket-binding-group" => "full-ha-sockets"),
("socket-binding" => "iiop")
],
"outcome" => "success",
"result" => {
"bound" => false,
"bound-address" => undefined,
"bound-port" => undefined,
"client-mappings" => undefined,
"fixed-port" => false,
"interface" => "unsecure",
"multicast-address" => undefined,
"multicast-port" => undefined,
"name" => "iiop",
"port" => 3528
}
},
{
"address" => [
("host" => "master"),
("server" => "server-three"),
("socket-binding-group" => "full-ha-sockets"),
("socket-binding" => "iiop-ssl")
],
"outcome" => "success",
"result" => {
"bound" => false,
"bound-address" => undefined,
"bound-port" => undefined,
"client-mappings" => undefined,
"fixed-port" => false,
"interface" => "unsecure",
"multicast-address" => undefined,
"multicast-port" => undefined,
"name" => "iiop-ssl",
"port" => 3529
}
},
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-11433) EAR (WAR + EJB JAR) fails to be deployed with CNFE from open tracing
by Jan Stourac (Jira)
Jan Stourac created WFLY-11433:
----------------------------------
Summary: EAR (WAR + EJB JAR) fails to be deployed with CNFE from open tracing
Key: WFLY-11433
URL: https://issues.jboss.org/browse/WFLY-11433
Project: WildFly
Issue Type: Bug
Components: MP OpenTracing
Affects Versions: 14.0.0.Final, 15.0.0.Beta1
Reporter: Jan Stourac
Assignee: Matej Novotny
Upon deployment of an example app from weld examples, there is CNFE from open tracing during the deployment of an EAR (WAR + EJB JAR) artifact. [~manovotn] has already done some investigation and sent his findings to [wildfly-dev mailing list|http://lists.jboss.org/pipermail/wildfly-dev/2018-November/006716.html].
Problematic Weld example test is [this one|https://github.com/weld/core/blob/master/examples/jsf/translator/ftes...].
{code}
2018-11-28 14:35:36,063 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."weld-translator.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."weld-translator.ear".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1728)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class org.wildfly.microprofile.opentracing.smallrye.TracerProducer$Proxy$_$$_WeldSubclass
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:186)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
at org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:232)
at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.initEnhancedSubclass(SubclassedComponentInstantiator.java:86)
at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.<init>(SubclassedComponentInstantiator.java:79)
at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.forInterceptedDecoratedBean(SubclassedComponentInstantiator.java:63)
at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:121)
at org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)
at org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63)
at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:475)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:86)
at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:97)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
... 6 more
Caused by: java.lang.NoClassDefFoundError: io/opentracing/Tracer
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.jboss.weld.annotated.slim.backed.SecurityActions.getDeclaredMethods(SecurityActions.java:41)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:197)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:191)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:46)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:159)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:191)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:191)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:66)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:47)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.apply(ClassTransformer.java:84)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.apply(ClassTransformer.java:79)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.lambda$null$0(ReentrantMapBackedComputingCache.java:55)
at org.jboss.weld.util.WeakLazyValueHolder$1.computeValue(WeakLazyValueHolder.java:35)
at org.jboss.weld.util.WeakLazyValueHolder.get(WeakLazyValueHolder.java:53)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getValue(ReentrantMapBackedComputingCache.java:72)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getCastValue(ReentrantMapBackedComputingCache.java:78)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:177)
... 19 more
Caused by: java.lang.ClassNotFoundException: io.opentracing.Tracer from [Module "deployment.weld-translator.ear" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 39 more
2018-11-28 14:35:36,073 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "weld-translator.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"weld-translator.ear\".WeldStartService" => "Failed to start service
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class org.wildfly.microprofile.opentracing.smallrye.TracerProducer$Proxy$_$$_WeldSubclass
Caused by: java.lang.NoClassDefFoundError: io/opentracing/Tracer
Caused by: java.lang.ClassNotFoundException: io.opentracing.Tracer from [Module \"deployment.weld-translator.ear\" from Service Module Loader]"}}
2018-11-28 14:35:36,076 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "weld-translator.ear" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"weld-translator.ear\".WeldStartService" => "Failed to start service
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class org.wildfly.microprofile.opentracing.smallrye.TracerProducer$Proxy$_$$_WeldSubclass
Caused by: java.lang.NoClassDefFoundError: io/opentracing/Tracer
Caused by: java.lang.ClassNotFoundException: io.opentracing.Tracer from [Module \"deployment.weld-translator.ear\" from Service Module Loader]"}}
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFCORE-4238) Distinguish type of WildFly metrics
by Jeff Mesnil (Jira)
[ https://issues.jboss.org/browse/WFCORE-4238?page=com.atlassian.jira.plugi... ]
Jeff Mesnil updated WFCORE-4238:
--------------------------------
Fix Version/s: 8.0.0.Alpha
> Distinguish type of WildFly metrics
> -----------------------------------
>
> Key: WFCORE-4238
> URL: https://issues.jboss.org/browse/WFCORE-4238
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Management
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Priority: Major
> Fix For: 8.0.0.Alpha
>
>
> WildFly metrics needs to be exposed to Prometheus.
> In the current implementation of the microprofile-metrics-smallrye subsystems, all WildFly metrics are exposed as Gauges[1] which represents a single numerical value that can goes up and down and may have a unit (e.g. bytes or seconds).
> We should be able to represent more correctly some metrics as Counters[2] which are "cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart"
> In its current state, metadata associated to WildFly metrics does not able to distinguish gauges and counters.
> * If the metric has a measurement unit (specified by org.jboss.as.controller.AttributeDefinition#getMeasurementUnit), it can be represented as a Gauge
> * If the metric does not have a measurement unit, we can not reliably decide between gauge and counters.
> For example, the message-count[3] for the jms-queue resource is a *gauge* as this number will can go up (when messages are produced faster than they are consumed) or down (when messages are consumed faster than they are produced) to 0.
> Conversely, the messages-added[4] for the same jms-queue or request-count[4] for Undertow servlet are *counters* as they will always increase.
> Only the subsystem developers is able to specify which type of metrics it provides.
> I propose that we add 2 new values to org.jboss.as.controller.registry.AttributeAccess.Flag to let the subsystem developers provides this information:
> GAUGE_METRIC
> COUNTER_METRIC
> In the absence of the COUNTER_METRIC, the metric would be identified as a Gauge.
> We had the GAUGE_METRIC value so that the subsystem developer can explicitly state that a metric is a gauge which is helpful when the same resource (e.g. jms-queue) provides metrics of the 2 different types (e.g. message-counter vs messages-added).
> This API change is backwards compatible.
> These 2 flags remain optional and would only be checked when the attribute definition is registered as a metric with org.jboss.as.controller.registry.ManagementResourceRegistration#registerMetric.
> [1] https://prometheus.io/docs/concepts/metric_types/#gauge
> [2] https://prometheus.io/docs/concepts/metric_types/#counter
> [3] http://wildscribe.github.io/WildFly/14.0/subsystem/messaging-activemq/ser...
> [4] http://wildscribe.github.io/WildFly/14.0/subsystem/messaging-activemq/ser...
> [5] http://wildscribe.github.io/WildFly/14.0/deployment/subsystem/undertow/se...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months