1

I have service deployed through a stack on a swarm. Let's say :

someStack : 
    SomeServer : ...
    myApplication: ....

Above this, there is a traefik server, that allows me to call various services, but also to map different urls to APIs/subservices : since the above service provide actually many sub-services such as (seen from container POV):

  • /myApplication/getUsers/For/Area/51
  • /myApplication/getUsers/Admins
  • /myApplication/ping/enclyclopedia&code=42
  • /myApplication/bricks/list&code=0937

along with other endpoints from other stacks / services (/otherApplication/toto, /yaApp/titi, etc.)

The matching endpoints being (from traefik POV) :

  • /users&area=51
  • /getadmins
  • /ask&code=42
  • /listbricks&code=0937

Theses works well... Now, Il would like to be able to perform stats on the usage of each endpoint (eg using grafana), related to myApplication overall stats . Something like :

  • /users : 57 % of myApplication calls, 33 % of myApplication total response time, 15 % of myApplication total errors
  • /getadmins : 33 % of myApplication call, 7% of myApplication total response time, 85 % of myApplication total errors
  • /ask : 7 % of myApplication call, 40% of myApplication total response time, 0 % of myApplication total errors
  • /listbricks : 3 % of cmyApplication all, 20% of myApplication total response time, 0 % of myApplication total errors

The metrics I have so far are those provided by cAdvisor and traefik itself. I am using using prometheus to pull them and build metrics on top of them. Regarding traefik's metrics, I can't see any that match my need...

I do not own 'myApplication', and thus cannot basicely implement some kind of instrumentation from the inside (or not a trivial way). I could also build metrics over traefik access logs, but I am mainly wondering if such metrics, or trick with existing metrics, could allow me to perform such stats on my application usage.

Any idea?

Marvin
  • 1,650
  • 4
  • 19
  • 41

0 Answers0