@types/newrelic
Advanced tools
Comparing version 2.7.0 to 3.3.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for newrelic 2.7 | ||
// Type definitions for newrelic 3.3 | ||
// Project: http://github.com/newrelic/node-newrelic | ||
@@ -151,2 +151,19 @@ // Definitions by: Matt R. Wilson <https://github.com/mastermatt> | ||
/** | ||
* Instrument a particular method to improve visibility into a transaction, | ||
* or optionally turn it into a metric. | ||
* | ||
* The name defines a name for the segment. This name will be visible in transaction traces and | ||
* as a new metric in the New Relic UI. | ||
* The record flag defines whether the segment should be recorded as a metric. | ||
* The handler is the function you want to track as a segment. | ||
* The optional callback is a function passed to the handler to fire after its work is done. | ||
* | ||
* The agent begins timing the segment when startSegment is called. | ||
* The segment is ended when either the handler finishes executing, or callback is fired, if it is provided. | ||
* If a promise is returned from the handler, the segment's ending will be tied to that promise resolving or rejecting. | ||
*/ | ||
startSegment<T extends PromiseLike<any>>(name: string, record: boolean, handler: T): T; | ||
startSegment<T, C extends (...args: any[]) => any>(name: string, record: boolean, handler: (cb?: C) => T, callback?: C): T; | ||
/** | ||
* Instrument a particular callback to improve visibility into a transaction. | ||
@@ -161,2 +178,5 @@ * | ||
* defined by the callback argument finishes executing. | ||
* | ||
* @deprecated | ||
* This method has been deprecated in favor of newrelic.startSegment() | ||
*/ | ||
@@ -163,0 +183,0 @@ createTracer<T extends (...args: any[]) => any>(name: string, handle: T): T; |
{ | ||
"name": "@types/newrelic", | ||
"version": "2.7.0", | ||
"version": "3.3.0", | ||
"description": "TypeScript definitions for newrelic", | ||
@@ -20,4 +20,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "6f36bb4585456e5f43df16ce03fef073d2670b2bd835c62de2c388182e5951a8", | ||
"typesPublisherContentHash": "e7c8133f462161156295cf87ef06eff202c96f1d4e5ca6b3185e0787a346c38c", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Tue, 13 Feb 2018 20:54:40 GMT | ||
* Last updated: Thu, 29 Mar 2018 22:41:31 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
Sorry, the diff of this file is not supported yet
19019
323