@appsignal/nodejs
Advanced tools
Comparing version 0.1.0-alpha.7 to 0.1.0-alpha.8
@@ -5,2 +5,3 @@ import { Extension } from "./extension"; | ||
import { AppsignalOptions } from "./types/options"; | ||
import { Metrics } from "./metrics"; | ||
/** | ||
@@ -19,2 +20,3 @@ * AppSignal for Node.js's main class. | ||
private _tracer; | ||
private _metrics; | ||
/** | ||
@@ -50,2 +52,16 @@ * Creates a new instance of the `Appsignal` object | ||
tracer(): ITracer; | ||
/** | ||
* Returns the current `Metrics` object. | ||
* | ||
* To track application-wide metrics, you can send custom metrics to AppSignal. | ||
* These metrics enable you to track anything in your application, from newly | ||
* registered users to database disk usage. These are not replacements for custom | ||
* instrumentation, but provide an additional way to make certain data in your | ||
* code more accessible and measurable over time. | ||
* | ||
* With different types of metrics (gauges, counters and measurements) | ||
* you can track any kind of data from your apps and tag them with metadata | ||
* to easily spot the differences between contexts. | ||
*/ | ||
metrics(): Metrics | undefined; | ||
} |
@@ -8,2 +8,3 @@ "use strict"; | ||
const version_1 = require("./version"); | ||
const metrics_1 = require("./metrics"); | ||
/** | ||
@@ -26,2 +27,3 @@ * AppSignal for Node.js's main class. | ||
this._tracer = new tracer_1.Tracer(); | ||
this._metrics = new metrics_1.Metrics(); | ||
this.config = new config_1.Configuration(options); | ||
@@ -80,3 +82,23 @@ this.extension = new extension_1.Extension({ active }); | ||
} | ||
/** | ||
* Returns the current `Metrics` object. | ||
* | ||
* To track application-wide metrics, you can send custom metrics to AppSignal. | ||
* These metrics enable you to track anything in your application, from newly | ||
* registered users to database disk usage. These are not replacements for custom | ||
* instrumentation, but provide an additional way to make certain data in your | ||
* code more accessible and measurable over time. | ||
* | ||
* With different types of metrics (gauges, counters and measurements) | ||
* you can track any kind of data from your apps and tag them with metadata | ||
* to easily spot the differences between contexts. | ||
*/ | ||
metrics() { | ||
if (!this.isActive) { | ||
console.warn("Cannot access the metrics object when the extension is inactive"); | ||
return; | ||
} | ||
return this._metrics; | ||
} | ||
} | ||
exports.Client = Client; |
@@ -6,3 +6,3 @@ "use strict"; | ||
// should not be visible publicly. | ||
const { extension } = require("../build/Release/binding.node"); | ||
const { extension } = require("../build/Release/extension.node"); | ||
/** | ||
@@ -9,0 +9,0 @@ * The public interface for the extension. |
@@ -6,3 +6,3 @@ "use strict"; | ||
// should not be visible publicly. | ||
const { dataarray } = require("../../build/Release/binding.node"); | ||
const { dataarray } = require("../../build/Release/extension.node"); | ||
class DataArray { | ||
@@ -9,0 +9,0 @@ constructor(data) { |
@@ -6,3 +6,3 @@ "use strict"; | ||
// should not be visible publicly. | ||
const { datamap } = require("../../build/Release/binding.node"); | ||
const { datamap } = require("../../build/Release/extension.node"); | ||
class DataMap { | ||
@@ -9,0 +9,0 @@ constructor(data) { |
@@ -6,3 +6,3 @@ "use strict"; | ||
// should not be visible publicly. | ||
const { span } = require("../build/Release/binding.node"); | ||
const { span } = require("../build/Release/extension.node"); | ||
const internal_1 = require("./internal"); | ||
@@ -9,0 +9,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "0.1.0-alpha.7"; | ||
export declare const VERSION = "0.1.0-alpha.8"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// Do not touch this file, auto-generated by scripts/create-versionfile | ||
exports.VERSION = "0.1.0-alpha.7"; | ||
exports.VERSION = "0.1.0-alpha.8"; |
{ | ||
"name": "@appsignal/nodejs", | ||
"version": "0.1.0-alpha.7", | ||
"version": "0.1.0-alpha.8", | ||
"main": "dist/index.js", | ||
@@ -20,4 +20,4 @@ "license": "MIT", | ||
"versionfile": "node scripts/create-versionfile.js", | ||
"postversion": "yarn versionfile", | ||
"install": "node scripts/extension.js && yarn build:ext" | ||
"version": "yarn versionfile", | ||
"install": "node scripts/extension.js && node-gyp rebuild" | ||
}, | ||
@@ -27,3 +27,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "45661e1f4726bff384ae9d2f2b5853ced6dd577c" | ||
"gitHead": "e9464fef181d0c094860cd830a683c74fdb10ef0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
76594
52
1576
0