@appsignal/nodejs
Advanced tools
Comparing version 3.0.17 to 3.0.18
@@ -12,6 +12,6 @@ "use strict"; | ||
_Diagnose_diagnose.set(this, void 0); | ||
tslib_1.__classPrivateFieldSet(this, _Diagnose_diagnose, new DiagnoseTool(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Diagnose_diagnose, new DiagnoseTool(), "f"); | ||
} | ||
async run() { | ||
const data = await tslib_1.__classPrivateFieldGet(this, _Diagnose_diagnose, "f").generate(); | ||
const data = await (0, tslib_1.__classPrivateFieldGet)(this, _Diagnose_diagnose, "f").generate(); | ||
console.log(`AppSignal diagnose`); | ||
@@ -81,3 +81,3 @@ console.log(`=`.repeat(80)); | ||
this.print_newline(); | ||
this.printConfiguration(data["config"], tslib_1.__classPrivateFieldGet(this, _Diagnose_diagnose, "f").clientFilePath()); | ||
this.printConfiguration(data["config"], (0, tslib_1.__classPrivateFieldGet)(this, _Diagnose_diagnose, "f").clientFilePath()); | ||
this.print_newline(); | ||
@@ -141,3 +141,3 @@ console.log(`Read more about how the diagnose config output is rendered`); | ||
console.log(""); | ||
await tslib_1.__classPrivateFieldGet(this, _Diagnose_diagnose, "f").sendReport(data); | ||
await (0, tslib_1.__classPrivateFieldGet)(this, _Diagnose_diagnose, "f").sendReport(data); | ||
} | ||
@@ -144,0 +144,0 @@ printAgentDiagnose(report) { |
@@ -44,5 +44,5 @@ import { AppsignalOptions } from "./config/options"; | ||
}; | ||
export type DefaultInstrumentationName = keyof typeof DefaultInstrumentations; | ||
type AdditionalInstrumentationsOption = NodeSDKConfiguration["instrumentations"]; | ||
export type Options = AppsignalOptions & { | ||
export declare type DefaultInstrumentationName = keyof typeof DefaultInstrumentations; | ||
declare type AdditionalInstrumentationsOption = NodeSDKConfiguration["instrumentations"]; | ||
export declare type Options = AppsignalOptions & { | ||
additionalInstrumentations: AdditionalInstrumentationsOption; | ||
@@ -49,0 +49,0 @@ }; |
@@ -9,3 +9,3 @@ "use strict"; | ||
const metrics_1 = require("./metrics"); | ||
const gcProbe = tslib_1.__importStar(require("./probes/v8")); | ||
const gcProbe = (0, tslib_1.__importStar)(require("./probes/v8")); | ||
const integration_logger_1 = require("./integration_logger"); | ||
@@ -66,2 +66,30 @@ const noops_1 = require("./noops"); | ||
/** | ||
* Creates a new instance of the `Appsignal` object | ||
*/ | ||
constructor(options = {}) { | ||
this.VERSION = version_1.VERSION; | ||
_Client_metrics.set(this, void 0); | ||
_Client_sdk.set(this, void 0); | ||
this.config = new config_1.Configuration(options); | ||
this.extension = new extension_1.Extension(); | ||
this.integrationLogger = this.setUpIntegrationLogger(); | ||
this.storeInGlobal(); | ||
if (this.isActive) { | ||
if (process.env._APPSIGNAL_DIAGNOSE === "true") { | ||
Client.integrationLogger.info("Diagnose mode is enabled, not starting extension, SDK and probes"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Client_metrics, new noops_1.NoopMetrics(), "f"); | ||
} | ||
else { | ||
this.start(); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Client_metrics, new metrics_1.Metrics(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Client_sdk, this.initOpenTelemetry(options.additionalInstrumentations || []), "f"); | ||
} | ||
} | ||
else { | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Client_metrics, new noops_1.NoopMetrics(), "f"); | ||
console.error("AppSignal not starting, no valid configuration found"); | ||
} | ||
this.initCoreProbes(); | ||
} | ||
/** | ||
* Global accessors for the AppSignal client | ||
@@ -102,30 +130,2 @@ */ | ||
/** | ||
* Creates a new instance of the `Appsignal` object | ||
*/ | ||
constructor(options = {}) { | ||
this.VERSION = version_1.VERSION; | ||
_Client_metrics.set(this, void 0); | ||
_Client_sdk.set(this, void 0); | ||
this.config = new config_1.Configuration(options); | ||
this.extension = new extension_1.Extension(); | ||
this.integrationLogger = this.setUpIntegrationLogger(); | ||
this.storeInGlobal(); | ||
if (this.isActive) { | ||
if (process.env._APPSIGNAL_DIAGNOSE === "true") { | ||
Client.integrationLogger.info("Diagnose mode is enabled, not starting extension, SDK and probes"); | ||
tslib_1.__classPrivateFieldSet(this, _Client_metrics, new noops_1.NoopMetrics(), "f"); | ||
} | ||
else { | ||
this.start(); | ||
tslib_1.__classPrivateFieldSet(this, _Client_metrics, new metrics_1.Metrics(), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Client_sdk, this.initOpenTelemetry(options.additionalInstrumentations || []), "f"); | ||
} | ||
} | ||
else { | ||
tslib_1.__classPrivateFieldSet(this, _Client_metrics, new noops_1.NoopMetrics(), "f"); | ||
console.error("AppSignal not starting, no valid configuration found"); | ||
} | ||
this.initCoreProbes(); | ||
} | ||
/** | ||
* Returns `true` if the extension is loaded and configuration is valid | ||
@@ -170,3 +170,3 @@ */ | ||
} | ||
(_a = tslib_1.__classPrivateFieldGet(this, _Client_sdk, "f")) === null || _a === void 0 ? void 0 : _a.shutdown(); | ||
(_a = (0, tslib_1.__classPrivateFieldGet)(this, _Client_sdk, "f")) === null || _a === void 0 ? void 0 : _a.shutdown(); | ||
this.metrics().probes().stop(); | ||
@@ -199,3 +199,3 @@ this.extension.stop(); | ||
metrics() { | ||
return tslib_1.__classPrivateFieldGet(this, _Client_metrics, "f"); | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _Client_metrics, "f"); | ||
} | ||
@@ -216,3 +216,3 @@ logger(group, level = "info", format = "plaintext") { | ||
// load probes | ||
probes.forEach(({ PROBE_NAME, init }) => tslib_1.__classPrivateFieldGet(this, _Client_metrics, "f").probes().register(PROBE_NAME, init(tslib_1.__classPrivateFieldGet(this, _Client_metrics, "f")))); | ||
probes.forEach(({ PROBE_NAME, init }) => (0, tslib_1.__classPrivateFieldGet)(this, _Client_metrics, "f").probes().register(PROBE_NAME, init((0, tslib_1.__classPrivateFieldGet)(this, _Client_metrics, "f")))); | ||
} | ||
@@ -219,0 +219,0 @@ defaultInstrumentationsConfig() { |
@@ -5,5 +5,5 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const os_1 = tslib_1.__importDefault(require("os")); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
const os_1 = (0, tslib_1.__importDefault)(require("os")); | ||
const fs_1 = (0, tslib_1.__importDefault)(require("fs")); | ||
const version_1 = require("./version"); | ||
@@ -10,0 +10,0 @@ const utils_1 = require("./utils"); |
import type { DefaultInstrumentationName } from "../client"; | ||
export type AppsignalOptions = { | ||
export declare type AppsignalOptions = { | ||
active: boolean; | ||
@@ -4,0 +4,0 @@ bindAddress: string; |
@@ -6,4 +6,4 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const fs_1 = (0, tslib_1.__importDefault)(require("fs")); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
const url_1 = require("url"); | ||
@@ -21,4 +21,4 @@ const utils_1 = require("./utils"); | ||
_DiagnoseTool_extension.set(this, void 0); | ||
tslib_1.__classPrivateFieldSet(this, _DiagnoseTool_config, this.getConfigObject(), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _DiagnoseTool_extension, new extension_1.Extension(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _DiagnoseTool_config, this.getConfigObject(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _DiagnoseTool_extension, new extension_1.Extension(), "f"); | ||
} | ||
@@ -38,6 +38,6 @@ /** | ||
host: this.getHostData(), | ||
agent: tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_extension, "f").diagnose(), | ||
agent: (0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_extension, "f").diagnose(), | ||
config: { | ||
options: tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_config, "f").data, | ||
sources: tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_config, "f").sources | ||
options: (0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_config, "f").data, | ||
sources: (0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_config, "f").sources | ||
}, | ||
@@ -68,3 +68,3 @@ validation: { push_api_key: pushApiKeyValidation }, | ||
root: (0, utils_1.processGetuid)() === 0, | ||
running_in_container: tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_extension, "f").runningInContainer() | ||
running_in_container: (0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_extension, "f").runningInContainer() | ||
}; | ||
@@ -106,3 +106,3 @@ } | ||
async validatePushApiKey() { | ||
const config = tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_config, "f").data; | ||
const config = (0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_config, "f").data; | ||
const url = new url_1.URL(`/1/auth`, config["endpoint"]); | ||
@@ -131,3 +131,3 @@ const transmitter = new transmitter_1.Transmitter(url.toString()); | ||
const paths = {}; | ||
const logFilePath = tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_config, "f").logFilePath; | ||
const logFilePath = (0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_config, "f").logFilePath; | ||
const pathsToCheck = { | ||
@@ -189,3 +189,3 @@ working_dir: { | ||
getConfigData() { | ||
return this.optionsObject(tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_config, "f").data); | ||
return this.optionsObject((0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_config, "f").data); | ||
} | ||
@@ -242,3 +242,3 @@ /** | ||
getSources() { | ||
return Object.entries(tslib_1.__classPrivateFieldGet(this, _DiagnoseTool_config, "f").sources).reduce((sources, [name, options]) => { | ||
return Object.entries((0, tslib_1.__classPrivateFieldGet)(this, _DiagnoseTool_config, "f").sources).reduce((sources, [name, options]) => { | ||
return { ...sources, [name]: this.optionsObject(options) }; | ||
@@ -245,0 +245,0 @@ }, {}); |
@@ -1,2 +0,2 @@ | ||
type ExtensionWrapper = { | ||
declare type ExtensionWrapper = { | ||
isLoaded: boolean; | ||
@@ -3,0 +3,0 @@ extension: any; |
"use strict"; | ||
const tslib_1 = require("tslib"); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const fs_1 = (0, tslib_1.__importDefault)(require("fs")); | ||
const utils_1 = require("./utils"); | ||
@@ -5,0 +5,0 @@ let mod; |
@@ -57,3 +57,3 @@ "use strict"; | ||
} | ||
exports.Extension = Extension; | ||
Extension.isLoaded = extension_wrapper_1.isLoaded; | ||
exports.Extension = Extension; |
@@ -21,2 +21,2 @@ "use strict"; | ||
Object.defineProperty(exports, "WinstonTransport", { enumerable: true, get: function () { return winston_transport_1.WinstonTransport; } }); | ||
tslib_1.__exportStar(require("./helpers"), exports); | ||
(0, tslib_1.__exportStar)(require("./helpers"), exports); |
@@ -5,3 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const winston_1 = tslib_1.__importDefault(require("winston")); | ||
const winston_1 = (0, tslib_1.__importDefault)(require("winston")); | ||
const { combine, timestamp, printf } = winston_1.default.format; | ||
@@ -8,0 +8,0 @@ class BaseIntegrationLogger { |
import { Client } from "./client"; | ||
export type LoggerLevel = "trace" | "debug" | "info" | "log" | "warn" | "error"; | ||
export type LoggerAttributes = Record<string, string | number | boolean>; | ||
export declare type LoggerLevel = "trace" | "debug" | "info" | "log" | "warn" | "error"; | ||
export declare type LoggerAttributes = Record<string, string | number | boolean>; | ||
export declare const LOGGER_LEVEL_SEVERITY: Record<LoggerLevel, number>; | ||
export type LoggerFormat = "plaintext" | "logfmt" | "json"; | ||
export declare type LoggerFormat = "plaintext" | "logfmt" | "json"; | ||
export declare const LOGGER_FORMAT: Record<LoggerFormat, number>; | ||
@@ -7,0 +7,0 @@ export interface Logger { |
@@ -36,8 +36,8 @@ "use strict"; | ||
} | ||
tslib_1.__classPrivateFieldSet(this, _BaseLogger_client, client, "f"); | ||
tslib_1.__classPrivateFieldSet(this, _BaseLogger_group, group, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _BaseLogger_client, client, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _BaseLogger_group, group, "f"); | ||
this.severityThreshold = severity(level); | ||
this.format = get_format(format); | ||
if (this.severityThreshold == UNKNOWN_SEVERITY) { | ||
tslib_1.__classPrivateFieldGet(this, _BaseLogger_client, "f").integrationLogger.warn(`Logger level must be "trace", "debug", "info", "log", "warn" or "error", ` + | ||
(0, tslib_1.__classPrivateFieldGet)(this, _BaseLogger_client, "f").integrationLogger.warn(`Logger level must be "trace", "debug", "info", "log", "warn" or "error", ` + | ||
`but "${level}" was given. Logger level set to "info".`); | ||
@@ -47,3 +47,3 @@ this.severityThreshold = severity("info"); | ||
if (this.format == UNKNOWN_FORMAT) { | ||
tslib_1.__classPrivateFieldGet(this, _BaseLogger_client, "f").integrationLogger.warn(`Logger format must be "plaintext", "logfmt", or "json", ` + | ||
(0, tslib_1.__classPrivateFieldGet)(this, _BaseLogger_client, "f").integrationLogger.warn(`Logger format must be "plaintext", "logfmt", or "json", ` + | ||
`but "${format}" was given. Logger format set to "plaintext".`); | ||
@@ -75,3 +75,3 @@ this.format = 0; | ||
} | ||
tslib_1.__classPrivateFieldGet(this, _BaseLogger_client, "f").extension.log(tslib_1.__classPrivateFieldGet(this, _BaseLogger_group, "f"), severity, this.format, String(message), attributes); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _BaseLogger_client, "f").extension.log((0, tslib_1.__classPrivateFieldGet)(this, _BaseLogger_group, "f"), severity, this.format, String(message), attributes); | ||
} | ||
@@ -78,0 +78,0 @@ } |
@@ -18,3 +18,3 @@ "use strict"; | ||
const enableMinutelyProbes = global.__APPSIGNAL__.config.data.enableMinutelyProbes; | ||
tslib_1.__classPrivateFieldSet(this, _Metrics_probes, new probes_1.Probes({ run: enableMinutelyProbes }), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Metrics_probes, new probes_1.Probes({ run: enableMinutelyProbes }), "f"); | ||
} | ||
@@ -82,3 +82,3 @@ /** | ||
probes() { | ||
return tslib_1.__classPrivateFieldGet(this, _Metrics_probes, "f"); | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _Metrics_probes, "f"); | ||
} | ||
@@ -85,0 +85,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./metrics"), exports); | ||
tslib_1.__exportStar(require("./integration_logger"), exports); | ||
tslib_1.__exportStar(require("./logger"), exports); | ||
(0, tslib_1.__exportStar)(require("./metrics"), exports); | ||
(0, tslib_1.__exportStar)(require("./integration_logger"), exports); | ||
(0, tslib_1.__exportStar)(require("./logger"), exports); |
@@ -23,3 +23,3 @@ "use strict"; | ||
probes() { | ||
return tslib_1.__classPrivateFieldGet(this, _NoopMetrics_probes, "f"); | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _NoopMetrics_probes, "f"); | ||
} | ||
@@ -26,0 +26,0 @@ } |
@@ -14,3 +14,3 @@ "use strict"; | ||
_Probes_running.set(this, true); | ||
tslib_1.__classPrivateFieldSet(this, _Probes_probes, new BaseProbeRunner(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Probes_probes, new BaseProbeRunner(), "f"); | ||
if (!run) | ||
@@ -20,23 +20,23 @@ this.stop(); | ||
stop() { | ||
tslib_1.__classPrivateFieldGet(this, _Probes_probes, "f").clear(); | ||
tslib_1.__classPrivateFieldSet(this, _Probes_probes, new NoopProbeRunner(), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Probes_running, false, "f"); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _Probes_probes, "f").clear(); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Probes_probes, new NoopProbeRunner(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Probes_running, false, "f"); | ||
return this; | ||
} | ||
get isRunning() { | ||
return tslib_1.__classPrivateFieldGet(this, _Probes_running, "f"); | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _Probes_running, "f"); | ||
} | ||
get count() { | ||
return tslib_1.__classPrivateFieldGet(this, _Probes_probes, "f").count; | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _Probes_probes, "f").count; | ||
} | ||
register(name, fn) { | ||
tslib_1.__classPrivateFieldGet(this, _Probes_probes, "f").register(name, fn); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _Probes_probes, "f").register(name, fn); | ||
return this; | ||
} | ||
unregister(name) { | ||
tslib_1.__classPrivateFieldGet(this, _Probes_probes, "f").unregister(name); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _Probes_probes, "f").unregister(name); | ||
return this; | ||
} | ||
clear() { | ||
tslib_1.__classPrivateFieldGet(this, _Probes_probes, "f").clear(); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _Probes_probes, "f").clear(); | ||
return this; | ||
@@ -56,3 +56,3 @@ } | ||
get count() { | ||
return tslib_1.__classPrivateFieldGet(this, _BaseProbeRunner_timers, "f").size; | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _BaseProbeRunner_timers, "f").size; | ||
} | ||
@@ -64,3 +64,3 @@ /** | ||
register(name, fn) { | ||
tslib_1.__classPrivateFieldGet(this, _BaseProbeRunner_timers, "f").set(name, setInterval(() => this.emit(name), 60 * 1000)); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _BaseProbeRunner_timers, "f").set(name, setInterval(() => this.emit(name), 60 * 1000)); | ||
this.removeAllListeners(name); | ||
@@ -70,6 +70,6 @@ this.on(name, fn); | ||
unregister(name) { | ||
const timer = tslib_1.__classPrivateFieldGet(this, _BaseProbeRunner_timers, "f").get(name); | ||
const timer = (0, tslib_1.__classPrivateFieldGet)(this, _BaseProbeRunner_timers, "f").get(name); | ||
if (typeof timer !== "undefined") { | ||
clearInterval(timer); | ||
tslib_1.__classPrivateFieldGet(this, _BaseProbeRunner_timers, "f").delete(name); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _BaseProbeRunner_timers, "f").delete(name); | ||
this.removeAllListeners(name); | ||
@@ -82,4 +82,4 @@ } | ||
clear() { | ||
tslib_1.__classPrivateFieldGet(this, _BaseProbeRunner_timers, "f").forEach(t => clearInterval(t)); | ||
tslib_1.__classPrivateFieldSet(this, _BaseProbeRunner_timers, new Map(), "f"); | ||
(0, tslib_1.__classPrivateFieldGet)(this, _BaseProbeRunner_timers, "f").forEach(t => clearInterval(t)); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _BaseProbeRunner_timers, new Map(), "f"); | ||
this.removeAllListeners(); | ||
@@ -86,0 +86,0 @@ } |
@@ -5,4 +5,4 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const v8_1 = tslib_1.__importDefault(require("v8")); | ||
const os_1 = tslib_1.__importDefault(require("os")); | ||
const v8_1 = (0, tslib_1.__importDefault)(require("v8")); | ||
const os_1 = (0, tslib_1.__importDefault)(require("os")); | ||
const client_1 = require("../../client"); | ||
@@ -9,0 +9,0 @@ exports.PROBE_NAME = "v8_stats"; |
@@ -6,3 +6,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const fs = tslib_1.__importStar(require("fs")); | ||
const fs = (0, tslib_1.__importStar)(require("fs")); | ||
const api_1 = require("@opentelemetry/api"); | ||
@@ -45,3 +45,3 @@ const core_1 = require("@opentelemetry/core"); | ||
_TestModeSpanProcessor_filePath.set(this, void 0); | ||
tslib_1.__classPrivateFieldSet(this, _TestModeSpanProcessor_filePath, testModeFilePath, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _TestModeSpanProcessor_filePath, testModeFilePath, "f"); | ||
} | ||
@@ -74,3 +74,3 @@ forceFlush() { | ||
// truncated it in between writes. | ||
const file = fs.openSync(tslib_1.__classPrivateFieldGet(this, _TestModeSpanProcessor_filePath, "f"), "a"); | ||
const file = fs.openSync((0, tslib_1.__classPrivateFieldGet)(this, _TestModeSpanProcessor_filePath, "f"), "a"); | ||
fs.appendFileSync(file, `${JSON.stringify(serializableSpan)}\n`); | ||
@@ -77,0 +77,0 @@ fs.closeSync(file); |
@@ -1,2 +0,2 @@ | ||
export type SpanData = { | ||
export declare type SpanData = { | ||
closed?: boolean; | ||
@@ -3,0 +3,0 @@ name?: string; |
@@ -11,6 +11,6 @@ "use strict"; | ||
_Span_ref.set(this, void 0); | ||
tslib_1.__classPrivateFieldSet(this, _Span_ref, ref, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Span_ref, ref, "f"); | ||
} | ||
close() { | ||
extension_wrapper_1.span.closeSpan(tslib_1.__classPrivateFieldGet(this, _Span_ref, "f")); | ||
extension_wrapper_1.span.closeSpan((0, tslib_1.__classPrivateFieldGet)(this, _Span_ref, "f")); | ||
return this; | ||
@@ -20,3 +20,3 @@ } | ||
const parsedStackdata = data_1.Data.generate(stackdata.split("\n")); | ||
extension_wrapper_1.span.addSpanError(tslib_1.__classPrivateFieldGet(this, _Span_ref, "f"), name, message, parsedStackdata); | ||
extension_wrapper_1.span.addSpanError((0, tslib_1.__classPrivateFieldGet)(this, _Span_ref, "f"), name, message, parsedStackdata); | ||
return this; | ||
@@ -30,3 +30,3 @@ } | ||
toObject() { | ||
const json = extension_wrapper_1.span.spanToJSON(tslib_1.__classPrivateFieldGet(this, _Span_ref, "f")); | ||
const json = extension_wrapper_1.span.spanToJSON((0, tslib_1.__classPrivateFieldGet)(this, _Span_ref, "f")); | ||
// If the span JSON is empty, the span has been closed. | ||
@@ -33,0 +33,0 @@ if (json.trim() === "") { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import http from "http"; | ||
import { URLSearchParams } from "url"; | ||
declare const REDIRECT_COUNT: unique symbol; | ||
type TransmitterRequestOptions = { | ||
declare type TransmitterRequestOptions = { | ||
method: string; | ||
@@ -8,0 +7,0 @@ params?: URLSearchParams; |
@@ -6,5 +6,5 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const https_1 = tslib_1.__importDefault(require("https")); | ||
const http_1 = tslib_1.__importDefault(require("http")); | ||
const fs_1 = (0, tslib_1.__importDefault)(require("fs")); | ||
const https_1 = (0, tslib_1.__importDefault)(require("https")); | ||
const http_1 = (0, tslib_1.__importDefault)(require("http")); | ||
const config_1 = require("./config"); | ||
@@ -30,5 +30,5 @@ const url_1 = require("url"); | ||
_Transmitter_body.set(this, void 0); | ||
tslib_1.__classPrivateFieldSet(this, _Transmitter_config, new config_1.Configuration({}), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Transmitter_url, url, "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Transmitter_body, body, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Transmitter_config, new config_1.Configuration({}), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Transmitter_url, url, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Transmitter_body, body, "f"); | ||
} | ||
@@ -124,3 +124,3 @@ downloadStream() { | ||
} | ||
const newTransmitter = new Transmitter(newURL, tslib_1.__classPrivateFieldGet(this, _Transmitter_body, "f")); | ||
const newTransmitter = new Transmitter(newURL, (0, tslib_1.__classPrivateFieldGet)(this, _Transmitter_body, "f")); | ||
newTransmitter.request({ | ||
@@ -154,3 +154,3 @@ method: newMethod, | ||
configParams() { | ||
const config_data = tslib_1.__classPrivateFieldGet(this, _Transmitter_config, "f").data; | ||
const config_data = (0, tslib_1.__classPrivateFieldGet)(this, _Transmitter_config, "f").data; | ||
return new url_1.URLSearchParams({ | ||
@@ -168,7 +168,7 @@ api_key: config_data["pushApiKey"] || "", | ||
if (method == "POST") { | ||
request.write(tslib_1.__classPrivateFieldGet(this, _Transmitter_body, "f")); | ||
request.write((0, tslib_1.__classPrivateFieldGet)(this, _Transmitter_body, "f")); | ||
} | ||
} | ||
urlRequestOptions() { | ||
const requestUrl = new url_1.URL(tslib_1.__classPrivateFieldGet(this, _Transmitter_url, "f")); | ||
const requestUrl = new url_1.URL((0, tslib_1.__classPrivateFieldGet)(this, _Transmitter_url, "f")); | ||
return { | ||
@@ -196,3 +196,3 @@ protocol: requestUrl.protocol, | ||
"Content-Type": "application/json", | ||
"Content-Length": tslib_1.__classPrivateFieldGet(this, _Transmitter_body, "f").length | ||
"Content-Length": (0, tslib_1.__classPrivateFieldGet)(this, _Transmitter_body, "f").length | ||
} | ||
@@ -204,3 +204,3 @@ }; | ||
return {}; | ||
const configData = tslib_1.__classPrivateFieldGet(this, _Transmitter_config, "f").data; | ||
const configData = (0, tslib_1.__classPrivateFieldGet)(this, _Transmitter_config, "f").data; | ||
const caFilePathFromConfig = configData["caFilePath"] || ""; | ||
@@ -207,0 +207,0 @@ try { |
@@ -5,5 +5,5 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const perf_hooks_1 = tslib_1.__importDefault(require("perf_hooks")); | ||
const fs_1 = (0, tslib_1.__importDefault)(require("fs")); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
const perf_hooks_1 = (0, tslib_1.__importDefault)(require("perf_hooks")); | ||
const NANOSECOND_DIGITS = 9; | ||
@@ -10,0 +10,0 @@ const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); |
import Transport, { TransportStreamOptions } from "winston-transport"; | ||
export type WinstonTransportOptions = { | ||
export declare type WinstonTransportOptions = { | ||
group: string; | ||
@@ -4,0 +4,0 @@ } & TransportStreamOptions; |
@@ -6,3 +6,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const winston_transport_1 = tslib_1.__importDefault(require("winston-transport")); | ||
const winston_transport_1 = (0, tslib_1.__importDefault)(require("winston-transport")); | ||
const client_1 = require("./client"); | ||
@@ -46,3 +46,3 @@ const logger_1 = require("./logger"); | ||
} | ||
tslib_1.__classPrivateFieldSet(this, _WinstonTransport_group, group, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _WinstonTransport_group, group, "f"); | ||
} | ||
@@ -64,3 +64,3 @@ log(info, callback) { | ||
} | ||
client.extension.log(group || tslib_1.__classPrivateFieldGet(this, _WinstonTransport_group, "f"), levelSeverity, 0, message, attributes); | ||
client.extension.log(group || (0, tslib_1.__classPrivateFieldGet)(this, _WinstonTransport_group, "f"), levelSeverity, 0, message, attributes); | ||
callback(); | ||
@@ -67,0 +67,0 @@ } |
{ | ||
"name": "@appsignal/nodejs", | ||
"version": "3.0.17", | ||
"version": "3.0.18", | ||
"main": "dist/index", | ||
@@ -5,0 +5,0 @@ "types": "dist/index", |
@@ -6,3 +6,3 @@ // DO NOT EDIT | ||
const AGENT_VERSION = "6bec691" | ||
const AGENT_VERSION = "d789895" | ||
const MIRRORS = [ | ||
@@ -16,3 +16,3 @@ "https://appsignal-agent-releases.global.ssl.fastly.net", | ||
checksum: | ||
"bef6b987040f2d5feb8d4e2d9483bfa89c75b709a1b9a297b4b736643b488c6a", | ||
"8ea76b7d011c728b7988d017a39fc3a432d9c86392e6e46767ecc931e583777a", | ||
filename: "appsignal-x86_64-darwin-all-static.tar.gz" | ||
@@ -22,3 +22,3 @@ }, | ||
checksum: | ||
"bef6b987040f2d5feb8d4e2d9483bfa89c75b709a1b9a297b4b736643b488c6a", | ||
"8ea76b7d011c728b7988d017a39fc3a432d9c86392e6e46767ecc931e583777a", | ||
filename: "appsignal-x86_64-darwin-all-static.tar.gz" | ||
@@ -28,3 +28,3 @@ }, | ||
checksum: | ||
"ff083420f6ac000d2791800ba641ee331ac8757e298939879ea6f35d35eea80b", | ||
"535fed60ac1484e40bbfe77cd4fe9131c67f25e6362a2fe31d987c36ec82ba08", | ||
filename: "appsignal-aarch64-darwin-all-static.tar.gz" | ||
@@ -34,3 +34,3 @@ }, | ||
checksum: | ||
"ff083420f6ac000d2791800ba641ee331ac8757e298939879ea6f35d35eea80b", | ||
"535fed60ac1484e40bbfe77cd4fe9131c67f25e6362a2fe31d987c36ec82ba08", | ||
filename: "appsignal-aarch64-darwin-all-static.tar.gz" | ||
@@ -40,3 +40,3 @@ }, | ||
checksum: | ||
"ff083420f6ac000d2791800ba641ee331ac8757e298939879ea6f35d35eea80b", | ||
"535fed60ac1484e40bbfe77cd4fe9131c67f25e6362a2fe31d987c36ec82ba08", | ||
filename: "appsignal-aarch64-darwin-all-static.tar.gz" | ||
@@ -46,3 +46,3 @@ }, | ||
checksum: | ||
"755e1721befe259d4b13d914020ea7793399c1dc7abdce1e6695128f30e8670d", | ||
"35f96e0adf408fd8ac3e89c6cb3c5506eb4250643199aad3ba298ab131d773c8", | ||
filename: "appsignal-aarch64-linux-all-static.tar.gz" | ||
@@ -52,3 +52,3 @@ }, | ||
checksum: | ||
"2590d6ecb89242849ea7bd0923b074520fcf370c360095d2b25f2ea7a8f8e310", | ||
"f4a1c9a67a0a4cde7e13ef555a6782e5d4f15bfbce9277c2aaf8e248a0fb858e", | ||
filename: "appsignal-i686-linux-all-static.tar.gz" | ||
@@ -58,3 +58,3 @@ }, | ||
checksum: | ||
"2590d6ecb89242849ea7bd0923b074520fcf370c360095d2b25f2ea7a8f8e310", | ||
"f4a1c9a67a0a4cde7e13ef555a6782e5d4f15bfbce9277c2aaf8e248a0fb858e", | ||
filename: "appsignal-i686-linux-all-static.tar.gz" | ||
@@ -64,3 +64,3 @@ }, | ||
checksum: | ||
"54b033f215d84fbe819092a553e4921c77a2f686f9924f336c8312cb9efd1d57", | ||
"016c962727e31a07eee7a221944ff9c4bbb054eada7e87bbe4602233364f380c", | ||
filename: "appsignal-x86_64-linux-all-static.tar.gz" | ||
@@ -70,3 +70,3 @@ }, | ||
checksum: | ||
"3c161e852b44e2f0ad1ccd849150255fc0ce39c3b0895fb003c403de12ced331", | ||
"2ce9e34b283c76c6b25028d3a770a942f4975cd071c586438a8765948237ca42", | ||
filename: "appsignal-x86_64-linux-musl-all-static.tar.gz" | ||
@@ -76,3 +76,3 @@ }, | ||
checksum: | ||
"bed2cb1dc599528ac4bc1939da41900f4651013bc97433f2d1c2e6864acb6b7e", | ||
"017da79e62a2875c0384898c9160cd83acd712faba05154fd8a0627fec1b5ba4", | ||
filename: "appsignal-aarch64-linux-musl-all-static.tar.gz" | ||
@@ -82,3 +82,3 @@ }, | ||
checksum: | ||
"19b885bccb30a4209608ac1ac3ecaf07f1cd8e78c95dbdb94df51f73360c01bb", | ||
"13d27afcb68aff5e164e05fc4fd8874e73f14c0154301f2e6e6e75f67fa9182c", | ||
filename: "appsignal-x86_64-freebsd-all-static.tar.gz" | ||
@@ -88,3 +88,3 @@ }, | ||
checksum: | ||
"19b885bccb30a4209608ac1ac3ecaf07f1cd8e78c95dbdb94df51f73360c01bb", | ||
"13d27afcb68aff5e164e05fc4fd8874e73f14c0154301f2e6e6e75f67fa9182c", | ||
filename: "appsignal-x86_64-freebsd-all-static.tar.gz" | ||
@@ -91,0 +91,0 @@ } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
386313
32
3854