Skip to content

Commit

Permalink
add disableIkeyMessage config (#1840)
Browse files Browse the repository at this point in the history
* add disableIkeyMessage config

* rename
  • Loading branch information
Karlie-777 authored May 19, 2022
1 parent 3f8a64d commit 9977cd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AISKU/src/Initialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class Initialization implements IApplicationInsights {
_self.core = _core;


if (!config.connectionString) {
if (!config.connectionString && !config.disableIkeyDeprecationMessage) {
_throwInternal(_core.logger,
eLoggingSeverity.CRITICAL,
_eInternalMessageId.InstrumentationKeyDeprecation,
Expand Down
5 changes: 5 additions & 0 deletions shared/AppInsightsCommon/src/Interfaces/IConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@ export interface IConfig {
* [Optional] The number of events that can be kept in memory before the SDK starts to drop events. By default, this is 10,000.
*/
eventsLimitInMem?: number;
/**
* [Optional] Disable iKey deprecation error message.
* @defaultValue true
*/
disableIkeyDeprecationMessage?: boolean;
}

export class ConfigurationManager {
Expand Down

0 comments on commit 9977cd7

Please sign in to comment.