Merge pull request #7498 from seanzer/master

Add callback parameter to sendPendingData method def'n
This commit is contained in:
Horiuchi_H
2016-01-06 12:48:19 +09:00
2 changed files with 7 additions and 2 deletions

View File

@@ -24,3 +24,8 @@ appInsights.client.trackDependency("dependency name", "commandName", 500, true);
appInsights.client.commonProperties = {
environment: "dev"
};
// send any pending data and log the response
appInsights.client.sendPendingData(function (response) {
console.log(response);
});

View File

@@ -1,4 +1,4 @@
// Type definitions for Application Insights v0.15.7
// Type definitions for Application Insights v0.15.8
// Project: https://github.com/Microsoft/ApplicationInsights-node.js
// Definitions by: Scott Southwood <https://github.com/scsouthw/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -358,7 +358,7 @@ interface Client {
/**
* Immediately send all queued telemetry.
*/
sendPendingData(): void;
sendPendingData(callback?: (response: string) => void): void;
getEnvelope(data: ContractsModule.Data<ContractsModule.Domain>, tagOverrides?: {
[key: string]: string;
}): ContractsModule.Envelope;