Re: Missing JMAP metrics in Prometheus endpoint - how to enable all documented metrics?

Samiul Islam <[email protected]> Fri, 29 Aug 2025 12:28:53 +0600
Newsgroups gmane.comp.jakarta.james.user
Message-ID <CA+oRvmPLb24WhaNT=GLksixFs4Z5hutWQ_SG1a0CStGMocX7Yw@mail.gmail.com>
--00000000000071b03a063d7b23b9
Content-Type: multipart/alternative; boundary="00000000000071b038063d7b23b8"

--00000000000071b038063d7b23b8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Apologies for the broken links!

*Running this commit:*
https://github.com/apache/james-project/tree/c75eb15030b5811435f982a02e54fc=
2ab1e63691

*Following these metrics docs*:
https://github.com/apache/james-project/tree/d2cf7c8e229d9ed30125871b3de5af=
3cb1553649/server/grafana-reporting/prometheus-datasource
*Relevant JMAP source code: *
https://github.com/apache/james-project/blob/master/server/protocols/jmap-r=
fc-8621/src/main/scala/org/apache/james/jmap/method/EmailSetMethod.scala#L3=
9

On Fri, Aug 29, 2025 at 12:14=E2=80=AFPM Samiul Islam <[email protected]> w=
rote:

> Hello,
> I'm running the james master branch postgres version (this commit
> <http://c75eb15030b5811435f982a02e54fc2ab1e63691> to be more specific),
> and am trying to export the metrics to my prometheus stack deployed in a
> k3s cluster. With the servicemonitors setup and the metrics enabled throu=
gh
> the webadmin.properties file, I am only able to scrape "some" of the
> metrics referenced in the docs and dashboards here
> <https://github.com/apache/james-project/tree/d2cf7c8e229d9ed30125871b3de=
5af3cb1553649/server/grafana-reporting/prometheus-datasource>
>
> The metrics available to me are shown in the screenshot below, but the
> dashboards are showing some other metrics like "JMAP_request",
> "JMAP_getMailboxes", etc. which are not available in the metrics endpoint=
.
>
> Now my question is, how can I enable all metrics that are shown in the
> docs and example dashboards? Have they been renamed/removed recently?
>
> [image: image.png]
>
> PS: I noticed that the metrics factory is being injected in the jmap
> source code in files like these <http:///>, but they are never used
> anywhere (Unless they are somehow being invisibly used through Scala
> magic). If i properly create a metric here, would it automatically be
> exposed to the /metrics route? or is the recommended way to do this is
> through mailets?
>
>

--00000000000071b038063d7b23b8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Apologies for the broken links!<br><br><b=
 style=3D"text-decoration-line:underline">Running this commit:</b>=C2=A0<a =
href=3D"https://github.com/apache/james-project/tree/c75eb15030b5811435f982=
a02e54fc2ab1e63691">https://github.com/apache/james-project/tree/c75eb15030=
b5811435f982a02e54fc2ab1e63691</a>=C2=A0<br><u><b>Following these metrics d=
ocs</b></u>: <a href=3D"https://github.com/apache/james-project/tree/d2cf7c=
8e229d9ed30125871b3de5af3cb1553649/server/grafana-reporting/prometheus-data=
source">https://github.com/apache/james-project/tree/d2cf7c8e229d9ed3012587=
1b3de5af3cb1553649/server/grafana-reporting/prometheus-datasource</a><br><b=
><u>Relevant JMAP source code:</u>=C2=A0</b><a href=3D"https://github.com/a=
pache/james-project/blob/master/server/protocols/jmap-rfc-8621/src/main/sca=
la/org/apache/james/jmap/method/EmailSetMethod.scala#L39">https://github.co=
m/apache/james-project/blob/master/server/protocols/jmap-rfc-8621/src/main/=
scala/org/apache/james/jmap/method/EmailSetMethod.scala#L39</a></div><br><d=
iv class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gm=
ail_attr">On Fri, Aug 29, 2025 at 12:14=E2=80=AFPM Samiul Islam &lt;<a href=
=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hello,<br>I=
&#39;m running the james master branch postgres version (<a href=3D"http://=
c75eb15030b5811435f982a02e54fc2ab1e63691" target=3D"_blank">this commit</a>=
 to be more specific), and am trying to export the metrics to my prometheus=
 stack deployed in a k3s cluster. With the servicemonitors setup and the me=
trics enabled through the webadmin.properties file, I am only able to scrap=
e &quot;some&quot; of the metrics referenced in the docs and dashboards=C2=
=A0<a href=3D"https://github.com/apache/james-project/tree/d2cf7c8e229d9ed3=
0125871b3de5af3cb1553649/server/grafana-reporting/prometheus-datasource" ta=
rget=3D"_blank">here</a><br><br>The metrics available to me are shown in th=
e screenshot below, but the dashboards are showing some other metrics like =
&quot;JMAP_request&quot;, &quot;JMAP_getMailboxes&quot;, etc. which are not=
 available in the metrics endpoint.<br><br>Now my question is, how can I en=
able all metrics that are shown in the docs and example dashboards? Have th=
ey been renamed/removed recently?<br><br><img src=3D"cid:ii_mewfr3sn1" alt=
=3D"image.png" width=3D"437" height=3D"372"><br><br>PS:=C2=A0I noticed that=
 the metrics factory is being injected in the jmap source code in files lik=
e <a href=3D"http:///" target=3D"_blank">these</a>, but they are never used=
 anywhere (Unless they are somehow being invisibly used through Scala magic=
). If i properly create a metric here, would it automatically be exposed to=
 the /metrics route? or is the recommended way to do this is through mailet=
s?<br><br></div>
</blockquote></div></div>

--00000000000071b038063d7b23b8--
--00000000000071b03a063d7b23b9--