New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beta Part 4: Part of Mega Dynamic Load/Unload support #1781
Conversation
MSNev
commented
Mar 12, 2022
- Fix function typing issues
- Update Analytics Extension to start supporting teardown / unload (more tests required)
- Adds namespace option to instrumentation hooks (for debugging teardown issues)
- Update AITest Class to log and optionally assert events and hooks that have not been removed
- Add Update callback when plugins are added / removed (will be extended for config updates)
- Some minor minification improvements
- Fix function typing issues - Update Analytics Extension to start supporting teardown / unload (more tests required) - Adds namespace option to instrumentation hooks (for debugging teardown issues) - Update AITest Class to log and optionally assert events and hooks that have not been removed - Add Update callback when plugins are added / removed (will be extended for config updates) - Some minor minification improvements
@@ -2,7 +2,7 @@ import { AITestClass, Assert } from "@microsoft/ai-test-framework"; | |||
import * as pako from "pako"; | |||
|
|||
export class AISKUSizeCheck extends AITestClass { | |||
private readonly MAX_DEFLATE_SIZE = 43; | |||
private readonly MAX_DEFLATE_SIZE = 44; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to have to spend some additional time once all of the code is merged, I already have some changes to help with the size but they are quite significant in the number of changes for a review -- so delaying for now and just incrementing the current minimum.
import { getWindow, getDocument, getNavigator, isUndefined, isNullOrUndefined, attachEvent } from "@microsoft/applicationinsights-core-js"; | ||
import dynamicProto from "@microsoft/dynamicproto-js"; | ||
import { getWindow, getDocument, getNavigator, isUndefined, isNullOrUndefined, createUniqueNamespace, mergeEvtNamespace, eventOn, eventOff } from "@microsoft/applicationinsights-core-js"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactoring here is mostly just removing the internal Offline class (for minufication purposes), the functionality does not change.
@@ -204,7 +172,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI { | |||
try { | |||
_self.triggerSend(isAsync, null, sendReason || SendRequestReason.ManualFlush); | |||
} catch (e) { | |||
_self.diagLog().throwInternal(LoggingSeverity.CRITICAL, | |||
_throwInternal(_self.diagLog(),LoggingSeverity.CRITICAL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a new helper (introduced for minification purposes)
|
||
} | ||
} | ||
export function createOfflineListener(parentEvtNamespace?: string | string[]): IOfflineListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event namespace is part of the changes for unload support, so the events are tagged with the current instance.
} | ||
|
||
function _disableEvents(target: any, evtNamespace: string | string[]) { | ||
eventOff(target, null, null, evtNamespace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will remove ALL of the events on the target object that match the provided namespace.
So both the online
and offline
will be removed by this single call.
@@ -467,11 +435,17 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI { | |||
} | |||
}; | |||
|
|||
_self._doTeardown = (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the full teardown support for the Sender -- more testing required though as I haven't updated the sender tests yet to check and fail for unremoved events, hooks etc.
@@ -1051,6 +1025,25 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI { | |||
return regexp.test(config.instrumentationKey); | |||
} | |||
|
|||
function _initDefaults() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Called during construction and teardown.
@@ -24,6 +24,37 @@ function _getObjName(target:any, unknownValue?:string) { | |||
return (((target || {})["constructor"]) || {}).name || unknownValue || ""; | |||
} | |||
|
|||
function _getAllAiDataKeys<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Base test class updates which will be used validate and remove any registered events, hooks etc.
@@ -162,6 +193,14 @@ export class AITestClass { | |||
let stepIndex = 0; | |||
|
|||
const testDone = () => { | |||
if (testInfo.assertNoEvents) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New switches (currently false by default) which will automatically fail any test (when true) if any event, hook has not been removed after the test completes.
} | ||
} | ||
|
||
protected _assertHooksRemoved() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the current set of objects that will be validated -- these will grow as we find plugins that are adding hooks.
@@ -683,6 +731,32 @@ export class AITestClass { | |||
} | |||
} | |||
|
|||
protected _assertEventsRemoved() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the current set of objects that will be validated -- these will grow as we find plugins that are adding events.
@@ -53,55 +57,86 @@ function _getReason(error: any) { | |||
return error || ""; | |||
} | |||
|
|||
export class ApplicationInsights extends BaseTelemetryPlugin implements IAppInsights, IAppInsightsInternal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to AnalyticsPlugin to reduce the number of issue about having multiple "ApplicationInsights" classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a list of all breaking changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but this one is not actually a breaking change as I re-export as the original name as well.
public identifier: string = AnalyticsPluginIdentifier; // do not change name or priority | ||
public priority: number = 180; // take from reserved priority range 100- 200 | ||
public config: IConfig; | ||
public queue: Array<() => void>; | ||
public autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place | ||
|
||
protected _telemetryInitializers: Array<(envelope: ITelemetryItem) => boolean | void>; // Internal telemetry initializers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While "protected" these are being further "hidden" in the constructor closure to stop them being used when they shouldn't.
The will however, still be exposed (available) on the final instances -- just not included in the definition *.d.ts
|
||
_self.getCookieMgr = () => { | ||
return safeGetCookieMgr(_self.core); | ||
}; | ||
|
||
_self.processTelemetry = (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => { | ||
doPerf(_self.core, () => _self.identifier + ":processTelemetry", () => { | ||
let doNotSendItem = false; | ||
const telemetryInitializersCount = _self._telemetryInitializers.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the telemetry initializers are now provided by Base Core
} | ||
|
||
// Handle "pre-initialization" telemetry initializers (for backward compatibility) | ||
if (!_preInitTelemetryInitializers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for backward compatibility so that any calls to addTelemetryInitializer
will still be registered against the core when the plugin is initialized.
_self.config[field] = ctx.getConfig(identifier, field, value); | ||
if (_self.config[field] === undefined) { | ||
_self.config[field] = value; | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of refactoring to extract out the code that "initializes" the config as this will be reused when the update configuration changes are added.
function _sendCORSException(exception: IAutoExceptionTelemetry, properties?: ICustomProperties) { | ||
const telemetryItem: ITelemetryItem = TelemetryItemCreator.create<IAutoExceptionTelemetry>( | ||
let telemetryItem: ITelemetryItem = TelemetryItemCreator.create<IAutoExceptionTelemetry>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: changing to let as some frameworks that use es6 will freeze any objects defined as const
} | ||
|
||
if (!_historyListenerAdded) { | ||
_addHook(InstrumentFunc(history, "pushState", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_addHook
is a helper that BaseTelemetryPlugin has to automatically remove during the default teardown
implementation.
_addHook(InstrumentFunc(history, "pushState", { | ||
ns: _evtNamespace, | ||
rsp: () => { | ||
if (_enableAutoRouteTracking) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is specifically to support configuration changes where it might have been initialized with the event handling enabled but disabled later. Rather than removing the hooks, this just stops the hook code form running.
/** | ||
* Used to record timed events and page views. | ||
*/ | ||
class Timing { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to it's own file.
@@ -1,5 +1,5 @@ | |||
// Copyright (c) Microsoft Corporation. All rights reserved. | |||
// Licensed under the MIT License. | |||
|
|||
export { ApplicationInsights } from "./JavaScriptSDK/ApplicationInsights"; | |||
export { AnalyticsPlugin, AnalyticsPlugin as ApplicationInsights } from "./JavaScriptSDK/AnalyticsPlugin"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exporting with both the new and old names (for backward compatibility) -- internal extensions will be changed to use the new name.
/** | ||
* The configuration has ben updated or changed | ||
*/ | ||
//ConfigurationChanged = 0x01, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly commenting out to ensure that I didn't include this portion of the code at this time.
shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts
Outdated
Show resolved
Hide resolved
channels/applicationinsights-channel-js/Tests/Unit/src/Sender.tests.ts
Outdated
Show resolved
Hide resolved
@@ -43,7 +43,7 @@ export class AnalyticsExtensionSizeCheck extends AITestClass { | |||
return; | |||
} else { | |||
return response.text().then(text => { | |||
let size = Math.ceil(pako.deflate(text).length/1024); | |||
let size = Math.ceil((pako.deflate(text).length/1024) * 100) / 100.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used to change the format of the number? weird to multiply and divide by the same number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is for formatting the output number only so we get it at most for 2 decimal places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ster (#1791) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) (#1757) * Merge [master] branch to [beta] and Enable GitHub Actions on [beta] branch (#1762) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Enable GitHub Actions on [beta] branch * Beta Part 1: Part of Mega Dynamic Load/Unload support (#1766) - Refactor TelemetryPluginChain ready to start supporting load/unload - Move TelemetryInitializer to BaseCore - add getPlugin (will be used for remove) - Address Channel flush issue * Merge remote-tracking branch 'upstream/master' into beta (#1772) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Update version.json (#1767) * [Release] Increase version to 2.7.4 (#1770) - Updates React Plugin to v3.2.4 (with v2.7.4 as dependency) - Updates React Native Plugin to 2.4.4 (with v2.7.4 as dependency) - Updates Chrome Debug Extension to 0.2.4 This release is primarily a performance improvement release where we will now use any built in (or provided polyfill) function over the internal polyfills for - String trim() - String endsWith() - String startsWith() - Additional Date toISOString() - Array isArray() - Array indexOf() - Array map() - Array reduce() - Object freeze() - Object seal() * [Beta] Keep version.json next as minor and resync shrinkwrap - Fix merge issue * Beta Part 2: Part of Mega Dynamic Load/Unload support (#1768) - Add Event Namespace support - Minification of constant values - Add part of the unload functionality (required for unified `teardown()` functionality) * Beta Part 3: Part of Mega Dynamic Load/Unload support (#1780) * Beta Part 3: Part of Mega Dynamic Load/Unload support - Add Core SDK Unload support * Fix telemetry chain for null and undefined * Beta Part 4: Part of Mega Dynamic Load/Unload support (#1781) * Beta Part 4: Part of Mega Dynamic Load/Unload support - Fix function typing issues - Update Analytics Extension to start supporting teardown / unload (more tests required) - Adds namespace option to instrumentation hooks (for debugging teardown issues) - Update AITest Class to log and optionally assert events and hooks that have not been removed - Add Update callback when plugins are added / removed (will be extended for config updates) - Some minor minification improvements * Update comments * Add missing enum definition * Update Sender tests * Beta Part 5: Part of Mega Dynamic Load/Unload support (#1782) - Add Missing Exports - AnalyticsPlugin: Implement teardown and initial test validation - Dependencies Plugin: Implement teardown and initial test validation - Add flush() to IAppInsightsCore * AI Beta: Minor bug fixes and additional debug info (#1787) * Lint fixes: Enable Automatic formatting fixes (#1788) * Beta Part 6: Part of Mega Dynamic Load/Unload support (#1782) (#1789) - Add basic minimal unload / teardown support to all remaining components - Update rollup cleanup dependencies * Beta: Component Governance Updates to address known dependency issues (#1790)
…ster (#1791) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) (#1757) * Merge [master] branch to [beta] and Enable GitHub Actions on [beta] branch (#1762) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Enable GitHub Actions on [beta] branch * Beta Part 1: Part of Mega Dynamic Load/Unload support (#1766) - Refactor TelemetryPluginChain ready to start supporting load/unload - Move TelemetryInitializer to BaseCore - add getPlugin (will be used for remove) - Address Channel flush issue * Merge remote-tracking branch 'upstream/master' into beta (#1772) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Update version.json (#1767) * [Release] Increase version to 2.7.4 (#1770) - Updates React Plugin to v3.2.4 (with v2.7.4 as dependency) - Updates React Native Plugin to 2.4.4 (with v2.7.4 as dependency) - Updates Chrome Debug Extension to 0.2.4 This release is primarily a performance improvement release where we will now use any built in (or provided polyfill) function over the internal polyfills for - String trim() - String endsWith() - String startsWith() - Additional Date toISOString() - Array isArray() - Array indexOf() - Array map() - Array reduce() - Object freeze() - Object seal() * [Beta] Keep version.json next as minor and resync shrinkwrap - Fix merge issue * Beta Part 2: Part of Mega Dynamic Load/Unload support (#1768) - Add Event Namespace support - Minification of constant values - Add part of the unload functionality (required for unified `teardown()` functionality) * Beta Part 3: Part of Mega Dynamic Load/Unload support (#1780) * Beta Part 3: Part of Mega Dynamic Load/Unload support - Add Core SDK Unload support * Fix telemetry chain for null and undefined * Beta Part 4: Part of Mega Dynamic Load/Unload support (#1781) * Beta Part 4: Part of Mega Dynamic Load/Unload support - Fix function typing issues - Update Analytics Extension to start supporting teardown / unload (more tests required) - Adds namespace option to instrumentation hooks (for debugging teardown issues) - Update AITest Class to log and optionally assert events and hooks that have not been removed - Add Update callback when plugins are added / removed (will be extended for config updates) - Some minor minification improvements * Update comments * Add missing enum definition * Update Sender tests * Beta Part 5: Part of Mega Dynamic Load/Unload support (#1782) - Add Missing Exports - AnalyticsPlugin: Implement teardown and initial test validation - Dependencies Plugin: Implement teardown and initial test validation - Add flush() to IAppInsightsCore * AI Beta: Minor bug fixes and additional debug info (#1787) * Lint fixes: Enable Automatic formatting fixes (#1788) * Beta Part 6: Part of Mega Dynamic Load/Unload support (#1782) (#1789) - Add basic minimal unload / teardown support to all remaining components - Update rollup cleanup dependencies * Beta: Component Governance Updates to address known dependency issues (#1790)
* Update version.json (#1767) * [Release] Increase version to 2.7.4 (#1770) - Updates React Plugin to v3.2.4 (with v2.7.4 as dependency) - Updates React Native Plugin to 2.4.4 (with v2.7.4 as dependency) - Updates Chrome Debug Extension to 0.2.4 This release is primarily a performance improvement release where we will now use any built in (or provided polyfill) function over the internal polyfills for - String trim() - String endsWith() - String startsWith() - Additional Date toISOString() - Array isArray() - Array indexOf() - Array map() - Array reduce() - Object freeze() - Object seal() * remove article link in the ReadMe (#1771) * remove article links * fix readme error * Add custom properties argument to useTrackMetric (#1779) * Merge remote-tracking branch 'upstream/beta' into MSNev/MergeBetaToMaster (#1791) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) (#1757) * Merge [master] branch to [beta] and Enable GitHub Actions on [beta] branch (#1762) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Enable GitHub Actions on [beta] branch * Beta Part 1: Part of Mega Dynamic Load/Unload support (#1766) - Refactor TelemetryPluginChain ready to start supporting load/unload - Move TelemetryInitializer to BaseCore - add getPlugin (will be used for remove) - Address Channel flush issue * Merge remote-tracking branch 'upstream/master' into beta (#1772) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Update version.json (#1767) * [Release] Increase version to 2.7.4 (#1770) - Updates React Plugin to v3.2.4 (with v2.7.4 as dependency) - Updates React Native Plugin to 2.4.4 (with v2.7.4 as dependency) - Updates Chrome Debug Extension to 0.2.4 This release is primarily a performance improvement release where we will now use any built in (or provided polyfill) function over the internal polyfills for - String trim() - String endsWith() - String startsWith() - Additional Date toISOString() - Array isArray() - Array indexOf() - Array map() - Array reduce() - Object freeze() - Object seal() * [Beta] Keep version.json next as minor and resync shrinkwrap - Fix merge issue * Beta Part 2: Part of Mega Dynamic Load/Unload support (#1768) - Add Event Namespace support - Minification of constant values - Add part of the unload functionality (required for unified `teardown()` functionality) * Beta Part 3: Part of Mega Dynamic Load/Unload support (#1780) * Beta Part 3: Part of Mega Dynamic Load/Unload support - Add Core SDK Unload support * Fix telemetry chain for null and undefined * Beta Part 4: Part of Mega Dynamic Load/Unload support (#1781) * Beta Part 4: Part of Mega Dynamic Load/Unload support - Fix function typing issues - Update Analytics Extension to start supporting teardown / unload (more tests required) - Adds namespace option to instrumentation hooks (for debugging teardown issues) - Update AITest Class to log and optionally assert events and hooks that have not been removed - Add Update callback when plugins are added / removed (will be extended for config updates) - Some minor minification improvements * Update comments * Add missing enum definition * Update Sender tests * Beta Part 5: Part of Mega Dynamic Load/Unload support (#1782) - Add Missing Exports - AnalyticsPlugin: Implement teardown and initial test validation - Dependencies Plugin: Implement teardown and initial test validation - Add flush() to IAppInsightsCore * AI Beta: Minor bug fixes and additional debug info (#1787) * Lint fixes: Enable Automatic formatting fixes (#1788) * Beta Part 6: Part of Mega Dynamic Load/Unload support (#1782) (#1789) - Add basic minimal unload / teardown support to all remaining components - Update rollup cleanup dependencies * Beta: Component Governance Updates to address known dependency issues (#1790) * Master Minification Improvements (#1793) * Master Minification Improvements - Remove Generated classes - And Convert to interfaces rather than classes * Update version.json so next is a minor release * Minification - Change to only use const enums internally (#1796) - Remove Angular config from CodeQL * More Common Minification Updates (#1798) - SeverityLevel => const enum - RequestHeaders - TraceParent * Enable fetch automatic dependency tracking by default (#1468) * Finalize and Update the processTelemetry helper functions (#1805) * [Release] Increase version to v2.8.0 (#1806) * [BUG] Adding new on-by-default telemetry is a breaking change, and should involve a major version bump #1808 (#1809) * v2.8.0 has incompatible TypeScript 3.x type declaration (#1810) - [BUG] Angular project doesn't build after install latest version v.2.8.0 #1807 * [BUG] Browser exceptions are no longer automatically tracked after 2.8.0 #1812 (#1815) * [Release] Increase version to 2.8.1 (#1816) * [BUG] v2.8.1 with a Hosted IE environment fails to initialize for a hosted instance of IE #1822 (#1824) [BUG] IE8 Support was broken by several components #1823 * [Release] Increase version to 2.7.4 (#1770) - Updates React Plugin to v3.2.4 (with v2.7.4 as dependency) - Updates React Native Plugin to 2.4.4 (with v2.7.4 as dependency) - Updates Chrome Debug Extension to 0.2.4 This release is primarily a performance improvement release where we will now use any built in (or provided polyfill) function over the internal polyfills for - String trim() - String endsWith() - String startsWith() - Additional Date toISOString() - Array isArray() - Array indexOf() - Array map() - Array reduce() - Object freeze() - Object seal() * Merge remote-tracking branch 'upstream/beta' into MSNev/MergeBetaToMaster (#1791) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) (#1757) * Merge [master] branch to [beta] and Enable GitHub Actions on [beta] branch (#1762) * Update version update script to support default "next" release version (major/minor) not just patch (#1756) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Enable GitHub Actions on [beta] branch * Beta Part 1: Part of Mega Dynamic Load/Unload support (#1766) - Refactor TelemetryPluginChain ready to start supporting load/unload - Move TelemetryInitializer to BaseCore - add getPlugin (will be used for remove) - Address Channel flush issue * Merge remote-tracking branch 'upstream/master' into beta (#1772) * Additional Performance enhancements to use provided functions rather than internal polyfill's (#1758) * [BUG] 2.7.4-nightly.2202-03 builds have a bug where objKeys() is not returning the keys #1763 (#1764) * Update version.json (#1767) * [Release] Increase version to 2.7.4 (#1770) - Updates React Plugin to v3.2.4 (with v2.7.4 as dependency) - Updates React Native Plugin to 2.4.4 (with v2.7.4 as dependency) - Updates Chrome Debug Extension to 0.2.4 This release is primarily a performance improvement release where we will now use any built in (or provided polyfill) function over the internal polyfills for - String trim() - String endsWith() - String startsWith() - Additional Date toISOString() - Array isArray() - Array indexOf() - Array map() - Array reduce() - Object freeze() - Object seal() * [Beta] Keep version.json next as minor and resync shrinkwrap - Fix merge issue * Beta Part 2: Part of Mega Dynamic Load/Unload support (#1768) - Add Event Namespace support - Minification of constant values - Add part of the unload functionality (required for unified `teardown()` functionality) * Beta Part 3: Part of Mega Dynamic Load/Unload support (#1780) * Beta Part 3: Part of Mega Dynamic Load/Unload support - Add Core SDK Unload support * Fix telemetry chain for null and undefined * Beta Part 4: Part of Mega Dynamic Load/Unload support (#1781) * Beta Part 4: Part of Mega Dynamic Load/Unload support - Fix function typing issues - Update Analytics Extension to start supporting teardown / unload (more tests required) - Adds namespace option to instrumentation hooks (for debugging teardown issues) - Update AITest Class to log and optionally assert events and hooks that have not been removed - Add Update callback when plugins are added / removed (will be extended for config updates) - Some minor minification improvements * Update comments * Add missing enum definition * Update Sender tests * Beta Part 5: Part of Mega Dynamic Load/Unload support (#1782) - Add Missing Exports - AnalyticsPlugin: Implement teardown and initial test validation - Dependencies Plugin: Implement teardown and initial test validation - Add flush() to IAppInsightsCore * AI Beta: Minor bug fixes and additional debug info (#1787) * Lint fixes: Enable Automatic formatting fixes (#1788) * Beta Part 6: Part of Mega Dynamic Load/Unload support (#1782) (#1789) - Add basic minimal unload / teardown support to all remaining components - Update rollup cleanup dependencies * Beta: Component Governance Updates to address known dependency issues (#1790) * Master Minification Improvements (#1793) * Master Minification Improvements - Remove Generated classes - And Convert to interfaces rather than classes * Update version.json so next is a minor release * Minification - Change to only use const enums internally (#1796) - Remove Angular config from CodeQL * More Common Minification Updates (#1798) - SeverityLevel => const enum - RequestHeaders - TraceParent * Enable fetch automatic dependency tracking by default (#1468) * Finalize and Update the processTelemetry helper functions (#1805) * [Release] Increase version to v2.8.0 (#1806) * [BUG] Adding new on-by-default telemetry is a breaking change, and should involve a major version bump #1808 (#1809) * v2.8.0 has incompatible TypeScript 3.x type declaration (#1810) - [BUG] Angular project doesn't build after install latest version v.2.8.0 #1807 * [BUG] Browser exceptions are no longer automatically tracked after 2.8.0 #1812 (#1815) * [Release] Increase version to 2.8.1 (#1816) * Fix merge Issues -- full compare with master - Update version.json so next beta will be 3.0.0 * Set next beta release as major Co-authored-by: Karlie-777 <79606506+Karlie-777@users.noreply.github.com> Co-authored-by: Simo Nurmi <simo.aleksi.nurmi@gmail.com> Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>