This code is no longer needed. Heroku has provided syslog drains for all users for free.
For better Heroku logging with Papertrail, check this out:
http://help.papertrailapp.com/kb/hosting-services/heroku#standalone
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'open-uri' | |
require 'notifo' | |
class BeatportBetaNotifier | |
SLEEP_TIMEOUT = 10 | |
BEATPORT_URL = 'http://beta.beatport.com/beta' | |
# A little helper from _why | |
class Object | |
def metaclass | |
class << self; self; end | |
end | |
end | |
module A | |
def self.foo | |
puts "yes" |
From 53402e071c7f9d4646bd98c5e5d5e97e69073f3a Mon Sep 17 00:00:00 2001 | |
From: Eric Lindvall <[email protected]> | |
Date: Fri, 27 May 2011 12:46:00 -0700 | |
Subject: [PATCH] Only deallocate the frame if it isn't NULL. | |
--- | |
app_swift.c | 40 +++++++++++++++++++++------------------- | |
1 files changed, 21 insertions(+), 19 deletions(-) | |
diff --git a/app_swift.c b/app_swift.c |
class NetworkLatency < Scout::Plugin | |
OPTIONS=<<-EOS | |
host: | |
label: Host | |
notes: The remote host to measure. Defaults to the default gateway if none is specified. | |
count: | |
label: Count | |
notes: Number of samples to take | |
default: 5 | |
EOS |
This code is no longer needed. Heroku has provided syslog drains for all users for free.
For better Heroku logging with Papertrail, check this out:
http://help.papertrailapp.com/kb/hosting-services/heroku#standalone
[1 : 0] eric@kiccoro:/Users/eric > wget http://bazaar.launchpad.net/~graphite-dev/graphite/main/download/head:/whisper.py-20080505183243-3ypo8j4r6x1np8hq-2/whisper.py | |
--2011-03-19 13:11:15-- http://bazaar.launchpad.net/~graphite-dev/graphite/main/download/head:/whisper.py-20080505183243-3ypo8j4r6x1np8hq-2/whisper.py | |
Resolving bazaar.launchpad.net... 91.189.90.11 | |
Connecting to bazaar.launchpad.net|91.189.90.11|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 21690 (21K) [text/x-python] | |
Saving to: `whisper.py' | |
100%[================================================================================================>] 21,690 90.5K/s in 0.2s |
I've been playing around with trying to make it as simple as possible to start logging a few metrics with as little effort in setup as possible.
As I was working on Papertrail I came up with a couple interesting ideas, some of which were inspired by OpenTSDB.
In this example we are pretending we're processing emails as background jobs and would like to track how many we've sent over time.
3/16/11 2:24:34 PM [0x0-0x76076].com.topfunky.PeepOpen[2111] LLVM ERROR: Cannot yet select: 0x101909010: f64 = bit_convert 0x101909410 [ORD=347] [ID=7] | |
3/16/11 2:24:34 PM [0x0-0x76076].com.topfunky.PeepOpen[2111] 0x101909410: i64 = and 0x101957e10, 0x101954d10 [ORD=346] [ID=6] | |
3/16/11 2:24:34 PM [0x0-0x76076].com.topfunky.PeepOpen[2111] 0x101957e10: i64,ch = CopyFromReg 0x10350fd88, 0x10191c110 [ORD=346] [ID=5] | |
3/16/11 2:24:34 PM [0x0-0x76076].com.topfunky.PeepOpen[2111] 0x10350fd88: ch = EntryToken [ORD=346] [ID=0] | |
3/16/11 2:24:34 PM [0x0-0x76076].com.topfunky.PeepOpen[2111] 0x10191c110: i64 = Register %reg16384 [ORD=346] [ID=1] | |
3/16/11 2:24:34 PM [0x0-0x76076].com.topfunky.PeepOpen[2111] 0x101954d10: i64 = Constant<-4> [ORD=346] [ID=2] | |
3/16/11 2:24:34 PM com.apple.launchd.peruser.501[213] ([0x0-0x76076].com.topfunky.PeepOpen[2111]) Exited with exit code: 1 | |
3/16/11 2:25:26 PM com.apple.launchd.peruser.501[213] (com.apple.pbs) Throttling respawn: Will start in 10 seconds | |
3/16/11 2:25:40 |
require 'net/https' | |
require 'always_verify_ssl_certificates' | |
module SecurityModule | |
class HighSecurity | |
class ReallyHighSecurity | |
def self.turn_on_safe_connections | |
OpenSSL::SSL::VERIFY_NONE | |
end | |
end |
class JsBuilderTemplate < Template | |
def precompiled_preamble(locals) | |
[ super, "begin" ].join("\n") | |
end | |
def precompiled_postamble(locals) | |
"end.to_json" | |
end | |
def precompiled_template(locals) |