@types/newrelic
Advanced tools
Comparing version 6.4.1 to 6.13.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for newrelic 6.4 | ||
// Type definitions for newrelic 6.13 | ||
// Project: http://github.com/newrelic/node-newrelic | ||
@@ -392,2 +392,4 @@ // Definitions by: Matt R. Wilson <https://github.com/mastermatt> | ||
export type DistributedTraceHeaders = Record<string, number | string | string[] | undefined>; | ||
export interface TransactionHandle { | ||
@@ -405,3 +407,22 @@ /** | ||
/** | ||
* Modifies the headers map that is passed in by adding W3C Trace Context headers | ||
* and New Relic Distributed Trace headers. | ||
*/ | ||
insertDistributedTraceHeaders(headers: DistributedTraceHeaders): void; | ||
/** | ||
* Used to instrument the called service for inclusion in a distributed trace. | ||
* | ||
* Links the spans in a trace by accepting a payload generated by `insertDistributedTraceHeaders` | ||
* or generated by some other W3C Trace Context compliant tracer. This method accepts the headers | ||
* of an incoming request, looks for W3C Trace Context headers, and if not found, falls back to | ||
* New Relic distributed trace headers. | ||
* | ||
* Check the docs for valid transport types. If an invalid type is provided, it will fall back to "Unknown". | ||
*/ | ||
acceptDistributedTraceHeaders(transportType: string, headers: DistributedTraceHeaders): void; | ||
/** | ||
* Creates a distributed trace payload. | ||
* @deprecated - use insertDistributedTraceHeaders instead | ||
*/ | ||
@@ -412,2 +433,3 @@ createDistributedTracePayload(): DistributedTracePayload; | ||
* Parses incoming distributed trace header payload. | ||
* @deprecated - use acceptDistributedTraceHeaders instead | ||
*/ | ||
@@ -417,7 +439,5 @@ acceptDistributedTracePayload(payload: DistributedTracePayload): void; | ||
/** | ||
* Inserts distributed trace headers into the provided headers map. | ||
* Return whether this Transaction is being sampled | ||
*/ | ||
insertDistributedTraceHeaders(headers: { | ||
[header: string]: number | string | string[] | undefined; | ||
}): void; | ||
isSampled(): boolean; | ||
} | ||
@@ -424,0 +444,0 @@ |
{ | ||
"name": "@types/newrelic", | ||
"version": "6.4.1", | ||
"version": "6.13.0", | ||
"description": "TypeScript definitions for newrelic", | ||
@@ -57,4 +57,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "3e90b7e112851a5183b7339fde56f2648c13b8cd56da2571a4e907ecc1bd620c", | ||
"typesPublisherContentHash": "53e43d301dbd2a0906c51fc68d6ac8ba34bfc700ba43858d7319cf9fcdff97f0", | ||
"typeScriptVersion": "3.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sat, 26 Sep 2020 03:54:06 GMT | ||
* Last updated: Fri, 30 Oct 2020 02:51:55 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
22771
438