Skip to content

Commit

Permalink
2.1.9 release (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorhdzg authored Nov 11, 2021
1 parent 9b5f3b6 commit dca4088
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions Bootstrap/StatusLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as path from "path";
import * as fs from "fs";
import * as DataModel from "./DataModel";
import { FileWriter, homedir } from "./FileWriter";
import { APPLICATION_INSIGHTS_SDK_VERSION } from "../Declarations/Constants";

export interface StatusContract {
AgentInitializedSuccessfully: boolean;
Expand All @@ -17,17 +18,6 @@ export interface StatusContract {
Ikey: string;
}

function readPackageVersion() {
let packageJsonPath = path.resolve(__dirname, "../../package.json");
try {
let packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
if (packageJson && typeof packageJson.version === "string") {
return packageJson.version;
}
} catch (e) { }
return "unknown";
}

export class StatusLogger {
public static readonly DEFAULT_FILE_PATH: string = path.join(homedir, "status");
public static readonly DEFAULT_FILE_NAME: string = `status_${os.hostname()}_${process.pid}.json`;
Expand All @@ -36,7 +26,7 @@ export class StatusLogger {
SDKPresent: false,
Ikey: "unknown",
AppType: "node.js",
SdkVersion: readPackageVersion(),
SdkVersion: APPLICATION_INSIGHTS_SDK_VERSION,
MachineName: os.hostname(),
PID: String(process.pid)
}
Expand Down
2 changes: 1 addition & 1 deletion Declarations/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Contracts = require("./Contracts")

export const APPLICATION_INSIGHTS_SDK_VERSION = "2.1.8";
export const APPLICATION_INSIGHTS_SDK_VERSION = "2.1.9";
export const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
export const DEFAULT_LIVEMETRICS_ENDPOINT = "https://rt.services.visualstudio.com";
export const DEFAULT_LIVEMETRICS_HOST = "rt.services.visualstudio.com";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Microsoft Application Insights Team",
"license": "MIT",
"bugs": "https://github.com/microsoft/ApplicationInsights-node.js/issues",
"version": "2.1.8",
"version": "2.1.9",
"description": "Microsoft Application Insights module for Node.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit dca4088

Please sign in to comment.