[prev in list] [next in list] [prev in thread] [next in thread]
List: geronimo-dev
Subject: Re: Re: TomEE8 RC2: MP Metrics @Counted throws 500
From: Ivan Junckes Filho <ivanjunckes () gmail ! com>
Date: 2018-11-20 16:45:23
Message-ID: CAC6dPMNC149mZrvH1gEx3X8+y-grk0GMrucWbQGgmFUmH_ZDRQ () mail ! gmail ! com
[Download RAW message or body]
@César Hernandez <chernandez@tomitribe.com> , FYI the 500 / null pointer
doesn't happen in the master. So it should be fixed in the next release of
geronimo-metrics / TomEE MP.
If you want to check a working example of metrics see
https://github.com/apache/tomee/pull/207.
On Tue, Nov 20, 2018 at 1:11 PM MoreFlavor <support@moreflavor.com> wrote:
> Hello Ivan Junckes Filho,
> https://www.morebeer.com/category/kit-week.html?ref=2C
>
> Cheers
>
> Mike Albrecht
> Customer Service Representative
> MoreFlavor! Inc.
> 1-800-600-0033
>
> On Tue, Nov 20 at 3:28 AM , Ivan Junckes Filho <ivanjunckes@gmail.com>
> wrote:
> Hey Cesar, I was able to make it work with my example. Take a look there
>
> I found a bug with geronimo-metrics-1.0.0 throwing a null pointer when the
> app metric is not found instead of returning a blank page. I am not sure if
> it happens in master. I will be looking into it.
>
> On Mon, Nov 19, 2018 at 8:49 PM César Hernández Mendoza <
> cesarguate@gmail.com> wrote:
>
> > >
> > > Did you clean up your lib folder to kot provide mp libs?
> >
> > No, I didn't clean up the lib folder intentionally.... but now that I'm
> > looking again this thread. I may have one more chance to test in the
> > project I shared.
> > I'm going to try to specify in arquilliam.xml [1] the microprofile
> > classifier and try to use Arquillian remote instead of embed in the pom
> > file [2].
> >
> > [1]
> >
> >
> https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/blob/master/src/test/resources/arquillian.xml
>
> > [2]
> >
> >
> https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/blob/master/pom.xml
> > ]
> >
> >
> >
> > El mar., 16 oct. 2018 a las 14:58, Romain Manni-Bucau (<
> > rmannibucau@gmail.com>) escribió:
> >
> > > Did you clean up your lib folder to kot provide mp libs?
> > >
> > > Le mar. 16 oct. 2018 19:18, César Hernández Mendoza <
> > cesarguate@gmail.com>
> > > a écrit :
> > >
> > > > Hi Romain,
> > > >
> > > > On this commit to master:
> > > >
> > > >
> > >
> >
> https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/commit/37e40dfc4fbdc65e95f90f3651b186aa2652c89f
>
> > > >
> > > > I added @ApplicationScoped to the resource, removed the monotonic and
> > > added
> > > > beans.xml but still, the issue arises
> > > >
> > > >
> > > > El lun., 15 oct. 2018 a las 16:21, Romain Manni-Bucau (<
> > > > rmannibucau@gmail.com>) escribió:
> > > >
> > > > > Hey César,
> > > > >
> > > > > not sure the link with monotonic - there is none - but the issue is
> > > when
> > > > > using a name which does not exist then the endpoint fail with a 500
> > > > >
> > > > > Your endpoint not being a CDI bean it does not support MP metrics
> so
> > > just
> > > > > adding @ApplicationScoped is enough to fix it.
> > > > > On another side i'll try to make the endpoint not failing this way
> on
> > > > > geronimo-metrics side.
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog
> > > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > > <
> > > > >
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > > >
> > > > >
> > > > >
> > > > > Le lun. 15 oct. 2018 à 22:58, César Hernández Mendoza <
> > > > > cesarguate@gmail.com>
> > > > > a écrit :
> > > > >
> > > > > > Thanks for the reply, this is the repo I created with the minimal
> > > > > > configuration to show the issue:
> > > > > > https://github.com/cesarhernandezgt/tomee-mp-metrics-examples
> > > > > >
> > > > > > El lun., 15 oct. 2018 a las 13:18, Romain Manni-Bucau (<
> > > > > > rmannibucau@gmail.com>) escribió:
> > > > > >
> > > > > > > Can you push your app on github with tomee maven plugin set up?
> > > Will
> > > > be
> > > > > > > easier to check.
> > > > > > >
> > > > > > > Le lun. 15 oct. 2018 19:46, César Hernández Mendoza <
> > > > > > cesarguate@gmail.com>
> > > > > > > a écrit :
> > > > > > >
> > > > > > > >
> > > > > > > > > I noticed that on my previous email I paste I paste the
> > > exception
> > > > > from
> > > > > > > > the HTTP response and not the one from the log (attached).
> > > > > > > >
> > > > > > > > Some other things I did without success:
> > > > > > > > * Added `geronimo.metrics.jaxrs.activated=true` to tomee
> > > > > > > system.properties.
> > > > > > > > * Make the Resource @ApplicationScoped
> > > > > > > > * Debugged geronimo-metrics code and for some reason I
> couldn't
> > > > > > identify
> > > > > > > > so far, this is where we get the Nullpointer:
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/geronimo-metrics/blob/master/src/main/java/org/apache/geronimo/microprofile/metrics/jaxrs/PrometheusFormatter.java#L55
>
> > > > > > > > it seems like if the annotation was not added.
> > > > > > > > * The same issue arise when you try to use @Gauge
> annotation. I
> > > > > haven't
> > > > > > > > check the others types of metrics.
> > > > > > > >
> > > > > > > >
> > > > > > > > El dom., 14 oct. 2018 a las 23:01, Romain Manni-Bucau (<
> > > > > > > > rmannibucau@gmail.com>) escribió:
> > > > > > > >
> > > > > > > > > Hi César,
> > > > > > > > >
> > > > > > > > > the actual error is in the cause - available in logs.
> > > > > > > > >
> > > > > > > > > Romain Manni-Bucau
> > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog
> > > > > > > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > > > > > > <
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Le lun. 15 oct. 2018 à 06:24, César Hernández Mendoza <
> > > > > > > > > cesarguate@gmail.com>
> > > > > > > > > a écrit :
> > > > > > > > >
> > > > > > > > > > Any opinion on this issue?
> > > > > > > > > > Base on your expertise-instinct do you think this is not
> > Tomee
> > > > but
> > > > > > > > > > geronimo MP Metrics related?
> > > > > > > > > >
> > > > > > > > > > El vie., 12 oct. 2018 a las 17:27, César Hernández Mendoza
> > (<
> > > > > > > > > > cesarguate@gmail.com>) escribió:
> > > > > > > > > >
> > > > > > > > > > > Hi,
> > > > > > > > > > >
> > > > > > > > > > > Within a JAX-RS resource I annotated the following
> method:
> > > > > > > > > > >
> > > > > > > > > > > @Counted(name = "cesar", absolute = true, monotonic =
> > true)
> > > > > > > > > > > @GET
> > > > > > > > > > > public String message() {
> > > > > > > > > > > return "Hi Microprofile JWT!";
> > > > > > > > > > > }
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Metric endpoint
> > > http://localhost:8181/moviefun/rest/metrics/
> > > > > > works
> > > > > > > > > fine.
> > > > > > > > > > >
> > > > > > > > > > > GET to
> > > > http://localhost:8181/moviefun/rest/metrics/application
> > > > > > > > > returns
> > > > > > > > > > > 200 without any payload back.
> > > > > > > > > > >
> > > > > > > > > > > But when I try to do a GET to
> > > > > > > > > > >
> > > http://localhost:8181/moviefun/rest/metrics/application/cesar
> > > > I
> > > > > > > got:
> > > > > > > > > > > <!doctype html><html lang="en"><head><title>HTTP Status
> > 500
> > > –
> > > > > > > Internal
> > > > > > > > > > > Server Error</title><style type="text/css">h1
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>
> > > > > > > > > > > h2
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>
> > > > > > > > > > > h3
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>
> > > > > > > > > > > body
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> > > > > > > > > > > p
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
> > > > > > > > > > > a {color:black;} a.name {color:black;} .line
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP
> > > > > > > > > > > Status 500 – Internal Server Error</h1><hr class="line"
> > > > > > > > > /><p><b>Type</b>
> > > > > > > > > > > Exception Report</p><p><b>Message</b> Error processing
> > > > > webservice
> > > > > > > > > > > request</p><p><b>Description</b> The server encountered
> an
> > > > > > > unexpected
> > > > > > > > > > > condition that prevented it from fulfilling the
> > > > > > > > > > >
> > > > > > > > >
> > > > > >
> > > request.</p><p><b>Exception</b></p><pre>javax.servlet.ServletException:
> > > > > > > > > > > Error processing webservice request
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:98)
> > > > > > > > > > >
> > > > > > >
> > > >
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > > > > > > > > > >
> > > > > >
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:72)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
>
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:72)
> > > > > > > > > > > </pre><p><b>Root
> > > > > Cause</b></p><pre>java.lang.NullPointerException
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.geronimo.microprofile.metrics.jaxrs.PrometheusFormatter.lambda$toText$0(PrometheusFormatter.java:55)
>
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
> > > > > > > > > > >
> java.util.Collections$2.tryAdvance(Collections.java:4717)
> > > > > > > > > > >
> > > > java.util.Collections$2.forEachRemaining(Collections.java:4725)
> > > > > > > > > > >
> > > > > > >
> > > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
> > > > > > > > > > >
> > > > > > >
> > > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> > > > > > > > > > >
> > > > > > >
> > > >
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:510)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.geronimo.microprofile.metrics.jaxrs.PrometheusFormatter.toText(PrometheusFormatter.java:106)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.geronimo.microprofile.metrics.jaxrs.PrometheusFormatter$$OwbNormalScopePr \
> oxy0.toText(org/apache/geronimo/microprofile/metrics/jaxrs/PrometheusFormatter.java)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.geronimo.microprofile.metrics.jaxrs.MetricsEndpoints.getText(MetricsEndpoints.java:114)
>
> > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> > > > > > > > > > > java.lang.reflect.Method.invoke(Method.java:498)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.openejb.server.cxf.rs.PojoInvoker.performInvocation(PojoInvoker.java:43)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
> > > > > > > > > > >
> > > > org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
> > > > > > > > > > >
> > > > org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.openejb.server.cxf.rs.AutoJAXRSInvoker.invoke(AutoJAXRSInvoker.java:68)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> > > > > > > > > > >
> > > > > > >
> > > >
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > > > > > > > > > >
> > > > > >
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:72)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
>
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:72)
> > > > > > > > > > > </pre><p><b>Note</b> The full stack trace of the root
> > cause
> > > is
> > > > > > > > > available
> > > > > > > > > > > in the server logs.</p><hr class="line" /><h3>Apache
> > Tomcat
> > > > > > > > > > (TomEE)/9.0.12
> > > > > > > > > > > (8.0.0-RC2-SNAPSHOT)</h3></body></html>
> > > > > > > > > > >
> > > > > > > > > > > In the pom I'm using:
> > > > > > > > > > >
> > > > > > > > > > > <dependency>
> > > > > > > > > > > <groupId>org.eclipse.microprofile.jwt</groupId>
> > > > > > > > > > > <artifactId>microprofile-jwt-auth-api</artifactId>
> > > > > > > > > > > <version>${mp-jwt.version}</version>
> > > > > > > > > > > <scope>provided</scope>
> > > > > > > > > > > </dependency>
> > > > > > > > > > >
> > > > > > > > > > > <mp-metric.version>1.1</mp-metric.version>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I notice that if I remove the monotonic = true
> > > > > > > > > > > Then both endpoint returns empty json response.
> > > > > > > > > > >
> > > > > > > > > > > Is there any flag I missed to use during tomee:run ?
> > > > > > > > > > > --
> > > > > > > > > > > Atentamente:
> > > > > > > > > > > César Hernández Mendoza.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Atentamente:
> > > > > > > > > > César Hernández Mendoza.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Atentamente:
> > > > > > > > César Hernández Mendoza.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Atentamente:
> > > > > > César Hernández Mendoza.
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Atentamente:
> > > > César Hernández Mendoza.
> > > >
> > >
> >
> >
> > --
> > Atentamente:
> > César Hernández Mendoza.
> >
>
> ------------------------------
>
> Please tell us what you think of your support experience.
> Awesome
> <https://moreflavor.freshdesk.com/support/custom_surveys/9dec79583bfe67ea1988dd2fb2c0f318/extremely_happy/new> \
> Just Okay
> <https://moreflavor.freshdesk.com/support/custom_surveys/9dec79583bfe67ea1988dd2fb2c0f318/neutral/new> \
> Not Good
> <https://moreflavor.freshdesk.com/support/custom_surveys/9dec79583bfe67ea1988dd2fb2c0f318/extremely_unhappy/new>
> 414950:343773
>
[Attachment #3 (text/html)]
<div dir="ltr"><div dir="ltr"><a class="gmail_plusreply" \
id="gmail-m_4379711123425959019plusReplyChip-6" \
href="mailto:chernandez@tomitribe.com" target="_blank">@César Hernandez</a> , FYI \
the 500 / null pointer doesn't happen in the master. So it should be fixed in the \
next release of geronimo-metrics / TomEE MP.<br><div><br></div><div>If you want to \
check a working example of metrics see <a \
href="https://github.com/apache/tomee/pull/207">https://github.com/apache/tomee/pull/207</a>.</div></div></div><br><div \
class="gmail_quote"><div dir="ltr">On Tue, Nov 20, 2018 at 1:11 PM MoreFlavor <<a \
href="mailto:support@moreflavor.com" target="_blank">support@moreflavor.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:Helvetica \
Neue,Helvetica,Arial,sans-serif;font-size:13px"> <div>Hello Ivan Junckes \
Filho,</div> <div>
<a href="https://www.morebeer.com/category/kit-week.html?ref=2C" rel="noreferrer" \
target="_blank">https://www.morebeer.com/category/kit-week.html?ref=2C</a><br><br> \
</div> <div dir="ltr">
<div>Cheers</div>
<div><br></div>
<div>Mike Albrecht</div>
<div>Customer Service Representative</div>
<div>MoreFlavor! Inc.</div>
<div>1-800-600-0033</div>
<div><br></div>
</div>
<div class="m_4379711123425959019m_233328937208370309freshdesk_quote">
<blockquote \
class="m_4379711123425959019m_233328937208370309freshdesk_quote"> On
Tue, Nov 20 at 3:28 AM
<span class="m_4379711123425959019m_233328937208370309separator">, \
Ivan Junckes Filho <<a href="mailto:ivanjunckes@gmail.com" \
target="_blank">ivanjunckes@gmail.com</a>> wrote: <div>Hey Cesar, I was able to \
make it work with my example. Take a look there<br><br>I found a bug with \
geronimo-metrics-1.0.0 throwing a null pointer when the<br>app metric is not found \
instead of returning a blank page. I am not sure if<br>it happens in master. I will \
be looking into it.<br><br> </div>
<div class="m_4379711123425959019m_233328937208370309freshdesk_quote"><blockquote \
class="m_4379711123425959019m_233328937208370309freshdesk_quote"><div>On Mon, Nov 19, \
2018 at 8:49 PM César Hernández Mendoza <<br><a \
href="mailto:cesarguate@gmail.com" target="_blank">cesarguate@gmail.com</a>> \
wrote:<br><br>> ><br>> > Did you clean up your lib folder to kot provide \
mp libs?<br>><br>> No, I didn't clean up the lib folder intentionally.... \
but now that I'm<br>> looking again this thread. I may have one more chance to \
test in the<br>> project I shared.<br>> I'm going to try to specify in \
arquilliam.xml [1] the microprofile<br>> classifier and try to use Arquillian \
remote instead of embed in the pom<br>> file [2].<br>><br>> \
[1]<br>><br>> <a \
href="https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/blob/master/src/test/resources/arquillian.xml" \
rel="noreferrer" target="_blank">https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/blob/master/src/test/resources/arquillian.xml</a><br>> \
[2]<br>><br>> <a \
href="https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/blob/master/pom.xml" \
rel="noreferrer" target="_blank">https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/blob/master/pom.xml</a><br>> \
]<br>><br>><br>><br>> El mar., 16 oct. 2018 a las 14:58, Romain \
Manni-Bucau (<<br>> <a href="mailto:rmannibucau@gmail.com" \
target="_blank">rmannibucau@gmail.com</a>>) escribió:<br>><br>> > Did \
you clean up your lib folder to kot provide mp libs?<br>> ><br>> > Le \
mar. 16 oct. 2018 19:18, César Hernández Mendoza <<br>> <a \
href="mailto:cesarguate@gmail.com" \
target="_blank">cesarguate@gmail.com</a>><br>> > a écrit :<br>> \
><br>> > > Hi Romain,<br>> > ><br>> > > On this commit \
to master:<br>> > ><br>> > ><br>> ><br>> <a \
href="https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/commit/37e40dfc4fbdc65e95f90f3651b186aa2652c89f" \
rel="noreferrer" target="_blank">https://github.com/cesarhernandezgt/tomee-mp-metrics-examples/commit/37e40dfc4fbdc65e95f90f3651b186aa2652c89f</a><br>> \
> ><br>> > > I added @ApplicationScoped to the resource, removed the \
monotonic and<br>> > added<br>> > > beans.xml but still, the issue \
arises<br>> > ><br>> > ><br>> > > El lun., 15 oct. 2018 a \
las 16:21, Romain Manni-Bucau (<<br>> > > <a \
href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>>) \
escribió:<br>> > ><br>> > > > Hey César,<br>> > > \
><br>> > > > not sure the link with monotonic - there is none - but \
the issue is<br>> > when<br>> > > > using a name which does not \
exist then the endpoint fail with a 500<br>> > > ><br>> > > > \
Your endpoint not being a CDI bean it does not support MP metrics so<br>> > \
just<br>> > > > adding @ApplicationScoped is enough to fix it.<br>> \
> > > On another side i'll try to make the endpoint not failing this way \
on<br>> > > > geronimo-metrics side.<br>> > > ><br>> > \
> > Romain Manni-Bucau<br>> > > > @rmannibucau <<a \
href="https://twitter.com/rmannibucau" rel="noreferrer" \
target="_blank">https://twitter.com/rmannibucau</a>> | Blog<br>> > > \
> <<a href="https://rmannibucau.metawerx.net/" rel="noreferrer" \
target="_blank">https://rmannibucau.metawerx.net/</a>> | Old Blog<br>> > \
> > <<a href="http://rmannibucau.wordpress.com" rel="noreferrer" \
target="_blank">http://rmannibucau.wordpress.com</a>> | Github <<br>> > \
> > <a href="https://github.com/rmannibucau" rel="noreferrer" \
target="_blank">https://github.com/rmannibucau</a>> |<br>> > > > \
LinkedIn <<a href="https://www.linkedin.com/in/rmannibucau" rel="noreferrer" \
target="_blank">https://www.linkedin.com/in/rmannibucau</a>> | Book<br>> > \
> > <<br>> > > ><br>> > ><br>> ><br>> <a \
href="https://www.packtpub.com/application-development/java-ee-8-high-performance" \
rel="noreferrer" target="_blank">https://www.packtpub.com/application-development/java-ee-8-high-performance</a><br>> \
> > > ><br>> > > ><br>> > > ><br>> > > \
> Le lun. 15 oct. 2018 à 22:58, César Hernández Mendoza <<br>> > > \
> <a href="mailto:cesarguate@gmail.com" \
target="_blank">cesarguate@gmail.com</a>><br>> > > > a écrit \
:<br>> > > ><br>> > > > > Thanks for the reply, this is \
the repo I created with the minimal<br>> > > > > configuration to show \
the issue:<br>> > > > > <a \
href="https://github.com/cesarhernandezgt/tomee-mp-metrics-examples" rel="noreferrer" \
target="_blank">https://github.com/cesarhernandezgt/tomee-mp-metrics-examples</a><br>> \
> > > ><br>> > > > > El lun., 15 oct. 2018 a las 13:18, \
Romain Manni-Bucau (<<br>> > > > > <a \
href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>>) \
escribió:<br>> > > > ><br>> > > > > > Can you push \
your app on github with tomee maven plugin set up?<br>> > Will<br>> > \
> be<br>> > > > > > easier to check.<br>> > > > > \
><br>> > > > > > Le lun. 15 oct. 2018 19:46, César Hernández \
Mendoza <<br>> > > > > <a href="mailto:cesarguate@gmail.com" \
target="_blank">cesarguate@gmail.com</a>><br>> > > > > > a \
écrit :<br>> > > > > ><br>> > > > > > \
><br>> > > > > > >> I noticed that on my previous email I \
paste I paste the<br>> > exception<br>> > > > from<br>> > \
> > > > > the HTTP response and not the one from the log \
(attached).<br>> > > > > > ><br>> > > > > > \
> Some other things I did without success:<br>> > > > > > > * \
Added `geronimo.metrics.jaxrs.activated=true` to tomee<br>> > > > > \
> system.properties.<br>> > > > > > > * Make the Resource \
@ApplicationScoped<br>> > > > > > > * Debugged geronimo-metrics \
code and for some reason I couldn't<br>> > > > > identify<br>> \
> > > > > > so far, this is where we get the Nullpointer:<br>> \
> > > > > ><br>> > > > > ><br>> > > > \
><br>> > > ><br>> > ><br>> ><br>> <a \
href="https://github.com/apache/geronimo-metrics/blob/master/src/main/java/org/apache/geronimo/microprofile/metrics/jaxrs/PrometheusFormatter.java#L55" \
rel="noreferrer" target="_blank">https://github.com/apache/geronimo-metrics/blob/maste \
r/src/main/java/org/apache/geronimo/microprofile/metrics/jaxrs/PrometheusFormatter.java#L55</a><br>> \
> > > > > > it seems like if the annotation was not added.<br>> \
> > > > > > * The same issue arise when you try to use @Gauge \
annotation. I<br>> > > > haven't<br>> > > > > > \
> check the others types of metrics.<br>> > > > > > ><br>> \
> > > > > ><br>> > > > > > > El dom., 14 oct. \
2018 a las 23:01, Romain Manni-Bucau (<<br>> > > > > > > <a \
href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>>) \
escribió:<br>> > > > > > ><br>> > > > > > \
>> Hi César,<br>> > > > > > >><br>> > > > \
> > >> the actual error is in the cause - available in logs.<br>> > \
> > > > >><br>> > > > > > >> Romain \
Manni-Bucau<br>> > > > > > >> @rmannibucau <<a \
href="https://twitter.com/rmannibucau" rel="noreferrer" \
target="_blank">https://twitter.com/rmannibucau</a>> | Blog<br>> > > \
> > > >> <<a href="https://rmannibucau.metawerx.net/" \
rel="noreferrer" target="_blank">https://rmannibucau.metawerx.net/</a>> | Old \
Blog<br>> > > > > > >> <<a \
href="http://rmannibucau.wordpress.com" rel="noreferrer" \
target="_blank">http://rmannibucau.wordpress.com</a>> | Github <<br>> > \
> > > > >> <a href="https://github.com/rmannibucau" \
rel="noreferrer" target="_blank">https://github.com/rmannibucau</a>> |<br>> \
> > > > > >> LinkedIn <<a \
href="https://www.linkedin.com/in/rmannibucau" rel="noreferrer" \
target="_blank">https://www.linkedin.com/in/rmannibucau</a>> | Book<br>> > \
> > > > >> <<br>> > > > > > >><br>> \
> > > > ><br>> > > > ><br>> > > ><br>> \
> ><br>> ><br>> <a \
href="https://www.packtpub.com/application-development/java-ee-8-high-performance" \
rel="noreferrer" target="_blank">https://www.packtpub.com/application-development/java-ee-8-high-performance</a><br>> \
> > > > > >> ><br>> > > > > > \
>><br>> > > > > > >><br>> > > > > > \
>> Le lun. 15 oct. 2018 à 06:24, César Hernández Mendoza <<br>> > \
> > > > >> <a href="mailto:cesarguate@gmail.com" \
target="_blank">cesarguate@gmail.com</a>><br>> > > > > > \
>> a écrit :<br>> > > > > > >><br>> > > > \
> > >> > Any opinion on this issue?<br>> > > > > > \
>> > Base on your expertise-instinct do you think this is not<br>> \
Tomee<br>> > > but<br>> > > > > > >> > geronimo \
MP Metrics related?<br>> > > > > > >> ><br>> > > \
> > > >> > El vie., 12 oct. 2018 a las 17:27, César Hernández \
Mendoza<br>> (<<br>> > > > > > >> > <a \
href="mailto:cesarguate@gmail.com" target="_blank">cesarguate@gmail.com</a>>) \
escribió:<br>> > > > > > >> ><br>> > > > > \
> >> > > Hi,<br>> > > > > > >> > \
><br>> > > > > > >> > > Within a JAX-RS resource I \
annotated the following method:<br>> > > > > > >> > \
><br>> > > > > > >> > > @Counted(name = \
"cesar", absolute = true, monotonic =<br>> true)<br>> > > > \
> > >> > > @GET<br>> > > > > > >> > > \
public String message() {<br>> > > > > > >> > > \
return "Hi Microprofile JWT!";<br>> > > > > > >> \
> > }<br>> > > > > > >> > ><br>> > > \
> > > >> > ><br>> > > > > > >> > > \
Metric endpoint<br>> > <a href="http://localhost:8181/moviefun/rest/metrics/" \
rel="noreferrer" target="_blank">http://localhost:8181/moviefun/rest/metrics/</a><br>> \
> > > > works<br>> > > > > > >> fine.<br>> \
> > > > > >> > ><br>> > > > > > >> \
> > GET to<br>> > > <a \
href="http://localhost:8181/moviefun/rest/metrics/application" rel="noreferrer" \
target="_blank">http://localhost:8181/moviefun/rest/metrics/application</a><br>> \
> > > > > >> returns<br>> > > > > > >> \
> > 200 without any payload back.<br>> > > > > > >> \
> ><br>> > > > > > >> > > But when I try to do a \
GET to<br>> > > > > > >> > ><br>> > <a \
href="http://localhost:8181/moviefun/rest/metrics/application/cesar" rel="noreferrer" \
target="_blank">http://localhost:8181/moviefun/rest/metrics/application/cesar</a><br>> \
> > I<br>> > > > > > got:<br>> > > > > > \
>> > > <!doctype html><html \
lang="en"><head><title>HTTP Status<br>> 500<br>> > \
–<br>> > > > > > Internal<br>> > > > > > \
>> > > Server Error</title><style \
type="text/css">h1<br>> > > > > > >> > \
><br>> > > > > > >> ><br>> > > > > > \
>><br>> > > > > ><br>> > > > ><br>> > \
> ><br>> > ><br>> ><br>> \
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}<br>> \
> > > > > >> > > h2<br>> > > > > > \
>> > ><br>> > > > > > >> ><br>> > > \
> > > >><br>> > > > > ><br>> > > > \
><br>> > > ><br>> > ><br>> ><br>> \
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}<br>> \
> > > > > >> > > h3<br>> > > > > > \
>> > ><br>> > > > > > >> ><br>> > > \
> > > >><br>> > > > > ><br>> > > > \
><br>> > > ><br>> > ><br>> ><br>> \
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}<br>> \
> > > > > >> > > body<br>> > > > > > \
>> > ><br>> > > > > > >> ><br>> > > \
> > > >><br>> > > > > ><br>> > > > \
><br>> > > ><br>> > ><br>> ><br>> \
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b<br>> \
> > > > > >> > ><br>> > > > > > >> \
><br>> > > > > > >><br>> > > > > \
><br>> > > > ><br>> > > ><br>> > ><br>> \
><br>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}<br>> \
> > > > > >> > > p<br>> > > > > > \
>> > ><br>> > > > > > >> ><br>> > > \
> > > >><br>> > > > > ><br>> > > > \
><br>> > > ><br>> > ><br>> ><br>> \
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}<br>> \
> > > > > >> > > a {color:black;} <a href="http://a.name" \
target="_blank">a.name</a> {color:black;} .line<br>> > > > > > \
>> > ><br>> > > > > > >> ><br>> > > \
> > > >><br>> > > > > ><br>> > > > \
><br>> > > ><br>> > ><br>> ><br>> \
{height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP<br>> \
> > > > > >> > > Status 500 – Internal Server \
Error</h1><hr class="line"<br>> > > > > > \
>> /><p><b>Type</b><br>> > > > > > \
>> > > Exception Report</p><p><b>Message</b> \
Error processing<br>> > > > webservice<br>> > > > > > \
>> > > request</p><p><b>Description</b> The \
server encountered an<br>> > > > > > unexpected<br>> > > \
> > > >> > > condition that prevented it from fulfilling \
</div></blockquote></div>
</span>
</blockquote>
</div>
<div class="m_4379711123425959019m_233328937208370309freshdesk_satisfaction_survey">
<div style="width:100%;font:13px 'Helvetica \
Neue',Helvetica,Arial,sans-serif">
<hr style="height:0;border:0;margin-top:20px;border-top:1px solid #ccc">
<span style="font-family:Arial,sans-serif;color:#333;font-weight:bold">
<p>Please tell us what you think of your support experience.</p>
</span>
<table cellspacing="0" cellpadding="0" \
style="table-layout:fixed;margin-top:10px"> <tr>
<td style="width:14.28%;border-right:2px #fff \
solid;padding:0;height:8px;background-color:#4e8d00"></td>
<td style="width:14.28%;border-right:2px #fff \
solid;padding:0;height:8px;background-color:#f1db16"></td>
<td style="width:14.28%;border-right:2px #fff \
solid;padding:0;height:8px;background-color:#e7340f"></td> </tr>
<tr>
<td style="width:14.28%;border-right:2px #fff \
solid;text-align:center;padding:16px 0px;background-color:#e6efdd"> <a \
href="https://moreflavor.freshdesk.com/support/custom_surveys/9dec79583bfe67ea1988dd2fb2c0f318/extremely_happy/new" \
style="margin:0;padding:5px;text-decoration:none;display:block" \
target="_blank">Awesome</a> </td>
<td style="width:14.28%;border-right:2px #fff \
solid;text-align:center;padding:16px 0px;background-color:#fdfae2"> <a \
href="https://moreflavor.freshdesk.com/support/custom_surveys/9dec79583bfe67ea1988dd2fb2c0f318/neutral/new" \
style="margin:0;padding:5px;text-decoration:none;display:block" target="_blank">Just \
Okay</a> </td>
<td style="width:14.28%;border-right:2px #fff \
solid;text-align:center;padding:16px 0px;background-color:#fce3e0"> <a \
href="https://moreflavor.freshdesk.com/support/custom_surveys/9dec79583bfe67ea1988dd2fb2c0f318/extremely_unhappy/new" \
style="margin:0;padding:5px;text-decoration:none;display:block" target="_blank">Not \
Good</a> </td>
</tr>
</table>
</div>
</div>
<span title="fd_tkt_identifier" \
style="font-size:0px;font-family:"fdtktid";min-height:0px;height:0px;opacity:0;max-height:0px;line-height:0px;color:#ffffff">414950:343773</span>
</div></blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic