You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"The Datadog Agent has been disabled. Unset the DISABLE_DATADOG_AGENT or set missing environment variables."
The problem being that these messages cannot be suppressed in any way, via DD_LOG_LEVEL or otherwise, and these messages specifically display when there is no intent to have the datadog agent run, i.e. when DD_API_KEY is unset or when DISABLE_DATADOG_AGENT is set.
This is especially an issue with one-off dynos, where it is (1) often desirable to disable the agent, and (2) the output may need to be programmatically parsed, and the above log lines are noise in the output.
e.g. if I were to do heroku run output_csv or something along those lines, the datadog logs would be included with that.
Suggested changes:
Offer some way to suppress these log messages, either via DD_LOG_LEVEL or otherwise.
Preferably, offer some way to suppress these via prerun.sh, in case one were to disable the agent via that means (e.g. https://docs.datadoghq.com/agent/basic_agent_usage/heroku/#disabling-the-datadog-agent-for-short-lived-dynos). Currently the layout of datadog.sh makes it so that you cannot affect DD_LOG_LEVEL via prerun.sh, also because of where it is loaded, even if you were able to affect it, one of the aforementioned lines would have already printed by then.
I would be happy to open a PR for this if desired, but the changes in question would be fairly simple anyway, and I don't know if you have a preferred way to handle this.
The text was updated successfully, but these errors were encountered:
This may apply to other logs as well, but specifically I'm having issues with these 2 log lines:
heroku-buildpack-datadog/extra/datadog.sh
Line 108 in c70b0fa
heroku-buildpack-datadog/extra/datadog.sh
Line 311 in c70b0fa
The problem being that these messages cannot be suppressed in any way, via
DD_LOG_LEVEL
or otherwise, and these messages specifically display when there is no intent to have the datadog agent run, i.e. whenDD_API_KEY
is unset or whenDISABLE_DATADOG_AGENT
is set.This is especially an issue with one-off dynos, where it is (1) often desirable to disable the agent, and (2) the output may need to be programmatically parsed, and the above log lines are noise in the output.
e.g. if I were to do
heroku run output_csv
or something along those lines, the datadog logs would be included with that.Suggested changes:
DD_LOG_LEVEL
or otherwise.prerun.sh
, in case one were to disable the agent via that means (e.g. https://docs.datadoghq.com/agent/basic_agent_usage/heroku/#disabling-the-datadog-agent-for-short-lived-dynos). Currently the layout ofdatadog.sh
makes it so that you cannot affectDD_LOG_LEVEL
viaprerun.sh
, also because of where it is loaded, even if you were able to affect it, one of the aforementioned lines would have already printed by then.I would be happy to open a PR for this if desired, but the changes in question would be fairly simple anyway, and I don't know if you have a preferred way to handle this.
The text was updated successfully, but these errors were encountered: