applicationinsights
Version:
Microsoft Application Insights module for Node.js
25 lines • 1.09 kB
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.EtwDiagnosticLogger = void 0;
const baseDiagnosticLogger_1 = require("./baseDiagnosticLogger");
const etwWritter_1 = require("./writers/etwWritter");
class EtwDiagnosticLogger extends baseDiagnosticLogger_1.BaseDiagnosticLogger {
constructor(instrumentationKey) {
super(instrumentationKey);
this._agentLogger = new etwWritter_1.EtwWritter();
}
logMessage(diagnosticLog) {
const metaData = this._getMetadata();
metaData.push(diagnosticLog.messageId || "");
const message = diagnosticLog.message;
this._agentLogger.log(message, metaData);
}
_getMetadata() {
// Must return strings in this exact order!
return [this._extensionVersion, this._subscriptionId, this._siteName, this._sdkVersion, this._instrumentationKey];
}
}
exports.EtwDiagnosticLogger = EtwDiagnosticLogger;
//# sourceMappingURL=etwDiagnosticLogger.js.map
;