applicationinsights
Version:
Microsoft Application Insights module for Node.js
24 lines (23 loc) • 1.46 kB
TypeScript
import { Contracts, TelemetryClient } from "./applicationinsights";
declare class NodeClient extends TelemetryClient {
/**
* Log RequestTelemetry from HTTP request and response. This method will log immediately without waiting for request completion
* and it requires duration parameter to be specified on NodeHttpRequestTelemetry object.
* Use trackNodeHttpRequest function to log the telemetry after request completion
* @param telemetry Object encapsulating incoming request, response and duration information
*/
trackNodeHttpRequestSync(telemetry: Contracts.NodeHttpRequestTelemetry): void;
/**
* Log RequestTelemetry from HTTP request and response. This method will `follow` the request to completion.
* Use trackNodeHttpRequestSync function to log telemetry immediately without waiting for request completion
* @param telemetry Object encapsulating incoming request and response information
*/
trackNodeHttpRequest(telemetry: Contracts.NodeHttpRequestTelemetry): void;
/**
* Log DependencyTelemetry from outgoing HTTP request. This method will instrument the outgoing request and append
* the specified headers and will log the telemetry when outgoing request is complete
* @param telemetry Object encapsulating outgoing request information
*/
trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry): void;
}
export = NodeClient;