Skip to content
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 3: Part of Mega Dynamic Load/Unload support #1780

Merged
merged 2 commits into from Mar 10, 2022
Merged

Conversation

MSNev
Copy link
Collaborator

@MSNev MSNev commented Mar 10, 2022

  • Add Core SDK Unload support

@@ -158,6 +161,8 @@ export abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
}
}
};

proxyFunctionAs(_self, "_addUnloadCb", () => _unloadHandlerContainer, "add");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exposes effectively the same function as

_self._addUnloadCb = (<function arguments>) => {
    return _unloadHandlerContainer.add(<function arguments>);
};

The reason it's using a function to return the _unloadHandlerContainer is to support the value of this being changed without having to redefine the prototype function

@@ -836,7 +836,7 @@ export function createEnumStyle<T>(values: T) {
enumClass[field] = value;
// Add Reverse lookup
if (!isUndefined(enumClass[value])) {
throwError("Value: [" + value + "] already exists for " + field);
throwError("[" + value + "] exists for " + field);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the error message as strings can't be minified, and this is really a development time check (which can only be checked at runtime)


/**
* The entire SDK is being unloaded
*/
//SdkUnload = 50
SdkUnload = 50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big jump from 2 to 50, any specific reason for this one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, I figured SDK unload should be separated from the other "plugin" related reasons

Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MSNev MSNev merged commit 4c4b428 into beta Mar 10, 2022
MSNev added a commit that referenced this pull request Mar 31, 2022
…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)
MSNev added a commit that referenced this pull request Apr 30, 2022
…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)
MSNev added a commit that referenced this pull request Apr 30, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants