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

Commit

Permalink
Set dyno type on startup
Browse files Browse the repository at this point in the history
Using the provided $DYNO environment variable, parse out the significant
portion and append it to the end of the Agent config file.

This will allow metrics selection per running dyno (dyno_tpe:web vs
dyno_type:worker).
  • Loading branch information
miketheman committed May 24, 2016
1 parent 0621e5f commit 054f24c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extra/run-dogstatsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ else
exit 1
fi

# Set dyno type as a Datadog tag
DYNOTYPE=$(echo $DYNO|cut -f1 -d'.')
DYNOTAG=dyno_type:$DYNOTYPE

echo "tags: $DYNOTAG" >> /app/.apt/opt/datadog-agent/agent/datadog.conf

(
# Unset other PYTHONPATH/PYTHONHOME variables before we start
unset PYTHONHOME PYTHONPATH
Expand Down

0 comments on commit 054f24c

Please sign in to comment.