[main] Minor fixes for handling ikey promises with dynamic changes#2500
[main] Minor fixes for handling ikey promises with dynamic changes#2500
Conversation
MSNev
commented
Apr 4, 2025
- Additional Minification improvements
There was a problem hiding this comment.
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
Files not reviewed (1)
- tools/chrome-debug-extension/manifest.json: Language not supported
Comments suppressed due to low confidence (2)
AISKU/src/AISku.ts:225
- The property 'instrumentationkey' appears in lowercase, which may be inconsistent with the expected camelCase 'instrumentationKey'. Please verify and update the property name if necessary.
ikey = cs && cs.instrumentationkey || ikey;
AISKU/src/AISku.ts:106
- [nitpick] Consider renaming '_parseCs' to 'parseConnectionStringPromise' to better convey its purpose and return value.
function _parseCs(config: IConfiguration & IConfig, configCs: string | IPromise<string>) {
| return value && value > 0; | ||
| } | ||
|
|
||
| function _parseCs(config: IConfiguration & IConfig, configCs: string | IPromise<string>) { |
There was a problem hiding this comment.
Moved this out of the class as it's basically invariant so it doesn't need access to any of the properties in the closure.
| // parseCs will always resolve(unless timeout) | ||
| // return null in case any error happens | ||
| resolve(null); | ||
| doAwaitResponse(_parseCs(_config, configCs), (rsp) => { |
There was a problem hiding this comment.
Changed to use doAwaitResponse as this helps with minification in several ways.
- no
thenorcatchnames (which can't be minified) - Only 1 function (when using then/catch each one generates a function)
|
|
||
| let isPending = _activeStatus === eActiveStatus.PENDING; | ||
|
|
||
| if (isPending){ |
There was a problem hiding this comment.
Moved this logic around as by having this here this will cause subsequent "calls" for the onConfigChanges to not tag / reference any contained properties which would then result on the onConfigChange to never get called again (as the last run didn't reference anything)
Found this as part of adding new configuration options for the OTel beta as I was adding additional checks.
|
|
||
| } | ||
|
|
||
| _handleIKeyEndpointPromises(rootCfg); |
There was a problem hiding this comment.
Also broke these out into smaller functions to contain the logic rather than just having this inline
There was a problem hiding this comment.
The actual "processing" logic should be mostly the same (I'll add a comment to the new function that triggers the next onConfigChange)
|
|
||
| // at least have one promise | ||
| if (promises.length) { | ||
| // reset to false for new dynamic changes |
There was a problem hiding this comment.
Also broke if part into it's own function rather than inline
| // But we want to reference these config values so that if any future changes are made | ||
| // this will trigger the re-run of the watch function | ||
| // and the ikey and endpointUrl will be set to the new values | ||
| let ikey = theConfig.instrumentationKey; |
There was a problem hiding this comment.
These 2 lines are really the key part of the referencing change, as per the comment if these direct configuration properties are not referenced as part of the subsequent call to the onConfigChange (they where originally after the "pending" check) then the dynamic configuration change usage detection doesn't identify that this function should be called (indirectly by the calling onConfigChange (watch) function) again if / when either of these configuration options change.
There was a problem hiding this comment.
Apart from moving these 2 referenced variables to before the pending check (and not having a isPending variable) the reset of the logic of this function "should" (please check) be the same.
There was a problem hiding this comment.
The initial design of setting ikey after pending check is to avoid the scenarios where user changes the ikey to a string value before the previous ikey promises are resolved. But this did block the following onConfigChange before all promises are resolved.
| let endpointUrl = theConfig.endpointUrl; // do not need to validate endpoint url, if it is null, default one will be set by sender | ||
|
|
||
| // Check if we are waiting for previous promises to be resolved, won't apply new changes | ||
| if (_activeStatus !== eActiveStatus.PENDING) { |
There was a problem hiding this comment.
We "probably" should really look at handling reassignment to different promises but that's a much larger (and risker) change.
| let initTimeout = isNotNullOrUndefined(theConfig.initTimeOut)? theConfig.initTimeOut : maxInitTimeout; // theConfig.initTimeOut could be 0 | ||
| let allPromises = createSyncAllSettledPromise<string>(promises); | ||
|
|
||
| if (_initTimer) { |
There was a problem hiding this comment.
This bit is new, it cancels any previously running timer (which should never occur based on the above pending check), but just preparing and covering all bases.
There was a problem hiding this comment.
The rest of this function logic should be the same as previously (please check)
- Additional Minification improvements
* [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]>
* [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> * [main] enable compress api in 1ds-post-channel and applicationinsights-channel (#2451) * [main] [Click analytics] not logging no native html input elements #2136 (#2504) * [Main][Task]31233527: Add a Config to Allow Users to Change RequestSizeLimitBytes (#2511) * update * update * update * update * Address issues with isFeatureEnabled changes (#2514) - More fully disable/remove StatsBeat for release * Add additional SendPostManager tests (#2515) * Reduce Stale period (#2519) * [Main][Task]32698211: Add a Config to Allow Users to Change Max Number of Events Per Batch (#2513) * add max event per batch config * update * update * update * update * update * update * Remove Generated docs from the repo (#2518) - These docs are generated and published by default to the typedoc site, they don't need to be checked int * Update Components to address governance issues (#2517) - update rush - update puppeteer - remove chromium * [Release] Increase version to 3.3.7 (#2520) * release 3.3.7 * update * [beta] Merge [main] (3.3.7) to beta branch - Fix bad merge issues --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]>
* [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> * [main] enable compress api in 1ds-post-channel and applicationinsights-channel (#2451) * [main] [Click analytics] not logging no native html input elements #2136 (#2504) * [Main][Task]31233527: Add a Config to Allow Users to Change RequestSizeLimitBytes (#2511) * update * update * update * update * Address issues with isFeatureEnabled changes (#2514) - More fully disable/remove StatsBeat for release * Add additional SendPostManager tests (#2515) * Reduce Stale period (#2519) * [Main][Task]32698211: Add a Config to Allow Users to Change Max Number of Events Per Batch (#2513) * add max event per batch config * update * update * update * update * update * update * Remove Generated docs from the repo (#2518) - These docs are generated and published by default to the typedoc site, they don't need to be checked int * Update Components to address governance issues (#2517) - update rush - update puppeteer - remove chromium * [Release] Increase version to 3.3.7 (#2520) * release 3.3.7 * update * Update Components to address governance issues (#2524) - Remove grunt-contrib-qunit to address tar-fs versioning - Update puppeteer - Improve performance and simplify Asynchronous test generation * Add back "request" devDependency for now (#2525) * Fix TestCase PollingAssert argument passing for testContext (#2526) * Update shrinkwrap after merge --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]>
…2500) - Additional Minification improvements
* [Main] Increase CDN Deprecation Message Sampling Rate to 40% (#2492) * [beta] Merge [main] into [beta] and set next release to minor * Update AISKU/Tests/Unit/src/AISKUSize.Tests.ts Co-authored-by: Copilot <[email protected]> * Update AISKU/Tests/Perf/src/AISKUPerf.Tests.ts Co-authored-by: Copilot <[email protected]> * [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [beta] Update publishing scripts for nightly beta releases (#2498) * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> * [beta] Merge remote-tracking branch 'origin/main' into `beta` (#2509) * [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]> * [main] enable compress api in 1ds-post-channel and applicationinsights-channel (#2451) * [main] [Click analytics] not logging no native html input elements #2136 (#2504) * [Main][Task]31233527: Add a Config to Allow Users to Change RequestSizeLimitBytes (#2511) * update * update * update * update * Address issues with isFeatureEnabled changes (#2514) - More fully disable/remove StatsBeat for release * Add additional SendPostManager tests (#2515) * Reduce Stale period (#2519) * [Main][Task]32698211: Add a Config to Allow Users to Change Max Number of Events Per Batch (#2513) * add max event per batch config * update * update * update * update * update * update * Remove Generated docs from the repo (#2518) - These docs are generated and published by default to the typedoc site, they don't need to be checked int * Update Components to address governance issues (#2517) - update rush - update puppeteer - remove chromium * [Release] Increase version to 3.3.7 (#2520) * release 3.3.7 * update * [beta] Merge [main] (3.3.7) to beta branch (#2521) * [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> * [main] enable compress api in 1ds-post-channel and applicationinsights-channel (#2451) * [main] [Click analytics] not logging no native html input elements #2136 (#2504) * [Main][Task]31233527: Add a Config to Allow Users to Change RequestSizeLimitBytes (#2511) * update * update * update * update * Address issues with isFeatureEnabled changes (#2514) - More fully disable/remove StatsBeat for release * Add additional SendPostManager tests (#2515) * Reduce Stale period (#2519) * [Main][Task]32698211: Add a Config to Allow Users to Change Max Number of Events Per Batch (#2513) * add max event per batch config * update * update * update * update * update * update * Remove Generated docs from the repo (#2518) - These docs are generated and published by default to the typedoc site, they don't need to be checked int * Update Components to address governance issues (#2517) - update rush - update puppeteer - remove chromium * [Release] Increase version to 3.3.7 (#2520) * release 3.3.7 * update * [beta] Merge [main] (3.3.7) to beta branch - Fix bad merge issues --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]> * Update Components to address governance issues (#2524) - Remove grunt-contrib-qunit to address tar-fs versioning - Update puppeteer - Improve performance and simplify Asynchronous test generation * Add back "request" devDependency for now (#2525) * Fix TestCase PollingAssert argument passing for testContext (#2526) * [beta] Merge remote-tracking branch 'origin/main' into `beta` (#2528) * [main] Add stale bot for assigned issues and prs (#2495) * move to beta again (#2496) Co-authored-by: Nev <[email protected]> * [main] support adding cross origin resource policy for #1851 (#2423) * add header * add test * Update IConfiguration.ts * rename * based on comment * Update Sender.tests.ts * local variable * Update Sender.ts * slight change test * Update Sender.ts * [Main][Task]31248254: Add Monitor Tests for CDN OPTIONS Calls (#2491) * add cdn montioring tests * update * update * update * update * update * update * [main] Minor fixes for handling ikey promises with dynamic changes (#2500) - Additional Minification improvements * [chrome debug tool] publish 0.8.0 for manifect V3 (#2499) * [Main][Task]31233527:Change Default RequestSizeLimitBytes (#2501) * add post channel config * update * udpate * update * update * update * udpate * update * update * update * [main][stats beat] implement stats beat in application insights (#2489) * [main] Handle race condition during unload (#2507) * Drop correlation header to be passed on the dependency (#2506) * added boolean as return type of the DependencyListenerFunction and based on the result of the listenerfunctions the correlation headers can be skipped * code minification and refactoring of documentation --------- Co-authored-by: Nev <[email protected]> * [main] enable compress api in 1ds-post-channel and applicationinsights-channel (#2451) * [main] [Click analytics] not logging no native html input elements #2136 (#2504) * [Main][Task]31233527: Add a Config to Allow Users to Change RequestSizeLimitBytes (#2511) * update * update * update * update * Address issues with isFeatureEnabled changes (#2514) - More fully disable/remove StatsBeat for release * Add additional SendPostManager tests (#2515) * Reduce Stale period (#2519) * [Main][Task]32698211: Add a Config to Allow Users to Change Max Number of Events Per Batch (#2513) * add max event per batch config * update * update * update * update * update * update * Remove Generated docs from the repo (#2518) - These docs are generated and published by default to the typedoc site, they don't need to be checked int * Update Components to address governance issues (#2517) - update rush - update puppeteer - remove chromium * [Release] Increase version to 3.3.7 (#2520) * release 3.3.7 * update * Update Components to address governance issues (#2524) - Remove grunt-contrib-qunit to address tar-fs versioning - Update puppeteer - Improve performance and simplify Asynchronous test generation * Add back "request" devDependency for now (#2525) * Fix TestCase PollingAssert argument passing for testContext (#2526) * Update shrinkwrap after merge --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]> * add negative isArray check to _isConfigDefaults (#2530) Co-authored-by: Nitzan Uziely <[email protected]> * Fix ReferenceError in Click Analytics v3.3.7 by reordering variable declaration (#2536) * Initial plan for issue * Fix ReferenceError in Click Analytics by moving variable declaration before usage Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Fix Click Analytics contentName callback in v3.3.7 (#2535) * Initial plan for issue * Fix Click Analytics contentName callback Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * [Release] Increase version to 3.3.8 (#2542) * release 3.3.8 * update * update * [Task] Fix CodeQL version to v2 (#2547) * Initial plan for issue * Update CodeQL GitHub Action from v1 to v2 Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Creates a github action to assign co-pilot to a task or PR if the label is assigned by a code owner (#2550) * CodeQL Action major versions v1 and v2 have been deprecated. (#2553) * CodeQL Action major versions v1 and v2 have been deprecated. * Update codeql-config.yml * Assign Co-Pilot updates (#2554) * Potential fix for code scanning alert no. 2259: Unused variable, import, function or class (#2551) * Potential fix for code scanning alert no. 2259: Unused variable, import, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update AppInsightsCore.ts * Update codeql-config.yml --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Auto Assign Copilot Updates (#2555) * Auto assign copilot update -- use environment variable for usernames (#2557) * Update SDK Loader to rename the snippet postfix file to avoid CodeQL scanning issues (#2556) * Update to correctly reference the repository variable within the action (#2558) * CodeQL - Don't attempt to upload from the CI (#2560) * CodeQL - Add more exclusions as they are causing false positive alerts (#2561) * CodeQL Update configuration to run on all branches (#2564) - and the cron to run more frequently to check the configuration * [Task] Add additional stale operations for wontfix Issues and PRs as well as inactive PR's (#2563) * Add merge-queue setting for the ci tests (#2565) * Auto Assign - Update the lookup for a valid user id. (#2559) * Remove Auto-Assign workflow (#2569) - copilot needs to be made a collaborator which they won't be * Update analytics-js unit tests to use asyncQueue pattern (#2544) * Initial plan for issue * Updated async tests to use asyncQueue Co-authored-by: MSNev <[email protected]> * Updated async tests to use waitForExceptionPromise with asyncQueue pattern Co-authored-by: MSNev <[email protected]> * Removed unused waitForException method Co-authored-by: MSNev <[email protected]> * Standardize async test pattern to use .add() consistently Co-authored-by: MSNev <[email protected]> * Fixed waitForExceptionPromise to correctly handle spy arguments Co-authored-by: MSNev <[email protected]> * Move initial setup outside asyncTaskPollingAssert in waitForExceptionPromise Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Add documentation for disablePageUnloadEvents to address jQuery 3.7.1 deprecation warnings (#2533) * Initial plan for issue * Add documentation for disablePageUnloadEvents to address jQuery 3.7.1 deprecation warnings Co-authored-by: MSNev <[email protected]> * Add detailed documentation for disablePageUnloadEvents in docs folder Co-authored-by: MSNev <[email protected]> * Update documentation URLs and add TypeScript examples for page events config Co-authored-by: MSNev <[email protected]> * Update documentation for disablePageUnloadEvents and disablePageShowEvents Co-authored-by: MSNev <[email protected]> * Add @example tag to TypeDoc for disablePageUnloadEvents and disablePageShowEvents Co-authored-by: MSNev <[email protected]> * Add PageUnloadEvents.html link to docs/README.md FAQ section Co-authored-by: MSNev <[email protected]> * Update disablePageUnloadEvents and disablePageShowEvents links to use TypeDoc URL Co-authored-by: MSNev <[email protected]> * Remove unnecessary lines and "Example usage:" heading Co-authored-by: MSNev <[email protected]> * Update PageUnloadEvents link to use relative markdown path Co-authored-by: MSNev <[email protected]> * Add details about handling missing events in PageUnloadEvents.md Co-authored-by: MSNev <[email protected]> * Update disablePageUnloadEvents and disablePageShowEvents with TypeDoc links in README.md Co-authored-by: MSNev <[email protected]> * Update disablePageUnloadEvents and disablePageShowEvents links to 1ds-core-js specific TypeDoc URLs Co-authored-by: MSNev <[email protected]> * Remove JavaScript examples from PageUnloadEvents.md Co-authored-by: MSNev <[email protected]> * Clarify Page Unload and Visibility Event Handling section in README.md Co-authored-by: hectorhdzg <[email protected]> * Update README.md to clarify page unload event handling description Co-authored-by: MSNev <[email protected]> * Fix failing tests by correcting AITestClass import in Es5Rollup.Tests.ts Co-authored-by: MSNev <[email protected]> * Revert to using "@microsoft/ai-test-framework" as requested Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> Co-authored-by: hectorhdzg <[email protected]> * [Main][Task]32864048: Improve Offline Channel Test (#2534) * update * update * update * Restore CodeQL schedule back to previous value (#2574) * [Fix] Export IConfiguration interface from AISKU package (#2579) * Initial plan for issue * Add IConfiguration export to Init.ts Co-authored-by: MSNev <[email protected]> * Update typedoc.json to include re-exports and revert Init.ts change Co-authored-by: MSNev <[email protected]> * Revert typedoc.json changes and add interfaces/enums to Init.ts for typedoc Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Export ICorrelationConfig interface from dependencies extension (#2581) * Initial plan for issue * Export ICorrelationConfig from dependencies extension Co-authored-by: MSNev <[email protected]> * Update typedoc configuration to properly document re-exported types Co-authored-by: MSNev <[email protected]> * Revert typedoc configuration changes Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * [Main][Task]32909441: Increase Web Snippet to 1.2.2 (#2577) * release snippet 1.2.2 * update * update * update * update * [AI][Task] 33246973: Update Readme on Error Handler (#2586) * update readme * update * Fix issue with array _clickCaptureElements being referenced by value rather than by index. (#2587) * [Main][Task] 33497606: Add Tests for ClickAnalytics AutoCaptureHandler (#2592) * add click tests * udpate * update * [Release] Increase version to 3.3.9 (#2593) * release 3.3.9 * update * Add TypeDoc links to README configuration tables (#2576) * Initial plan for issue * Test implementation: Add TypeDoc links to clickanalytics configuration tables Co-authored-by: MSNev <[email protected]> * Add TypeDoc links to all README configuration tables Co-authored-by: MSNev <[email protected]> * Fix TypeDoc base URLs for all components Co-authored-by: MSNev <[email protected]> * Fix incorrect TypeDoc base URLs for offline channel and dependencies plugin Co-authored-by: MSNev <[email protected]> * Fix missing TypeDoc property links in multiple configuration tables Co-authored-by: MSNev <[email protected]> * Fix TypeDoc link issues: remove double links, invalid interface link, and export missing interfaces Co-authored-by: MSNev <[email protected]> * Export additional interfaces from clickanalytics package: ICoreData, IPageTags, IPageActionTelemetry, ICustomProperties, IContent, IOverrideValues, IPageActionOverrideValues, and Behavior enum Co-authored-by: MSNev <[email protected]> * Fix TypeDoc links to only reference property names Co-authored-by: MSNev <[email protected]> * Fix IConfiguration links to use correct interfaces - change IConfig properties and remove invalid links Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Fix TypeScript compatibility issue with ITelemetryPlugin interface (#2597) * Initial plan * Fix ITelemetryPlugin interface: make setNextPlugin optional and add deprecation warnings Co-authored-by: MSNev <[email protected]> * Add full comment from interface to BaseTelemetryPlugin setNextPlugin method Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Remove unused jquery-1.11.1.js from the repository (#2600) * Initial plan * Remove unused jquery-1.11.1.js file from common/Tests/External/ Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Create IAnalyticsConfig interface to properly define AnalyticsPlugin configuration subset (#2583) * Initial plan for issue * Create IAnalyticsConfig interface and update AnalyticsPlugin configuration Co-authored-by: rads-1996 <[email protected]> * Add missing accountId property to IAnalyticsConfig interface Co-authored-by: rads-1996 <[email protected]> * Limit IAnalyticsConfig usage to only _extConfig instance as requested Co-authored-by: rads-1996 <[email protected]> * Change IAnalyticsConfig to extend IConfig and IConfiguration instead of defining specific properties Co-authored-by: rads-1996 <[email protected]> * Clean up unrelated whitespace changes, keep only IAnalyticsConfig implementation files Co-authored-by: rads-1996 <[email protected]> * Re-export IAnalyticsConfig interface from AISKU for external usage Co-authored-by: Karlie-777 <[email protected]> * Add AISKU test cases for IAnalyticsConfig interface and extConfig usage Co-authored-by: rads-1996 <[email protected]> * Fix TypeScript compilation errors in IAnalyticsConfig test file Co-authored-by: rads-1996 <[email protected]> * Fix test cleanup issue by properly disposing ApplicationInsights instances using onDone callbacks Co-authored-by: rads-1996 <[email protected]> * Fix test assertions to check for type compatibility instead of exact values Co-authored-by: rads-1996 <[email protected]> * Address reviewer feedback: use IConfig & IConfiguration intersection type and TestInstrumentationKey in tests Co-authored-by: Karlie-777 <[email protected]> * Update test to verify IAnalyticsConfig as instance of both IConfig and IConfiguration simultaneously Co-authored-by: rads-1996 <[email protected]> * Add clarifying comment to IAnalyticsConfig interface to retrigger CI tests Co-authored-by: rads-1996 <[email protected]> * Add onConfigChange tests for IAnalyticsConfig interface Co-authored-by: Karlie-777 <[email protected]> * Fix test assertion failures in IAnalyticsConfig tests by adjusting expectations for config property access Co-authored-by: rads-1996 <[email protected]> * Clean up PR to include only relevant files for IAnalyticsConfig implementation Co-authored-by: rads-1996 <[email protected]> * Fix test assertion failures by changing exact value comparisons to type/range checks Co-authored-by: rads-1996 <[email protected]> * Fix test assertion failures in IAnalyticsConfig onConfigChange tests Co-authored-by: rads-1996 <[email protected]> * Fix test assertion failures in IAnalyticsConfig tests by removing problematic onConfigChange tests Co-authored-by: rads-1996 <[email protected]> * Clean up PR to include only relevant files for IAnalyticsConfig implementation Co-authored-by: rads-1996 <[email protected]> * Define IAnalyticsConfig as proper interface with specific properties used by AnalyticsPlugin Co-authored-by: MSNev <[email protected]> * Add comprehensive JSDoc annotations to IAnalyticsConfig interface properties Co-authored-by: MSNev <[email protected]> * Fix IAnalyticsConfig tests and add @internal/@ignore tags to internal flags Co-authored-by: MSNev <[email protected]> * Address reviewer feedback: revert public config to IConfig & IConfiguration, fix tests, add onConfigChange tests Co-authored-by: MSNev <[email protected]> * Fix IAnalyticsConfig test issues: remove useless test and use exact assertion count Co-authored-by: MSNev <[email protected]> * Address reviewer feedback: use IConfig & IConfiguration type and remove any casting Co-authored-by: MSNev <[email protected]> * Remove unrelated files with only end-of-file cr/lf differences, keep only IAnalyticsConfig implementation Co-authored-by: MSNev <[email protected]> * Fix IAnalyticsConfig test failure by using onConfigChange with IConfiguration & IConfig type Co-authored-by: MSNev <[email protected]> * added new line to change last change by copilot --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: rads-1996 <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: MSNev <[email protected]> Co-authored-by: Radhika Gupta <[email protected]> * Fix documentation links pointing to incorrect /docs/ path (#2604) * Initial plan * Fix documentation links to remove incorrect /docs/ path Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Adding copilot instructions (#2605) * Adding copilot instructions * Update * Redacting urls before sending to telemetry data. (#2549) * Implement URL Redaction feature * Modified how IConfiguration config was being declared for some files * Calling fieldRedaction method to redact URLs before being added to telemetry data * Fixed the AISKU failing test and added edge cases to unit tests for fieldredaction * Sensitive query keys is now configurable. Added corresponding unit tests * Addressed review comments * Added concat for minification * Using default params from internal constants * Fixed usage of constant * Updated the config from redactionEnabled to redactUrls * Fixed trailing spaces * Addressed review comments * Fixed test config * Fixed credential redaction test * [Beta] Merge [main] to [beta] (#2610) * Restore CodeQL schedule back to previous value (#2574) * [Fix] Export IConfiguration interface from AISKU package (#2579) * Initial plan for issue * Add IConfiguration export to Init.ts Co-authored-by: MSNev <[email protected]> * Update typedoc.json to include re-exports and revert Init.ts change Co-authored-by: MSNev <[email protected]> * Revert typedoc.json changes and add interfaces/enums to Init.ts for typedoc Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Export ICorrelationConfig interface from dependencies extension (#2581) * Initial plan for issue * Export ICorrelationConfig from dependencies extension Co-authored-by: MSNev <[email protected]> * Update typedoc configuration to properly document re-exported types Co-authored-by: MSNev <[email protected]> * Revert typedoc configuration changes Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * [Main][Task]32909441: Increase Web Snippet to 1.2.2 (#2577) * release snippet 1.2.2 * update * update * update * update * [AI][Task] 33246973: Update Readme on Error Handler (#2586) * update readme * update * Fix issue with array _clickCaptureElements being referenced by value rather than by index. (#2587) * [Main][Task] 33497606: Add Tests for ClickAnalytics AutoCaptureHandler (#2592) * add click tests * udpate * update * [Release] Increase version to 3.3.9 (#2593) * release 3.3.9 * update * Add TypeDoc links to README configuration tables (#2576) * Initial plan for issue * Test implementation: Add TypeDoc links to clickanalytics configuration tables Co-authored-by: MSNev <[email protected]> * Add TypeDoc links to all README configuration tables Co-authored-by: MSNev <[email protected]> * Fix TypeDoc base URLs for all components Co-authored-by: MSNev <[email protected]> * Fix incorrect TypeDoc base URLs for offline channel and dependencies plugin Co-authored-by: MSNev <[email protected]> * Fix missing TypeDoc property links in multiple configuration tables Co-authored-by: MSNev <[email protected]> * Fix TypeDoc link issues: remove double links, invalid interface link, and export missing interfaces Co-authored-by: MSNev <[email protected]> * Export additional interfaces from clickanalytics package: ICoreData, IPageTags, IPageActionTelemetry, ICustomProperties, IContent, IOverrideValues, IPageActionOverrideValues, and Behavior enum Co-authored-by: MSNev <[email protected]> * Fix TypeDoc links to only reference property names Co-authored-by: MSNev <[email protected]> * Fix IConfiguration links to use correct interfaces - change IConfig properties and remove invalid links Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Fix TypeScript compatibility issue with ITelemetryPlugin interface (#2597) * Initial plan * Fix ITelemetryPlugin interface: make setNextPlugin optional and add deprecation warnings Co-authored-by: MSNev <[email protected]> * Add full comment from interface to BaseTelemetryPlugin setNextPlugin method Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Remove unused jquery-1.11.1.js from the repository (#2600) * Initial plan * Remove unused jquery-1.11.1.js file from common/Tests/External/ Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Create IAnalyticsConfig interface to properly define AnalyticsPlugin configuration subset (#2583) * Initial plan for issue * Create IAnalyticsConfig interface and update AnalyticsPlugin configuration Co-authored-by: rads-1996 <[email protected]> * Add missing accountId property to IAnalyticsConfig interface Co-authored-by: rads-1996 <[email protected]> * Limit IAnalyticsConfig usage to only _extConfig instance as requested Co-authored-by: rads-1996 <[email protected]> * Change IAnalyticsConfig to extend IConfig and IConfiguration instead of defining specific properties Co-authored-by: rads-1996 <[email protected]> * Clean up unrelated whitespace changes, keep only IAnalyticsConfig implementation files Co-authored-by: rads-1996 <[email protected]> * Re-export IAnalyticsConfig interface from AISKU for external usage Co-authored-by: Karlie-777 <[email protected]> * Add AISKU test cases for IAnalyticsConfig interface and extConfig usage Co-authored-by: rads-1996 <[email protected]> * Fix TypeScript compilation errors in IAnalyticsConfig test file Co-authored-by: rads-1996 <[email protected]> * Fix test cleanup issue by properly disposing ApplicationInsights instances using onDone callbacks Co-authored-by: rads-1996 <[email protected]> * Fix test assertions to check for type compatibility instead of exact values Co-authored-by: rads-1996 <[email protected]> * Address reviewer feedback: use IConfig & IConfiguration intersection type and TestInstrumentationKey in tests Co-authored-by: Karlie-777 <[email protected]> * Update test to verify IAnalyticsConfig as instance of both IConfig and IConfiguration simultaneously Co-authored-by: rads-1996 <[email protected]> * Add clarifying comment to IAnalyticsConfig interface to retrigger CI tests Co-authored-by: rads-1996 <[email protected]> * Add onConfigChange tests for IAnalyticsConfig interface Co-authored-by: Karlie-777 <[email protected]> * Fix test assertion failures in IAnalyticsConfig tests by adjusting expectations for config property access Co-authored-by: rads-1996 <[email protected]> * Clean up PR to include only relevant files for IAnalyticsConfig implementation Co-authored-by: rads-1996 <[email protected]> * Fix test assertion failures by changing exact value comparisons to type/range checks Co-authored-by: rads-1996 <[email protected]> * Fix test assertion failures in IAnalyticsConfig onConfigChange tests Co-authored-by: rads-1996 <[email protected]> * Fix test assertion failures in IAnalyticsConfig tests by removing problematic onConfigChange tests Co-authored-by: rads-1996 <[email protected]> * Clean up PR to include only relevant files for IAnalyticsConfig implementation Co-authored-by: rads-1996 <[email protected]> * Define IAnalyticsConfig as proper interface with specific properties used by AnalyticsPlugin Co-authored-by: MSNev <[email protected]> * Add comprehensive JSDoc annotations to IAnalyticsConfig interface properties Co-authored-by: MSNev <[email protected]> * Fix IAnalyticsConfig tests and add @internal/@ignore tags to internal flags Co-authored-by: MSNev <[email protected]> * Address reviewer feedback: revert public config to IConfig & IConfiguration, fix tests, add onConfigChange tests Co-authored-by: MSNev <[email protected]> * Fix IAnalyticsConfig test issues: remove useless test and use exact assertion count Co-authored-by: MSNev <[email protected]> * Address reviewer feedback: use IConfig & IConfiguration type and remove any casting Co-authored-by: MSNev <[email protected]> * Remove unrelated files with only end-of-file cr/lf differences, keep only IAnalyticsConfig implementation Co-authored-by: MSNev <[email protected]> * Fix IAnalyticsConfig test failure by using onConfigChange with IConfiguration & IConfig type Co-authored-by: MSNev <[email protected]> * added new line to change last change by copilot --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: rads-1996 <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: MSNev <[email protected]> Co-authored-by: Radhika Gupta <[email protected]> * Fix documentation links pointing to incorrect /docs/ path (#2604) * Initial plan * Fix documentation links to remove incorrect /docs/ path Co-authored-by: MSNev <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: MSNev <[email protected]> * Adding copilot instructions (#2605) * Adding copilot instructions * Update * [beta] Merge [main] to [beta] --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: Barry Attwater <[email protected]> Co-authored-by: rads-1996 <[email protected]> Co-authored-by: Radhika Gupta <[email protected]> Co-authored-by: Hector Hernandez <[email protected]> * Update ci.yml * Update codeql-analysis.yml --------- Co-authored-by: siyuniu-ms <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Karlie-777 <[email protected]> Co-authored-by: aimbrenda <[email protected]> Co-authored-by: linkgoron <[email protected]> Co-authored-by: Nitzan Uziely <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: hectorhdzg <[email protected]> Co-authored-by: Barry Attwater <[email protected]> Co-authored-by: rads-1996 <[email protected]> Co-authored-by: Radhika Gupta <[email protected]> Co-authored-by: rads-1996 <[email protected]>