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
At the above code, if 'telemetry.target' property is not populated, it attempts to parse the 'data' field as an URL. This assumption should either be documented or the logic removed.
The text was updated successfully, but these errors were encountered:
Good catch! If data is not a url, does this cause an error or return undefined?
I believe this was to fill the target field for back-compat as it was introduced after data.
If this errors, I think its proper to catch this scenario and leave target unfilled, but this should still autopopulate when possible. Good point on documenting this behavior!
https://github.com/Microsoft/ApplicationInsights-node.js/blob/dd34598413b5b360a9b3153de2323559d00fbcfe/Library/TelemetryClient.ts#L103-L105
At the above code, if 'telemetry.target' property is not populated, it attempts to parse the 'data' field as an URL. This assumption should either be documented or the logic removed.
The text was updated successfully, but these errors were encountered: