Datadog is very nice. Here's something I wrote when asked what value we were getting from it.
I would break it down into four pieces. Datadog is
-
providing functionality
-
we need
| import os | |
| import re | |
| # ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ | |
| pattern = re.compile(r'<span class="CommitLog-author" title="(\w*@\w*.\w*)') | |
| all_committers = set() | |
| for f in os.listdir("log"): | |
| if "external" in f or "third_party" in f or "deps" in f: |
| on the stackdriver side | |
| ======================= | |
| https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors | |
| https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries | |
| Init | |
| ==== | |
| this creates the stackdriver struct |
| ### Keybase proof | |
| I hereby claim: | |
| * I am sciurus on github. | |
| * I am sciurus (https://keybase.io/sciurus) on keybase. | |
| * I have a public key whose fingerprint is DBF4 58B0 081D 8210 D0D1 04AA FD36 B3D6 DBA7 48C7 | |
| To claim this, I am signing this object: |
| INFO global: Vagrant version: 1.6.3 | |
| INFO global: Ruby version: 2.0.0 | |
| INFO global: RubyGems version: 2.0.14 | |
| INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant" | |
| INFO global: VAGRANT_LOG="debug" | |
| INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded" | |
| INFO global: VAGRANT_INSTALLER_VERSION="2" | |
| INFO global: VAGRANT_DETECTED_OS="Darwin" | |
| INFO global: VAGRANT_INSTALLER_ENV="1" | |
| INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1" |
| INFO global: Vagrant version: 1.3.5 | |
| DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/opensuse/plugin.rb | |
| INFO manager: Registered plugin: OpenSUSE host | |
| DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/arch/plugin.rb | |
| INFO manager: Registered plugin: Arch host | |
| DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/freebsd/plugin.rb | |
| INFO manager: Registered plugin: FreeBSD host | |
| DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/slackware/plugin.rb | |
| INFO manager: Registered plugin: Slackware host | |
| DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/linux/plugin.rb |
| #!/usr/bin/env python | |
| import os, re, signal, subprocess | |
| def monitor(): | |
| print "Starting procedure" | |
| p = subprocess.Popen('./problematic_procedure.py', | |
| stdout=subprocess.PIPE | |
| ) |
| #!/bin/bash | |
| echo_error () { | |
| echo "Error: $@" 1>&2 | |
| } | |
| if [ $(uname) == 'Darwin' ]; then | |
| rlink='greadlink' | |
| else | |
| rlink='readlink' |