sxwei123/azure-log-analytics-data-collector-client

Add optional input for Azure endpoint to allow clouds other than Azure Public

Closed this issue · 2 comments

The implementation of this client in Azure Gov currently produces the following error: "uncaughtException: Cannot access 'LogAnalyticsTransport' before initialization".

Adding the optional input would allow for any cloud to work by specifying its own endpoint URL.

Azure Gov endpoint example:
https://learn.microsoft.com/en-us/azure/azure-government/compare-azure-government-global-azure
ods.opinsights.azure.com vs ods.opinsights.azure.us

Url to be updated with the endpoint to be optionally overwritten.
https://github.com/sxwei123/azure-log-analytics-data-collector-client/blob/master/src/index.ts#L58

Created and tested the changes in my fork and published for testing in npm.

Please let me know if you are available to process a PR @sxwei123

Thanks @davesee, PR has been merged.