From aa1af9214eab324539a72f51951c66d115f6b8bc Mon Sep 17 00:00:00 2001 From: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com> Date: Thu, 16 Sep 2021 12:00:11 -0700 Subject: [PATCH] Azure VM error log only in debug mode (#842) * Statsbeat update function resource provider * WIP * Azure VM error log only in debug mode * Build --- Library/AzureVirtualMachine.ts | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/AzureVirtualMachine.ts b/Library/AzureVirtualMachine.ts index 8f52a4cd..9a77e363 100644 --- a/Library/AzureVirtualMachine.ts +++ b/Library/AzureVirtualMachine.ts @@ -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); }); diff --git a/README.md b/README.md index 2c245b28..9073b38f 100644 --- a/README.md +++ b/README.md @@ -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) |