The spec does not seem to be clear in that regard, maybe on purpose. It if was supposed to work that way, that should be included in the TCK. I find it hard to believe that it was not included, because someone forgot to add it…
On the other hand, I can see the possible conflicts that it would cause on the "/" context, and even considering that nothing is stopping you to deploy your own app to "/“. Maybe we need to ask in the MP list about this.. I did found this on the MP Metrics project: https://github.com/eclipse/microprofile-metrics/issues/65 <https://github.com/eclipse/microprofile-metrics/issues/65> Cheers, Roberto > On 7 Jan 2019, at 11:48, Jonathan Gallimore <[email protected]> > wrote: > > This: `curl -v > http://localhost:8080/mp-metrics-counted-8.0.0-SNAPSHOT/metrics` - does > work and includes both the base and application metrics. > > Looking through the tests in microprofile-metrics-api-tck and > microprofile-metrics-rest-tck, it looks like only accessing metrics via a > CDI enabled application is actually tested. Should accessing /metrics work? > From my brief reading of the spec, it feels like it should work. There's a > fairly obvious conflict with the ROOT application, of course. Adding an > empty beans.xml and setting metadata-complete to "false" in web.xml for the > ROOT app did make it work (although the output comes back as JSON as > opposed to prometheus). Removing the ROOT app didn't work. > > My reading of §2.3 of the spec here: > https://github.com/eclipse/microprofile-metrics/releases/download/1.0.2-RC2/metrics_spec.pdf > does suggest that /metrics should work, but I'd be interested in what > others think. > > Next question: is there a way that one could/should go about adding a > vendor specific metric? I'd like to have a go at that. > > Thanks, > > Jon > > On Mon, Jan 7, 2019 at 11:28 AM Jonathan Gallimore < > [email protected]> wrote: > >> Even with one of the metrics samples deployed, I still get a 404 from >> http://localhost:8080/metrics. >> >> Jon >> >> On Mon, Jan 7, 2019 at 11:24 AM Roberto Cortez <[email protected]> >> wrote: >> >>> I believe it never worked that way. It always required to have an app >>> deployed. >>> >>>> On 7 Jan 2019, at 11:12, Jean-Louis Monteiro <[email protected]> >>> wrote: >>>> >>>> I'll have a look after lunch >>>> -- >>>> Jean-Louis Monteiro >>>> http://twitter.com/jlouismonteiro >>>> http://www.tomitribe.com >>>> >>>> >>>> On Mon, Jan 7, 2019 at 12:10 PM Jonathan Gallimore < >>>> [email protected]> wrote: >>>> >>>>> Ah right. It isn't working for me on a build of master. All I've done >>> is >>>>> build it, extract the tar.gz for MicroProfile, run catalina.sh run, >>> and try >>>>> the curl command I mentioned. No other customization, no additional >>> apps >>>>> deployed. >>>>> >>>>> I'm not sure if I have missed a step, or a switch. Looking at the TCK >>> now >>>>> to see if there is something I have missed. If anyone knows anything >>>>> obvious, please let me know! >>>>> >>>>> Jon >>>>> >>>>> On Mon, Jan 7, 2019 at 11:05 AM Jean-Louis Monteiro < >>>>> [email protected]> wrote: >>>>> >>>>>> Yes you should get vendor, system and app name space >>>>>> >>>>>> Le lun. 7 janv. 2019 à 12:03, Jonathan Gallimore < >>>>>> [email protected]> a écrit : >>>>>> >>>>>>> Apologies if this is a stupid question... but if I extract the >>>>>> MicroProfile >>>>>>> flavor of TomEE, and try and do `curl http://localhost:8080/metrics` >>> <http://localhost:8080/metrics> >>>>> <http://localhost:8080/metrics> >>>>>> <http://localhost:8080/metrics> >>>>>>> <http://localhost:8080/metrics> - >>>>>>> should I get some built in basic metric data back? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> Jon >>>>>>> >>>>>> >>>>> >>> >>>
