Skip to content

Commit

Permalink
add types SenderConfig (#919)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Wolff authored Jun 6, 2019
1 parent d11ac6d commit bbf195e
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions vNext/channels/applicationinsights-channel-js/src/Sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,20 +438,19 @@ export class Sender implements IChannelControlsAI {
}

private static _getDefaultAppInsightsChannelConfig(): ISenderConfig {
let resultConfig = <ISenderConfig>{};

// set default values
resultConfig.endpointUrl = () => "https://dc.services.visualstudio.com/v2/track";
resultConfig.emitLineDelimitedJson = () => false;
resultConfig.maxBatchInterval = () => 15000;
resultConfig.maxBatchSizeInBytes = () => 102400; // 100kb
resultConfig.disableTelemetry = () => false;
resultConfig.enableSessionStorageBuffer = () => true;
resultConfig.isRetryDisabled = () => false;
resultConfig.isBeaconApiDisabled = () => true;
resultConfig.instrumentationKey = () => undefined; // Channel doesn't need iKey, it should be set already

return resultConfig;
return {
endpointUrl: () =>"https://dc.services.visualstudio.com/v2/track",
emitLineDelimitedJson: () => false,
maxBatchInterval: () => 15000,
maxBatchSizeInBytes: () => 102400, // 100kb
disableTelemetry: () => false,
enableSessionStorageBuffer: () => true,
isRetryDisabled: () => false,
isBeaconApiDisabled: () => true,
instrumentationKey: () => undefined, // Channel doesn't need iKey, it should be set already
namePrefix: () => undefined
}
}

private static _getEmptyAppInsightsChannelConfig(): ISenderConfig {
Expand Down

0 comments on commit bbf195e

Please sign in to comment.