Is there a way to filter out certain log statements using the Heroku Addon?

Mattwindwer

02 May, 2012 03:15 AM UTC

Hello,

Every minute hirefireapp pings our app to see if it needs to adjust our dynos. That request is cluttering our logs. Do you currently supporting filtering out certain statements (e.g. using a regexp) using the Heroku Addon?

Thanks.

  1. Support Staff 1 Posted by Troy on 02 May, 2012 10:13 PM UTC

    Hi Matt,

    Great question. There's not right now, but we're going to add such a thing (and it's not far away -- best guess, small number of weeks). Do you have a strong preference between a regex, a Papertrail search construct, or something else entirely?

    Cheers,

    Troy

  2. 2 Posted by Mattwindwer on 04 May, 2012 02:53 AM UTC

    For ease of use, I would probably just prefer a way to enter certain terms
    into a text field. I'm envisioning something like the way you create mail
    filters in gmail or even the way you exclude domains in google analytics.

    You probably should be able to create one or more filters. The filters
    should not be permanent -- you should be able to turn them on and off
    anytime and be able to see your unfiltered logs. There are probably some
    cool ways of doing this with a UI.

    Regex would also be great as an advanced option, but for most people just
    filtering out a certain term would probably suffice. In my case that would
    be "hirefireapp". On the backend of your system that would probably
    translate to something like /hirefireapp/i. Maybe you should have a
    dropdown option that asks whether what you're typing into the text field is
    a search term or a regex.

  3. 3 Posted by Shravan on 30 Oct, 2012 06:06 AM UTC

    Has there been an update to this? I would like to filter out certain error messages from a saved search.

  4. Support Staff 4 Posted by Troy on 02 Nov, 2012 02:35 PM UTC

    Hi Shravan,

    No news yet, but it's coming. I don't have a firmer ETA, so I'm leaving this open until either it's live or I do.

    Thanks,

    Troy

  5. 5 Posted by Jason Horman on 04 Nov, 2012 02:57 AM UTC

    It would be great if filtering out certain log lines would reduce the total log transfer for the day. I would love it if I only saw application logs in papertrail from heroku, and not

    heroku[nginx]
    heroku[router]

    optionally.

  6. Support Staff 6 Posted by Troy on 15 Nov, 2012 04:34 PM UTC

    Stay tuned, all, this is right around the corner. I'll update the ticket when it's available, which I'd guess is next week.

    Troy

  7. 7 Posted by Tyler Morgan on 18 Dec, 2012 04:26 PM UTC

    Has anything come of this? Would love to be able to apply regex filtering to logs.

  8. Support Staff 8 Posted by Troy on 18 Dec, 2012 05:03 PM UTC

    Hi Tyler,

    Yes, this is live for a few folks already and should be live for everyone this week. Thanks for inquiring. I'll update this ticket once it's available (and if you'd like to use it before then, just open a private support request and tell us what you'd like to filter).

    Thanks,

    Troy

  9. 9 Posted by Henrik Nyh on 23 Sep, 2013 02:32 PM UTC

    Troy, could you please update this ticket with the infp?

  10. Support Staff 10 Posted by Troy on 23 Sep, 2013 03:10 PM UTC

    Hi Henrik (and anyone else reading),

    Absolutely. This has been live since shortly after my last update, but it looks like when I sent updates to people who had asked about it, I missed this ticket. I'm sorry to have made you needlessly wait.

    Here's an introduction and where I recommend starting:

    http://blog.papertrailapp.com/post/42053486115/more-signal-less-noi...

    Here's the complete docs with more examples: http://help.papertrailapp.com/kb/how-it-works/log-filtering

    You'll see the filter setting on "Account" within Papertrail. If we can help refine a filter, please let us know.

    Thanks,

    Troy

  11. 11 Posted by Henrik Nyh on 23 Sep, 2013 05:27 PM UTC

    Troy, thank you! No worries.

  12. This discussion is closed. Please email support@papertrailapp.com to continue troubleshooting this or a related problem.