-
Notifications
You must be signed in to change notification settings - Fork 1
feat: reduce o11y bundle size #166
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
base: main
Are you sure you want to change the base?
Conversation
setTimeout(async () => { | ||
const { registerInstrumentations } = await import('@opentelemetry/instrumentation') | ||
|
||
// Load instrumentations one by one with delays | ||
const instrumentations = [] | ||
|
||
// Load fetch instrumentation | ||
try { | ||
const fetchModule = await this.loadInstrumentation('fetch') | ||
instrumentations.push(new fetchModule.FetchInstrumentation()) | ||
} catch (e) { |
Check notice
Code scanning / devskim
If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note
setTimeout(async () => { | ||
try { | ||
const xhrModule = await this.loadInstrumentation('xhr') | ||
instrumentations.push(new xhrModule.XMLHttpRequestInstrumentation()) | ||
} catch (e) { |
Check notice
Code scanning / devskim
If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note
setTimeout(async () => { | ||
try { | ||
const docModule = await this.loadInstrumentation('document') | ||
instrumentations.push(new docModule.DocumentLoadInstrumentation()) | ||
} catch (e) { |
Check notice
Code scanning / devskim
If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note
setTimeout(() => { | ||
const nav = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming | ||
if (nav) { |
Check notice
Code scanning / devskim
If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note
Summary
How did you test this change?
Are there any deployment considerations?