Skip to content

Conversation

@siyuniu-ms
Copy link
Contributor

No description provided.

* [Optional] If set to true, when exception is sent out, the SDK will also send out all scripts basic info that are loaded on the page.
* Notice: This would increase the size of the exception telemetry.
*/
getExceptionScriptsInfo?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than "get" (which to me sounds like a function) we want to call out that this is an option, which is where we have in the past called these "enableXXXX" or "disableXXXX" in this case maybe something like "includeXXX" and as we are also adding the debug logs and maybe some other stuff for the internal project, perhaps we call these out into an exception config (like the Cookie manager config)

So something like

expCfg: {
    inclScripts: true/false,
    getDbgLogs: () => string[]
}

We can call the interface name for this something meaningful like IExceptionConfig as I suspect that we are going to need additional optional "values" that partners will need to include.

export function findAllScripts(doc: any) {
let scripts = doc.getElementsByTagName("script");
let result: scriptsInfo[] = [];
for (let i = 0; i < scripts.length; i++) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets use arrForEach to help with minification

crossOrigin?: string;
async?: boolean;
defer?: boolean;
referrePolicy?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo, missing an 'r' 😄

@siyuniu-ms siyuniu-ms merged commit f39a815 into main Aug 5, 2024
@siyuniu-ms siyuniu-ms deleted the siyu/exceptionScript branch August 5, 2024 23:44
@siyuniu-ms siyuniu-ms restored the siyu/exceptionScript branch August 6, 2024 21:25
@Karlie-777 Karlie-777 added this to the 3.3.1 milestone Aug 7, 2024
@MSNev MSNev deleted the siyu/exceptionScript branch July 25, 2025 17:58
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.

4 participants