Skip to content

Commit a15148e

Browse files
committed
Merge remote-tracking branch 'origin/master' into sourcemap
# Conflicts: # rewatch/src/build.rs
2 parents 32ef222 + 2778706 commit a15148e

460 files changed

Lines changed: 3726 additions & 74738 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,39 @@ This is useful for iterating on a specific test without running the full suite.
410410
- **Dependencies**: Inspect module dependency graph in `deps.rs`
411411
- **File Watching**: Monitor file change events in `watcher.rs`
412412

413+
#### OpenTelemetry Tracing
414+
415+
Rewatch supports OpenTelemetry (OTEL) tracing for build and watch commands. To visualize traces locally, run a Jaeger all-in-one container:
416+
417+
```bash
418+
docker run -d --name jaeger \
419+
-p 4317:4317 -p 4318:4318 -p 16686:16686 \
420+
jaegertracing/all-in-one
421+
```
422+
423+
Then run rewatch with the OTLP endpoint set:
424+
425+
```bash
426+
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 cargo run --manifest-path rewatch/Cargo.toml -- build
427+
```
428+
429+
Open http://localhost:16686 to view traces in the Jaeger UI.
430+
431+
Note: Use `tracing::debug!` (not `log::debug!`) for events you want to appear in OTEL traces — they use separate logging systems.
432+
433+
##### Honored environment variables
434+
435+
Rewatch follows the OTEL spec for configuration — no rewatch-specific knobs exist.
436+
437+
| Variable | Purpose |
438+
|---|---|
439+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Base endpoint of the collector (e.g. `http://localhost:4318`). `/v1/traces` is appended for the trace exporter. Setting this (or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`) is what enables telemetry — if neither is set, tracing is a no-op. |
440+
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | Full trace endpoint used verbatim. Overrides the general endpoint for traces. |
441+
| `OTEL_EXPORTER_OTLP_HEADERS` | Extra headers on exporter requests (e.g. `authorization=Bearer xyz`). |
442+
| `OTEL_SERVICE_NAME` | Service name reported on spans. Defaults to `rewatch`. |
443+
| `OTEL_RESOURCE_ATTRIBUTES` | Comma-separated `key=value` pairs added as resource attributes (e.g. `deployment.environment=ci,host.name=$HOSTNAME`). |
444+
| `RUST_LOG` | Controls which span/event levels are captured (e.g. `RUST_LOG=info`, `RUST_LOG=rewatch=debug`). Defaults to `debug` when telemetry is enabled. |
445+
413446
#### Running Rewatch Directly
414447

415448
When running the rewatch binary directly (via `cargo run` or the compiled binary) during development, you need to set environment variables to point to the local compiler and runtime. Otherwise, rewatch will try to use the installed versions:

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,33 @@
1414

1515
#### :boom: Breaking Change
1616

17+
- Make Jsx.component abstract. https://github.com/rescript-lang/rescript/pull/8390
18+
1719
#### :eyeglasses: Spec Compliance
1820

1921
#### :rocket: New Feature
2022

2123
#### :bug: Bug fix
2224

2325
- Fix directive `@warning("-102")` not working. https://github.com/rescript-lang/rescript/pull/8322
26+
- Fix duplicated comments in `for`..`of` formatter. https://github.com/rescript-lang/rescript/pull/8395
27+
- Fix issue where warning 56 would blow up with `dict{}` patterns. https://github.com/rescript-lang/rescript/pull/8403
28+
- Acquire rewatch build lock before initialization. https://github.com/rescript-lang/rescript/pull/8409
2429

2530
#### :memo: Documentation
2631

2732
#### :nail_care: Polish
2833

2934
- Improve default argument type mismatch errors. https://github.com/rescript-lang/rescript/pull/8389
35+
- Resolve workspace dependencies in editor analysis. https://github.com/rescript-lang/rescript/pull/8392
36+
- Build system: Add OpenTelemetry tracing support for cli commands. https://github.com/rescript-lang/rescript/pull/8370
37+
- Use a single vendored @rescript/react package across the repo. https://github.com/rescript-lang/rescript/pull/7525
38+
- Improve deprecated attribute extraction and support record form. https://github.com/rescript-lang/rescript/pull/8396
3039

3140
#### :house: Internal
3241

42+
- Remove `Primitive_option.toUndefined`; use `valFromOption` for optional ffi args. https://github.com/rescript-lang/rescript/pull/8380
43+
3344
# 13.0.0-alpha.4
3445

3546
#### :boom: Breaking Change

analysis/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For installation & build instructions, see the main CONTRIBUTING.md.
88

99
## Overview
1010

11-
See main CONTRIBUTING.md's repo structure. Additionally, `examples/` is a convenience debugging repo. Check out `test.sh` (invoked through `make test`) to see the snapshots testing workflow stored in `tests/`.
11+
See main CONTRIBUTING.md's repo structure. Check out `test.sh` (invoked through `make test`) to see the snapshots testing workflow stored in `tests/`.
1212

1313
## Usage
1414

analysis/examples/example-project/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

analysis/examples/example-project/package.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

analysis/examples/example-project/rescript.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

analysis/examples/example-project/src/B.re

Lines changed: 0 additions & 9 deletions
This file was deleted.

analysis/examples/example-project/src/Embeded.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

analysis/examples/example-project/src/Hello.res

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)