dd-trace-dotnet
dd-trace-dotnet copied to clipboard
unable to unset PROXY HTTP settings
running with a docker container built with package datadog-dotnet-apm_1.28.8_amd64.deb we need to have HTTP_PROXY env settings for the main application, but I also need to disable it for the DD_tracer to be able to reach the reporting endpoint which is running in the same kubernetes node... all my attempts have miserably failed as it seems:
- the agent is not respecting the order of env variables, I tried to UNSET the proxy declaring an empty DD_PROXY_HTTP variable
- the agent is not implementing the feature flag
no_proxy_nonexact_matchthat would allow me to exclude the CIDR the code is trying to reach
$ k8s exec -ti byodc-6d9bdd59d-jbcqk /bin/bash
root@byodc-6d9bdd59d-jbcqk:/app# env |grep PROXY
DD_PROXY_HTTPS=
DD_NO_PROXY_NONEXACT_MATCH=true
NO_PROXY=172.16.0.0/12,.dsp.zzzz.de,.kube,.ads.zzz.de,developer.zzz.de,lab.it-zzz.zzz.net,localhost
DD_PROXY_NO_PROXY=172.16.0.0/12
HTTPS_PROXY=http://zzzz-dsi-proxy.shared.dsp.zzz.de:3128
DD_PROXY_HTTP=
root@byodc-6d9bdd59d-jbcqk:/opt/datadog/logs# tail dotnet-tracer-managed-dotnet-20220311.log
<hr>
<div id="footer">
<p>Generated Fri, 11 Mar 2022 14:50:57 GMT by zzz-dsi-proxy02.shared.dsp.zzz.de (squid/3.5.20)</p>
<!-- ERR_ACCESS_DENIED -->
</div>
</body></html>
{ MachineName: ".", Process: "[1 dotnet]", AppDomain: "[1 xxx.yyyy.DE]", TracerVersion: "1.28.8.0" }
2022-03-11 14:50:57.961 +00:00 [ERR] An error occurred while sending 1 traces to the agent at http://172.31.36.20:8126/v0.4/traces
{ MachineName: ".", Process: "[1 dotnet]", AppDomain: "[1 xxx.yyy.DE]", TracerVersion: "1.28.8.0" }
root@byodc-6d9bdd59d-jbcqk:/opt/datadog/logs# exit