Commit f563538
committed
Introduce OpenTelemetry in rewatch and setup new test infrastructure
Add optional OTLP tracing export to rewatch, controlled by the
OTEL_EXPORTER_OTLP_ENDPOINT environment variable. When set, rewatch
exports spans via HTTP OTLP; when unset, tracing is a no-op.
Instrument key build system functions (initialize_build, incremental_build,
compile, parse, clean, format, packages) with tracing spans and attributes
such as module counts and package names.
Restructure main.rs to support telemetry lifecycle (init/flush/shutdown)
and fix show_progress to use >= LevelFilter::Info so -v/-vv don't
suppress progress messages. Also print 'Finished compilation' in
plain_output mode during watch full rebuilds.
Introduce a new Vitest-based test infrastructure in tests/rewatch_tests/
that replaces the bash integration tests. Tests spawn rewatch with an
OTLP endpoint pointing to an in-process HTTP receiver, collect spans,
and snapshot the resulting span tree for deterministic assertions.
Update CI, Makefile, and scripts/test.js to use the new test runner.1 parent e55c5e4 commit f563538
49 files changed
Lines changed: 5599 additions & 109 deletions
File tree
- .github/workflows
- rewatch
- src
- build
- scripts
- tests/rewatch_tests
- fixture
- .yarn/releases
- packages
- app
- src
- library
- src
- src
- helpers
- tests
- __snapshots__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | 327 | | |
340 | 328 | | |
341 | 329 | | |
| |||
645 | 633 | | |
646 | 634 | | |
647 | 635 | | |
648 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
649 | 640 | | |
650 | 641 | | |
651 | 642 | | |
652 | 643 | | |
653 | | - | |
| 644 | + | |
654 | 645 | | |
655 | 646 | | |
656 | | - | |
| 647 | + | |
657 | 648 | | |
658 | 649 | | |
659 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
0 commit comments