Skip to content

Instantly share code, notes, and snippets.

View talwai's full-sized avatar

Aaditya Talwai talwai

View GitHub Profile
i-2bc93a2a
import functools
import logging
from .provider import DefaultContextProvider
from .context import Context
from .sampler import AllSampler
from .writer import AgentWriter
from .span import Span
from . import compat
@talwai
talwai / datadog.repo
Created February 8, 2017 01:11
dd-agent yum beta repo
[datadog]
name = Datadog, Inc.
baseurl = https://yum.datadoghq.com/beta/x86_64/
enabled=1
gpgcheck=1
priority=1
gpgkey=https://yum.datadoghq.com/DATADOG_RPM_KEY.public
https://yum.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public
#!/bin/bash
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# Datadog Trace Agent installation script: install and setup the Trace Agent on supported Linux distributions
# using the package manager and Datadog repositories.
set -e
logfile="dd-trace-agent-install.log"
@talwai
talwai / empty.yaml
Created June 20, 2016 10:00
empty agent conf
init_config:
instances:
[{}]
--- /opt/datadog-agent/agent/checks.d/openstack.py 2016-02-01 11:12:37.000000000 -0500
+++ /opt/datadog-agent/agent/checks.d/openstack_patch.py 2016-02-03 14:49:22.000000000 -0500
@@ -281,7 +281,7 @@
nova_version = nova_api_version or DEFAULT_NOVA_API_VERSION
catalog = json_resp.get('token', {}).get('catalog', [])
- nova_match = 'novav21' if nova_version == 'v2.1' else 'nova'
+ nova_match = 'nova'
for entry in catalog:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --new-window "https://app.datadoghq.com/account/settings" \
"https://app.datadoghq.com/infrastructure/map?fillby=avg%3Acpuutilization&sizeby=avg%3Anometric&groupby=availability-zone&nameby=aws_name&nometrichosts=false&tvMode=false&nogrouphosts=false&palette=hostmap_blues&paletteflip=false"\
"https://app.datadoghq.com/dash/71811/demo---cassandra?live=true&page=0&is_auto=false&from_ts=1453149091364&to_ts=1453235491364&tile_size=m"\
"https://app.datadoghq.com/monitors#/create" "https://app.datadoghq.com/monitors#183575?group=all&live=4h"\
"https://app.datadoghq.com/event/stream?tags_execution=and&show_private=true&per_page=30&aggregate_up=true&use_date_happened=false&display_timeline=true&from_ts=1452632400000&is_zoomed=false&to_ts=1453237200000&is_auto=false&incident=true&only_discussed=false&no_user=false&page=0&live=true&bucket_size=10800000"\
"https://www.datadoghq.com/customers/"\
"https://github.com/DataDog/dd-agent"\
@talwai
talwai / statsd_send.sh
Created November 23, 2015 01:33
Send Metric to Containerized StatsD on Mac OS X via docker-machine
# Mac OS X
echo "aaditya.test.metric:100|g" | nc -u -w0 $(docker-machine ip default) 8125
@talwai
talwai / profile.dmp
Created May 18, 2015 20:58
Example output of profiling the network check in dd-agent
(venv)Aadityas-MacBook-Pro:dd-agent aadityatalwai$ python agent.py check network --profile
2015-05-18 16:56:36,856 | INFO | dd.collector | config(config.py:922) | initialized checks.d checks: ['ntp', 'consul', 'network']
2015-05-18 16:56:36,856 | INFO | dd.collector | config(config.py:923) | initialization failed checks.d checks: []
2015-05-18 16:56:36,856 | INFO | dd.collector | checks.collector(collector.py:443) | Running check network
2015-05-18 16:56:36,873 | INFO | dd.collector | checks(__init__.py:654) |
network
Memory Before (RSS): 18206720
Memory After (RSS): 18243584
Difference (RSS): 36864
Memory Before (VMS): 2534727680
@talwai
talwai / docker_env.sh
Created February 9, 2015 05:28
Export Docker envars immediately after boot2docker up
boot2docker up && env | grep DOCKER | sed 's/^/export /' > docker.conf && . docker.conf