Closed dreid closed 8 years ago
Nice, thanks! Can you elaborate a bit on why someone might not want to start the agent, but have the it installed anyhow?
heroku run
is the primary use case, since a slug for an app is used by all dynos you can't really prevent the agent from being installed in the one-off dynos used by heroku run.
:+1: Thanks!
@dreid I tried this today:
$ heroku run --env DISABLE_DATADOG_AGENT=true bash
Running bash on $DYNONAME... up, run.5324
DISABLE_DATADOG_AGENT environment variable is set, not starting the agent.
$
I get immediately disconnected, and cannot use bash in the environment. Have you had success with this?
It appears to not work because of the early exit (I guess all the scripts run in the same shell)
I will try to find time to work on a patch next week.
An alternative approach would be to check if the
DYNO
env var matchedrun.[0-9]+
and then bail but this is a much lower impact change.