Azure VM error log only in debug mode (#842)

* Statsbeat update function resource provider

* WIP

* Azure VM error log only in debug mode

* Build
This commit is contained in:
Hector Hernandez 2021-09-16 12:00:11 -07:00 коммит произвёл GitHub
Родитель d79cbaebec
Коммит aa1af9214e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -7,7 +7,7 @@ import AutoCollectHttpDependencies = require("../AutoCollection/HttpDependencies
const AIMS_URI = "http://169.254.169.254/metadata/instance/compute";
const AIMS_API_VERSION = "api-version=2017-12-01";
const AIMS_FORMAT = "format=json";
const ConnectionErrorMessage = "ENETUNREACH";
const ConnectionErrorMessage = "UNREACH"; // EHOSTUNREACH, ENETUNREACH
export interface IVirtualMachineInfo {
isVM?: boolean;
@ -48,7 +48,7 @@ export class AzureVirtualMachine {
}
catch (error) {
// Failed to parse JSON
Logging.warn(AzureVirtualMachine.TAG, error);
Logging.info(AzureVirtualMachine.TAG, error);
}
callback(vmInfo);
});
@ -65,7 +65,7 @@ export class AzureVirtualMachine {
}
else{
// Only log when is not determined if VM or not to avoid noise outside of Azure VMs
Logging.warn(AzureVirtualMachine.TAG, error);
Logging.info(AzureVirtualMachine.TAG, error);
}
callback(vmInfo);
});

Просмотреть файл

@ -510,7 +510,7 @@ Following configuration is currently only available in beta version of the SDK.
| Property | Description |
| ------------------------------- |------------------------------------------------------------------------------------------------------------|
| aadTokenCredential| Azure Credential instance to be used to authenticate the App. [AAD Identity Crendential Classes](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#credential-classes) |
| aadTokenCredential| Azure Credential instance to be used to authenticate the App. [AAD Identity Crendential Classes](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#credential-classes) |