mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
NewRelic functions addCustomAttribute and addCustomAttributes takes strings and numbers (#29767)
* AddCustomAttribute takes a string or a number * Added Brooks Patton to contributors for New Relic * Bumped minor version
This commit is contained in:
committed by
Sheetal Nandi
parent
07562f364d
commit
05acb13921
Vendored
+4
-3
@@ -1,6 +1,7 @@
|
||||
// Type definitions for newrelic 3.3
|
||||
// Type definitions for newrelic 3.4
|
||||
// Project: http://github.com/newrelic/node-newrelic
|
||||
// Definitions by: Matt R. Wilson <https://github.com/mastermatt>
|
||||
// Brooks Patton <https://github.com/brookspatton>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// https://docs.newrelic.com/docs/agents/nodejs-agent/api-guides/nodejs-agent-api
|
||||
@@ -64,14 +65,14 @@ export function setControllerName(name: string, action: string): void;
|
||||
*
|
||||
* Most recently set value wins.
|
||||
*/
|
||||
export function addCustomAttribute(key: string, value: string): void;
|
||||
export function addCustomAttribute(key: string, value: string|number): void;
|
||||
|
||||
/**
|
||||
* Adds all custom attributes in an object to the current transaction.
|
||||
*
|
||||
* See documentation for `addCustomAttribute` for more information on setting custom attributes.
|
||||
*/
|
||||
export function addCustomAttributes(atts: { [key: string]: string }): void;
|
||||
export function addCustomAttributes(atts: { [key: string]: string|number }): void;
|
||||
|
||||
/**
|
||||
* Tell the tracer whether to ignore the current transaction.
|
||||
|
||||
@@ -14,7 +14,9 @@ newrelic.setDispatcher("foo", "42"); // $ExpectType void
|
||||
newrelic.setControllerName("foo", "GET"); // $ExpectType void
|
||||
|
||||
newrelic.addCustomAttribute("foo", "bar"); // $ExpectType void
|
||||
newrelic.addCustomAttribute("foo", 42); // $ExpectType void
|
||||
newrelic.addCustomAttributes({ foo: "bar", baz: "bang" }); // $ExpectType void
|
||||
newrelic.addCustomAttributes({ foo: "bar", baz: 42 }); // $ExpectType void
|
||||
|
||||
newrelic.setIgnoreTransaction(true); // $ExpectType void
|
||||
|
||||
|
||||
Reference in New Issue
Block a user