Skip to content

test(document-load): align OTel test setup with current sdk-trace API#1413

Merged
overbalance merged 1 commit into
mainfrom
overbalance/repair-otel-220
Jul 7, 2026
Merged

test(document-load): align OTel test setup with current sdk-trace API#1413
overbalance merged 1 commit into
mainfrom
overbalance/repair-otel-220

Conversation

@overbalance

Copy link
Copy Markdown
Member

What problem is this solving?

The DocumentLoadInstrumentation test used APIs from @opentelemetry/sdk-trace-base that no longer match the current OpenTelemetry SDK surface after the recent dependency bump. BasicTracerProvider, the positional SimpleSpanProcessor(exporter) constructor, and the sdk-trace-base import path have been superseded.

Short description of changes

  • Import ReadableSpan, InMemorySpanExporter, SimpleSpanProcessor, and TracerProvider from @opentelemetry/sdk-trace instead of @opentelemetry/sdk-trace-base.
  • Replace BasicTracerProvider with TracerProvider.
  • Use the object-form constructor new SimpleSpanProcessor({ exporter }).

How has this been tested?

Ran the document-load instrumentation unit tests locally.

Checklist

  • Documentation added
  • Tests added

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
Chrome DevTools Protocol Tracing (Script: 116.63ms, Heap: 12.95MB)
Number of Requests Size of Requests Script Duration Task Duration Heap Used Size
Requests +13 requests +41.77 KB
Page Loaded +19.66 ms +20.48 ms +1.16 MB
Generate 100 fetch requests +21.14 ms +87.03 ms +1.64 MB
Generate 100 XHR requests +38.68 ms +85.56 ms +2.71 MB
Click 100 buttons and generate 100 logs +26.84 ms +48.39 ms +2.17 MB
Throw a 100 exceptions -0.19 ms +31.67 ms +2.15 MB
End Session +10.49 ms +34.88 ms +3.12 MB
Total +13 requests +41.77 KB +116.63 ms +308.01 ms +12.95 MB
Lighthouse (Script Eval: 128.23ms)
Difference Description
Total Blocking Time +1 ms Difference in Total Blocking Time: Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds. Learn more about the Total Blocking Time metric.
Main Thread Time +99.71 ms Difference in Main Thread Time: Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to minimize main-thread work
Script Evaluation Time +128.23 ms Difference in Script Evaluation Time: Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to reduce Javascript execution time.
Platform Tests (vite-7 es2015 gzip: 69.66KB)

vite-6 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-6 - es2015 +203.00 KB +69.70 KB

vite-7 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-7 - es2015 +203.00 KB +69.66 KB

webpack-5 Platform Tests

Total Uncompressed Size Total Gzip Size
webpack-5 - es2015 0 KB 0 KB

@overbalance
overbalance enabled auto-merge (squash) July 7, 2026 16:47
@overbalance
overbalance merged commit be6f054 into main Jul 7, 2026
20 checks passed
@overbalance
overbalance deleted the overbalance/repair-otel-220 branch July 7, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants