[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.Beta3
(was: 8.0.0.Beta2)
> 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.Beta3
>
>
> 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)
5 years, 10 months
[JBoss JIRA] (WFCORE-4266) Classes for newer versions are not loaded from Multi-Release-JARs in WARs
by Daniel Schwering (Jira)
[ https://issues.jboss.org/browse/WFCORE-4266?page=com.atlassian.jira.plugi... ]
Daniel Schwering commented on WFCORE-4266:
------------------------------------------
The latest commit works for me.
> Classes for newer versions are not loaded from Multi-Release-JARs in WARs
> -------------------------------------------------------------------------
>
> Key: WFCORE-4266
> URL: https://issues.jboss.org/browse/WFCORE-4266
> Project: WildFly Core
> Issue Type: Bug
> Components: VFS
> Environment: Java 9+
> Reporter: Daniel Schwering
> Priority: Major
> Attachments: buggywar.src.zip, buggywar.war, multireleaselib-0.0.1-SNAPSHOT.jar, multireleaselib-0.0.1-SNAPSHOT.jar, multireleaselib.src.zip, multireleaselib.src.zip
>
>
> 1
> down vote
> favorite
> Since Java 9 there are Multi-Release JARs ([MRJARS|https://openjdk.java.net/jeps/238]) that allow different classes for different Java versions to be included in one JAR file. I was surprised when a Wildfly 14 running on Java 11 executed Java-8-code in a JAR included in a WAR although the JAR was a MRJAR with code for Java 11. That JAR included as a dependency for a regular Java SE project is running different code depending on the running JRE, but when included in a WAR, the Java-11-code seems to be ignored.
> Is that expected behavior for a webserver, as Java EE 8 does not explicitly require Java 9 (which introduced MRJARs) but only Java 8?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (DROOLS-3402) Encoding set in constructor not taking effect
by Tibor Zimányi (Jira)
[ https://issues.jboss.org/browse/DROOLS-3402?page=com.atlassian.jira.plugi... ]
Tibor Zimányi commented on DROOLS-3402:
---------------------------------------
Thanks [~bkurucz] for explanation, I will take a look next week at this.
> Encoding set in constructor not taking effect
> ---------------------------------------------
>
> Key: DROOLS-3402
> URL: https://issues.jboss.org/browse/DROOLS-3402
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.13.0.Final
> Reporter: Barnabás Kurucz
> Assignee: Tibor Zimányi
> Priority: Major
>
> In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
> Drools 7.13
> *KieSessionGenerator*:
> public KieSessionGenerator() {
> KieServices kieServices = KieServices.Factory.get();
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
> kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
> KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
> kieBuilder.buildAll();
> KieModule kieModule = kieBuilder.getKieModule();
> KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
> kieSession = kieContainer.newKieSession();
> }
> *Snippet from DRL:*
> rule "813"
> when
> $bean : Bean(longDesc == "Infektion")
> then
> $bean.setAction1("Rückfrage");
> end
> *Inserting the fact:*
> public Bean lookupBean(Bean bean) {
> kieSessionGenerator.getKieSession().insert(bean);
> kieSessionGenerator.getKieSession().fireAllRules();
> return bean;
> }
> UPDATE: After some further investigation it looks the issue can be reproduced only when the default system encoding is set to CP-1252.
> Since the system default was CP-1252, the JVM was running with that encoding and the KIE Resource also had used this encoding, even though I set UTF-8 in its conctructor.
> Once I changed the system default to UTF-8, the special characters (ä, etc.) were shown correctly.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (DROOLS-3402) Encoding set in constructor not taking effect
by Barnabás Kurucz (Jira)
[ https://issues.jboss.org/browse/DROOLS-3402?page=com.atlassian.jira.plugi... ]
Barnabás Kurucz updated DROOLS-3402:
------------------------------------
Description:
In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
Drools 7.13
*KieSessionGenerator*:
public KieSessionGenerator() {
KieServices kieServices = KieServices.Factory.get();
KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
kieBuilder.buildAll();
KieModule kieModule = kieBuilder.getKieModule();
KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
kieSession = kieContainer.newKieSession();
}
*Snippet from DRL:*
rule "813"
when
$bean : Bean(longDesc == "Infektion")
then
$bean.setAction1("Rückfrage");
end
*Inserting the fact:*
public Bean lookupBean(Bean bean) {
kieSessionGenerator.getKieSession().insert(bean);
kieSessionGenerator.getKieSession().fireAllRules();
return bean;
}
UPDATE: After some further investigation it looks the issue can be reproduced only when the default system encoding is set to CP-1252.
Since the system default was CP-1252, the JVM was running with that encoding and the KIE Resource also had used this encoding, even though I set UTF-8 in its conctructor.
Once I changed the system default to UTF-8, the special characters (ä, etc.) were shown correctly.
was:
In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
Drools 7.13
*KieSessionGenerator*:
public KieSessionGenerator() {
KieServices kieServices = KieServices.Factory.get();
KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
kieBuilder.buildAll();
KieModule kieModule = kieBuilder.getKieModule();
KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
kieSession = kieContainer.newKieSession();
}
*Snippet from DRL:*
rule "813"
when
$bean : Bean(longDesc == "Infektion")
then
$bean.setAction1("Rückfrage");
end
*Inserting the fact:*
public Bean lookupBean(Bean bean) {
kieSessionGenerator.getKieSession().insert(bean);
kieSessionGenerator.getKieSession().fireAllRules();
return bean;
}
> Encoding set in constructor not taking effect
> ---------------------------------------------
>
> Key: DROOLS-3402
> URL: https://issues.jboss.org/browse/DROOLS-3402
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.13.0.Final
> Reporter: Barnabás Kurucz
> Assignee: Tibor Zimányi
> Priority: Major
>
> In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
> Drools 7.13
> *KieSessionGenerator*:
> public KieSessionGenerator() {
> KieServices kieServices = KieServices.Factory.get();
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
> kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
> KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
> kieBuilder.buildAll();
> KieModule kieModule = kieBuilder.getKieModule();
> KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
> kieSession = kieContainer.newKieSession();
> }
> *Snippet from DRL:*
> rule "813"
> when
> $bean : Bean(longDesc == "Infektion")
> then
> $bean.setAction1("Rückfrage");
> end
> *Inserting the fact:*
> public Bean lookupBean(Bean bean) {
> kieSessionGenerator.getKieSession().insert(bean);
> kieSessionGenerator.getKieSession().fireAllRules();
> return bean;
> }
> UPDATE: After some further investigation it looks the issue can be reproduced only when the default system encoding is set to CP-1252.
> Since the system default was CP-1252, the JVM was running with that encoding and the KIE Resource also had used this encoding, even though I set UTF-8 in its conctructor.
> Once I changed the system default to UTF-8, the special characters (ä, etc.) were shown correctly.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (DROOLS-3402) Encoding set in constructor not taking effect
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-3402?page=com.atlassian.jira.plugi... ]
Mario Fusco reassigned DROOLS-3402:
-----------------------------------
Assignee: Tibor Zimányi (was: Mario Fusco)
> Encoding set in constructor not taking effect
> ---------------------------------------------
>
> Key: DROOLS-3402
> URL: https://issues.jboss.org/browse/DROOLS-3402
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.13.0.Final
> Reporter: Barnabás Kurucz
> Assignee: Tibor Zimányi
> Priority: Major
>
> In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
> Drools 7.13
> *KieSessionGenerator*:
> public KieSessionGenerator() {
> KieServices kieServices = KieServices.Factory.get();
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
> kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
> KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
> kieBuilder.buildAll();
> KieModule kieModule = kieBuilder.getKieModule();
> KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
> kieSession = kieContainer.newKieSession();
> }
> *Snippet from DRL:*
> rule "813"
> when
> $bean : Bean(longDesc == "Infektion")
> then
> $bean.setAction1("Rückfrage");
> end
> *Inserting the fact:*
> public Bean lookupBean(Bean bean) {
> kieSessionGenerator.getKieSession().insert(bean);
> kieSessionGenerator.getKieSession().fireAllRules();
> return bean;
> }
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months