start.node: node.js imports node:http before start.instrument runs, so HTTP instrumentation misses the server
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript, vite
- Lĩnh vực
- build-system, observability
Hướng nghiên cứu
The problem is the static import order in the emitted dist/server/node.js, where node:http loads before start.instrument runs inside ./server.js. Start in the plugin code that generates the node entry and check how it orders the node:* imports relative to the instrument and handler imports. Done means that with instrument set, the instrument module runs before node:http is loaded, and a build with the option shows that order.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
@solidjs/vite-plugin 3.0.0-next.50, solid-js 2.0.0-rc.15, Node 26.
With start: { node: true, instrument: './src/instrumentation.ts' }, the emitted dist/server/node.js starts with static imports:
import { createServer } from 'node:http';
// …node:fs, node:path, node:stream/promises…
import { handleRequest } from './server.js';
./server.js is where the start.instrument wrapper runs (await import(instrument); await import(handler)). Static imports are evaluated first, so node:http is already loaded when the instrument module runs. OpenTelemetry's HTTP instrumentation (@opentelemetry/auto-instrumentations-node / instrumentation-http) then misses the server: there is no HTTP server span for any request. The same instrument module works when it is passed as node --import ./dist/instrumentation.js.
The option's docs say the module "runs to completion before anything else in the server graph loads" on every surface. For start.node the entry itself breaks that.
What we see: we run an instrument module that starts the OpenTelemetry NodeSDK, and serve through the node entry (createListener from dist/server/node.js). Run that way, the collector gets no HTTP SERVER span for any request. With the same module passed as node --import, every request gets one. The import order above is the reason as far as we can tell. We have not reduced it to a standalone repo.
Suggestion: when instrument is set, have the node entry await it before the node:* imports. One way is to emit await import(instrument) at the top of node.js and load the rest of the entry through a dynamic import. Another is to load node:http lazily inside serve / createListener.
We pass --import for now, so the option is unused in our apps.
- Ngôn ngữ chính
- TypeScript
- Star
- 522
- Fork
- 73
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 34
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/solid-vite-plugin
-
Test environment detection doesn't consider Vitest workspacesCó thể đã có người làm @carloitaben đã nhận 55 ngày trước. Đang mở1.x
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
solidjs/solid-vite-plugin#205 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[3.0.0-next.50 / next] SSR build: the $$moduleUrl export added to a Worker main module stops workerd from startingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
solidjs/solid-vite-plugin#420 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
solidjs/solid-vite-plugin#419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dev manifest bridge keeps stale CSS after an editCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 34/100
solidjs/solid-vite-plugin#415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dev manifest loses lazy CSS when imported before HTTP startupCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
solidjs/solid-vite-plugin#414 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/solid-vite-plugin
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
callstackincubator/simlock#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 [BUG] - FeatureComparisonTable text-only cells are top-aligned while icon cells are centeredĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 7 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày