jelmer / xandikos

A CalDAV/CardDAV server backed by Git
https://www.xandikos.org/
GNU General Public License v3.0
410 stars 42 forks source link

[Question] What is the purpose of "metrics" python-aiohttp-openmetrics ? #263

Closed m040601 closed 1 year ago

m040601 commented 1 year ago

First of all thank you for working on this promising tool. I've been testing a lot caldav/cardav servers and we sure need to see more solid open source alternatives.

I'm not a developer but an end user.

I'm on Archlinux and we luckly have an official package for xandikos, https://archlinux.org/packages/extra/any/xandikos/ . Very convenient ! You can add that information to the README.

I was then testing

$ xandikos --defaults -d /some/place/

And got this,

Listening on localhost:8080
aiohttp-openmetrics not found; /metrics will not be available.

I soon found out that the reason is that the official Arch package disables this in it's official "recipe", https://gitlab.archlinux.org/archlinux/packaging/packages/xandikos/-/blob/main/PKGBUILD?ref_type=heads and makes it optional. It is an "Optional dependency". That is you install it extra if you want it on Archlinux. It is not there forced on you by default,

optdepends=(
  'python-aiohttp-openmetrics: for metrics with the standalone server'
...

So I went to the Internet to see what is this thing,

https://pypi.org/project/aiohttp-openmetrics/

This project contains a simple middleware and /metrics route endpoint for aiohttp that allow easy implementation of the [openmetrics](https://www.openmetrics.org/) protocol.

https://www.openmetrics.org/

I cant open this site on Firefox ??? Lotz of SSL errors

And a reference in https://en.wikipedia.org/wiki/Prometheus_(software)#Standardization_into_OpenMetrics

I know what Prometheus is, what what it is for. Just dont know about this "metrics".

Also tried to clone the repo, https://github.com/jelmer/xandikos/ and tried to grep to the entire code/docs to see what the purpose of this is . Only found some scant references.

Which I cant understand because I'm not a python programmer.

This is not a request about whether anything about "metrics" should be or should be not in the project.

This is a request to explain what it is, what it does, why it is there etc.

So could you add some info to the README about this ? Thanks in advance.


EDIT:

OpenMetrics a specification built upon and carefully extending [Prometheus exposition format](https://prometheus.io/docs/instrumenting/exposition_formats/) in almost 100% backwards-compatible ways.