Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide metrics exposition #302

Closed
dhardy92 opened this issue Apr 15, 2014 · 14 comments
Closed

Provide metrics exposition #302

dhardy92 opened this issue Apr 15, 2014 · 14 comments

Comments

@dhardy92
Copy link
Contributor

Thumbor should provide some way to expose metrics on some /metrics endpoint for example

I don't know if tornado can handle this feature natively but something like https://github.com/Cue/scales would help ?

@heynemann
Copy link
Member

It looks like it can. Whenever I get some time I'll check it out. I would love to have metrics built-in.

@heynemann
Copy link
Member

I'm not sure thumbor should expose a /metrics enddpoint, being an imaging server. I'd love to be able to send statistics to some endpoint (statsd, graphite and the like). Those are better suited to track and show stats, IMHO.

@heynemann
Copy link
Member

What do you think @rcrowe @dhardy92 ?

@rcrowe
Copy link

rcrowe commented Sep 8, 2014

All for that!

A stats handler that can be set through the config file could always create the /metrics endpoint if it's really needed.

Is there any plan / thought on how to tackle this?

@dhardy92
Copy link
Contributor Author

dhardy92 commented Sep 8, 2014

if I look around, many services expose metrics via http endpoint at least.

  • elasticsearch
  • mesos
  • hadoop
    It is easily integrable with any solution of collection throw collectd agent for example.

@heynemann
Copy link
Member

What I meant is that I don't think thumbor should be responsible for displaying the metrics Damien... There are MANY solutions out there that do it properly. It's VERY easy to add a /metrics endpoint in your webserver that ballances thumbor (nginx?), so I think we should focus our efforts in integrating with those solutions. Do you agree?

@rcrowe
Copy link

rcrowe commented Nov 4, 2014

Hey @heynemann

Do you have any thoughts on how this might be tackled? I'm pretty new to python, but I'd be willing to try putting a pull-request together to keep things moving.

Just after some some direction so I don't waste my time & hopefully will help others with making a contribution.

@heynemann
Copy link
Member

Well, I would go on about doing it similarly to other extensible structures in thumbor, like error handlers or logging. That would allow users to publish metrics to whatever service they feel like doing.

That service would then be available from the context (importer) and could be used with whatever metrics we want to support. Some that come to mind:

  • Image request;
  • Original Image Cache Miss;
  • Original Image Cache Hit;
  • Result Storage Cache Miss;
  • Result Storage Cache Hit;
  • Image per original format (how many originals were a jpg);
  • Image per resulting format (how many results were served as webp).

The last one is particularly useful to understand the portion of browsers that are being served webp images.

Maybe @dhardy92 has other metrics he would like to have. ;)

@ciceroverneck
Copy link
Contributor

👍
More suggestions metrics:

  • average response time avg_rt
  • running_time
  • exceptions

@phoet
Copy link
Contributor

phoet commented Jul 21, 2015

would be really cool to get more metrics out of thumbor. we experimented with NewRelic to gain more insight, but it looks like tornado is not supported any longer. if you have any pointers for how we could easily get more data into our librato setup or any other helpful service, please let me know. we are especially interested in the time it takes to fetch the original images from the web. i guess that would be Original Image Cache Miss.

@heynemann
Copy link
Member

It seems incredibly useful @phoet do you think you can help with a Pull Request to add it?

@heynemann
Copy link
Member

Any news here?

@phoet
Copy link
Contributor

phoet commented Sep 9, 2015

Please have a look at this, its not battle tested though https://github.com/thumbor-community/librato

@masom
Copy link
Contributor

masom commented Jun 8, 2017

Thumbor now supports pluggable metrics which allows anyone to supply an implementation for their favourite data collection system.

@masom masom closed this as completed Jun 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants