When I call trackDependency and pass in a data string value but no target, an extra warning is logged. 'The URL object is failed to create.' The following stack trace is included:
TypeError [ERR_INVALID_URL]: Invalid URL
at __node_internal_captureLargerStackTrace (node:internal/errors:478:5)
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at new URL (node:internal/url:641:5)
at NodeClient.TelemetryClient.trackDependency (/home/site/wwwroot/node_modules/applicationinsights/Library/TelemetryClient.ts:135:36)
The message is unhelpful. If target is required, then the message should tell me to populate it. I can only infer the meaning of the message after analyzing this code:
When I call trackDependency and pass in a
data
string value but notarget
, an extra warning is logged. 'The URL object is failed to create.' The following stack trace is included:The message is unhelpful. If
target
is required, then the message should tell me to populate it. I can only infer the meaning of the message after analyzing this code:https://github.com/microsoft/ApplicationInsights-node.js/blob/a79885cfe51e8900d98cfda7b99442353f9d3c80/Library/TelemetryClient.ts#L134C61-L134C61