-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Inject telemetry script if telemetry enabled hosted on dagster.io #21814
Conversation
@@ -30,5 +30,10 @@ export const extractInitializationData = (): { | |||
} | |||
} | |||
} | |||
if (value.telemetryEnabled) { | |||
const script = document.createElement('script'); |
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.
should we set defer
and async
?
@@ -30,5 +30,10 @@ export const extractInitializationData = (): { | |||
} | |||
} | |||
} | |||
if (value.telemetryEnabled) { |
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.
testing this with telemetry on and off is important
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.
yeah this path has been tested for the existing telemetry stuff but I can double check
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.
Nice! This looks good to me --
It looks like our OSS CSP allows script-src 'nonce-NONCE-PLACEHOLDER' 'unsafe-inline' https: http: 'strict-dynamic';
, so this will load? I didn't realize it allowed https: and http:
Summary & Motivation
The script doesn't exist yet so this just 404s atm but we will be adding it soon.
How I Tested These Changes
Built the app, loaded it, confirmed everything works and that we load the script: