Skip to content

Commit c770370

Browse files
committed
update application insights to 0.15.7
1 parent 001ca36 commit c770370

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

applicationinsights/applicationinsights-tests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ appInsights.client.trackEvent("custom event", {customProperty: "custom property
1818
appInsights.client.trackException(new Error("handled exceptions can be logged with this method"));
1919
appInsights.client.trackMetric("custom metric", 3);
2020
appInsights.client.trackTrace("trace message");
21+
appInsights.client.trackDependency("dependency name", "commandName", 500, true);
2122

2223
// assign common properties to all telemetry
2324
appInsights.client.commonProperties = {

applicationinsights/applicationinsights.d.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Application Insights v0.15.1
1+
// Type definitions for Application Insights v0.15.7
22
// Project: https://github.com/Microsoft/ApplicationInsights-node.js
33
// Definitions by: Scott Southwood <https://github.com/scsouthw/>
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -342,6 +342,19 @@ interface Client {
342342
trackRequest(request: any /* http.ServerRequest */, response: any /* http.ServerResponse */, properties?: {
343343
[key: string]: string;
344344
}): void;
345+
/**
346+
* Log information about a dependency of your app. Typically used to track the time database calls or outgoing http requests take from your server.
347+
* @param name The name of the dependency (i.e. "myDatabse")
348+
* @param commandname The name of the command executed on the dependency
349+
* @param elapsedTimeMs The amount of time in ms that the dependency took to return the result
350+
* @param success True if the dependency succeeded, false otherwise
351+
* @param dependencyTypeName The type of the dependency (i.e. "SQL" "HTTP"). Defaults to empty.
352+
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
353+
* @param dependencyKind ContractsModule.DependencyKind of this dependency. Defaults to Other.
354+
* @param async True if the dependency was executed asynchronously, false otherwise. Defaults to false
355+
* @param dependencySource ContractsModule.DependencySourceType of this dependency. Defaults to Undefined.
356+
*/
357+
trackDependency(name: string, commandName: string, elapsedTimeMs: number, success: boolean, dependencyTypeName?: string, properties?: {}, dependencyKind?: any, async?: boolean, dependencySource?: number): void;
345358
/**
346359
* Immediately send all queued telemetry.
347360
*/

0 commit comments

Comments
 (0)