mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
update ApplicationInsights to 0.15.12
This commit is contained in:
+21
-27
@@ -1,7 +1,7 @@
|
||||
// Type definitions for Application Insights v0.15.7
|
||||
// Type definitions for Application Insights v0.15.12
|
||||
// Project: https://github.com/Microsoft/ApplicationInsights-node.js
|
||||
// Definitions by: Scott Southwood <https://github.com/scsouthw/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface AutoCollectConsole {
|
||||
constructor(client: Client): AutoCollectConsole;
|
||||
@@ -28,7 +28,7 @@ interface AutoCollectRequests {
|
||||
}
|
||||
|
||||
|
||||
declare module ContractsModule {
|
||||
declare namespace ContractsModule {
|
||||
enum DataPointType {
|
||||
Measurement = 0,
|
||||
Aggregation = 1,
|
||||
@@ -338,7 +338,9 @@ interface Client {
|
||||
* @param max the max sample for this set
|
||||
* @param stdDev the standard deviation of the set
|
||||
*/
|
||||
trackMetric(name: string, value: number, count?:number, min?: number, max?: number, stdDev?: number): void;
|
||||
trackMetric(name: string, value: number, count?:number, min?: number, max?: number, stdDev?: number, properties?: {
|
||||
[key: string]: string;
|
||||
}): void;
|
||||
trackRequest(request: any /* http.ServerRequest */, response: any /* http.ServerResponse */, properties?: {
|
||||
[key: string]: string;
|
||||
}): void;
|
||||
@@ -352,13 +354,13 @@ interface Client {
|
||||
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
|
||||
* @param dependencyKind ContractsModule.DependencyKind of this dependency. Defaults to Other.
|
||||
* @param async True if the dependency was executed asynchronously, false otherwise. Defaults to false
|
||||
* @param dependencySource ContractsModule.DependencySourceType of this dependency. Defaults to Undefined.
|
||||
* @param dependencySource ContractsModule.DependencySourceType of this dependency. Defaults to Undefined.
|
||||
*/
|
||||
trackDependency(name: string, commandName: string, elapsedTimeMs: number, success: boolean, dependencyTypeName?: string, properties?: {}, dependencyKind?: any, async?: boolean, dependencySource?: number): void;
|
||||
/**
|
||||
* 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;
|
||||
@@ -409,66 +411,58 @@ interface Sender {
|
||||
* The singleton meta interface for the default client of the client. This interface is used to setup/start and configure
|
||||
* the auto-collection behavior of the application insights module.
|
||||
*/
|
||||
declare class ApplicationInsights {
|
||||
static client: Client;
|
||||
private static _isConsole;
|
||||
private static _isExceptions;
|
||||
private static _isPerformance;
|
||||
private static _isRequests;
|
||||
private static _console;
|
||||
private static _exceptions;
|
||||
private static _performance;
|
||||
private static _requests;
|
||||
private static _isStarted;
|
||||
interface ApplicationInsights {
|
||||
client: Client;
|
||||
/**
|
||||
* Initializes a client with the given instrumentation key, if this is not specified, the value will be
|
||||
* read from the environment variable APPINSIGHTS_INSTRUMENTATIONKEY
|
||||
* @returns {ApplicationInsights/Client} a new client
|
||||
*/
|
||||
static getClient(instrumentationKey?: string): Client;
|
||||
getClient(instrumentationKey?: string): Client;
|
||||
/**
|
||||
* Initializes the default client of the client and sets the default configuration
|
||||
* @param instrumentationKey the instrumentation key to use. Optional, if this is not specified, the value will be
|
||||
* read from the environment variable APPINSIGHTS_INSTRUMENTATIONKEY
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setup(instrumentationKey?: string): typeof ApplicationInsights;
|
||||
setup(instrumentationKey?: string): ApplicationInsights;
|
||||
/**
|
||||
* Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static start(): typeof ApplicationInsights;
|
||||
start(): ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of console tracking (enabled by default)
|
||||
* @param value if true console activity will be sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectConsole(value: boolean): typeof ApplicationInsights;
|
||||
setAutoCollectConsole(value: boolean): ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of exception tracking (enabled by default)
|
||||
* @param value if true uncaught exceptions will be sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectExceptions(value: boolean): typeof ApplicationInsights;
|
||||
setAutoCollectExceptions(value: boolean): ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of performance tracking (enabled by default)
|
||||
* @param value if true performance counters will be collected every second and sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectPerformance(value: boolean): typeof ApplicationInsights;
|
||||
setAutoCollectPerformance(value: boolean): ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of request tracking (enabled by default)
|
||||
* @param value if true requests will be sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectRequests(value: boolean): typeof ApplicationInsights;
|
||||
setAutoCollectRequests(value: boolean): ApplicationInsights;
|
||||
/**
|
||||
* Enables verbose debug logging
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static enableVerboseLogging(): typeof ApplicationInsights;
|
||||
enableVerboseLogging(): ApplicationInsights;
|
||||
}
|
||||
|
||||
declare module "applicationinsights" {
|
||||
export = ApplicationInsights;
|
||||
}
|
||||
const applicationinsights: ApplicationInsights;
|
||||
export = applicationinsights;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user