-
Notifications
You must be signed in to change notification settings - Fork 61
Description
I haven't been able to completely investigate this / understand the root causes, but I'm opening an issue here in case anyone else hits the same problem as I suspect its a common setup to use Go within WSL2 with Application Insights.
At first, I wasn't seeing any events make it to my Application Insights instance so I had to add a diagnostic listener via NewDiagnosticsMessageListener -- that showed the following message:
Failed to transmit telemetry: Post "https://dc.services.visualstudio.com/v2/track": dial tcp: lookup dc.services.visualstudio.com on 172.30.208.1:53: cannot unmarshal DNS message
When outside the application dig dc.services.visualstudio.com would resolve the domain correctly. While researching this I came across the similar rclone/rclone#4984 in which the project member @ncw created the upstream issue golang/go#44135 (appears to have been automatically closed without research / assignment).
A work around for this issue is to set the environment variable GODEBUG=netdns=cgo when running/ building your application.
I'd be ok if this is seen as not related to this project, but given it seems there's no one pursuing the upstream fix, it will cause this library to fail silently without really giving any hints that the library isn't working which seems a noteworthy usability issue which at a minimum I would think should be documented here given the likelihood of this lib being used with WSL.