Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Users can opt a given route out of global stats #48

Open
nextmat opened this issue Feb 2, 2013 · 4 comments
Open

Users can opt a given route out of global stats #48

nextmat opened this issue Feb 2, 2013 · 4 comments

Comments

@nextmat
Copy link
Contributor

nextmat commented Feb 2, 2013

/cc @josephruscio @mislav

This is related functionality to #47 but is really it's own thing, would appreciate your thoughts. Sometimes you have one or two routes (or maybe a collection) which are really a distinctly separate action (heartbeats, polling, etc) from the rest of your application. It might be nice to have the ability to specifically exclude a controller action from global stats collection when you know it significantly skews your averages and distribution.

Something like:

class MyController < ApplicationController
  librato_exclude :poll

  def myaction
    #..
  end

  def poll
    #..
  end

end

I'm a little on the fence as to whether allowing this is a good idea or not but I could certainly see cases where it would be useful, what do you think?

@josephruscio
Copy link
Contributor

I think the more flexibility we give people the better, as long as the defaults are sane ... is this something we could rig up like:

librato_instrument
librato_instrument :except, :poll
librato_instrument :only, :myaction

@undergroundwebdesigns
Copy link

Are there any plan to implement this? Came here via #121 but I see this issue is several years old.

@nextmat
Copy link
Contributor Author

nextmat commented Aug 26, 2016

@undergroundwebdesigns - we've continued to discuss but not a lot of people have asked for this.

Can you tell us a bit more about your specific use case? Having specific examples from interested customers will definitely bump this higher up the stack in priority.

@undergroundwebdesigns
Copy link

I'm working on a large app that talks to multiple external API's. Most of those API requests are handled in background jobs for performance, but some need to be "inline" in the web request.

I'd like some easy way of tracking the response time of just the endpoints that don't make inline API requests so that I can ensure this stays within acceptable limits. For obvious reasons, the endpoints that do make external requests are a) quite a bit slower, b) quite a bit more variable, and c) largely outside my control.

While I could just send all the data to Librato and filter out just the actions I want there with a computed property or something, with hundreds of endpoints and an evolving app this would be time consuming to set up and out of date quickly if not maintained.

The best possible solution would be some way of tagging the individual actions that make these requests, so I can still report on them but easily separate them out of my "internal response time" graph. An acceptable fallback would be simply blacklisting them from reporting to Librato altogether.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants