Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bbc6764
ci: collector compliance, nightly matrix, release flow and v0 docs
adhorodyski Nov 25, 2026
ab74755
docs: web is bundled with Metro; drop Vite from the spec, plan and gu…
adhorodyski Nov 25, 2026
00d0484
docs(verify): VERIFY.md for the whole pipeline
adhorodyski Nov 25, 2026
7cbd2cb
docs: the export URL is used as given; no bundle-size check; JS reads…
adhorodyski Nov 25, 2026
85a40d6
docs(verify): the seam runner; smoke-js is gone
adhorodyski Nov 25, 2026
9705a25
docs: the degraded probe is a unit test; no degraded Jest project
adhorodyski Nov 25, 2026
7962056
docs(verify): core-jvm uses the example's Gradle wrapper; the iOS tim…
adhorodyski Nov 25, 2026
09ddca2
docs: native cores are proven on devices; no host-side replay
adhorodyski Nov 25, 2026
7a38f9d
docs: the Android core reads Nitro's structs; why iOS keeps its own s…
adhorodyski Nov 25, 2026
1f19801
docs: on iOS the adapter builds SpanData from Nitro's structs
adhorodyski Nov 25, 2026
a3ee6ed
build(ios): read the distro version from package.json at pod install;…
adhorodyski Nov 25, 2026
a2d2696
chore(release)!: releases stay manual, as on main
adhorodyski Nov 25, 2026
08c7277
ci!: the matrix runs on every push to main, on pinned versions only
adhorodyski Nov 25, 2026
f6a778c
chore!: pin OTel exactly; no comments in code
adhorodyski Nov 25, 2026
75c99f9
ci!: drop the main matrix; React Native 0.88 is the minimum
adhorodyski Nov 25, 2026
32fbd45
ci!: drop compliance, perf-budget and the test-mode-off smoke; restor…
adhorodyski Nov 25, 2026
3b032e5
fix(example): the Collector example works for every example app; Jaeg…
adhorodyski Nov 25, 2026
41f02dc
docs: drop MIGRATION.md; the README keeps its original voice, updated…
adhorodyski Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": true,
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
8 changes: 8 additions & 0 deletions .changeset/v0-tracing-rewrite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"react-native-open-telemetry": minor
---

v0: a rewrite around one trace across JS and native. Native-first init (`RNOtel.start` on Android and iOS) with a JS
fallback (`startReactNativeSdk`), a context patch that carries the active span through `await`, promises and timers,
and a `withOtel` helper for Metro. Removed (breaking): metrics, fetch instrumentation, session tagging and
the `openTelemetrySDK` init.
98 changes: 27 additions & 71 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,15 @@ jobs:
java-version: '17'
- run: bun install --frozen-lockfile
- run: bun run prepare
- run: bun verify # every non-e2e stage (R17)
- run: bun verify
- uses: actions/upload-artifact@v4
if: always()
with:
name: verify-artifacts-static-fast
path: verify/artifacts/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir
include-hidden-files: true

# Release builds with the JS bundle embedded (no Metro), test mode on; the bare jobs also build test mode off for
# smoke-device (per PR on bare only, X11 interim; Expo smoke goes to the nightly). perf-budget runs on android-bare.
# Every Task 27 failure scenario runs here except fast-refresh-idempotent: it needs dev builds + Metro, so it is
# local only (verify/VERIFY.md), no per-PR jobs; a nightly can add it.
# Native outputs are cached on native inputs only, so a JS-only change re-bundles but reuses the native build.
e2e-android-bare:
runs-on: ubuntu-latest
timeout-minutes: 45
Expand All @@ -69,7 +64,7 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun install --frozen-lockfile
working-directory: example
- run: bun run prepare # the example bundles the package through exports -> lib/ (R4)
- run: bun run prepare
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand All @@ -89,19 +84,10 @@ jobs:
example/node_modules/react-native-nitro-modules/android/build
example/node_modules/react-native-nitro-modules/android/.cxx
key: android-native-${{ hashFiles('android/**', 'nitrogen/**', 'patches/**', 'example/android/**', 'example/modules/**', 'bun.lock', 'example/bun.lock') }}
# smoke-device (R20, X11): the production pipeline needs a test-mode-off build. Built first, so the test-mode
# build is what the native outputs cache keeps; the switch recompiles only Kotlin and the bundle.
- name: Build release APK (smoke, test mode off)
working-directory: example/android
run: |
./gradlew :app:assembleRelease -PreactNativeArchitectures=x86_64 ||
./gradlew :app:assembleRelease -PreactNativeArchitectures=x86_64
cp app/build/outputs/apk/release/app-release.apk '${{ runner.temp }}/smoke.apk'
- name: Build release APK (test mode)
working-directory: example/android
env:
OTEL_TEST_MODE: '1'
# one retry: plugin and NDK downloads fail transiently on hosted runners
run: |
./gradlew :app:assembleRelease -PotelTestMode=true -PreactNativeArchitectures=x86_64 ||
./gradlew :app:assembleRelease -PotelTestMode=true -PreactNativeArchitectures=x86_64
Expand All @@ -125,7 +111,7 @@ jobs:
disable-animations: false
script: echo "AVD snapshot created"
- name: e2e (android-bare)
timeout-minutes: 25 # a hung device run fails here, not at the job limit
timeout-minutes: 25
uses: reactivecircus/android-emulator-runner@v2
env:
E2E_TARGET: android-bare
Expand All @@ -138,18 +124,16 @@ jobs:
disable-animations: true
script: |
adb shell settings put global hide_error_dialogs 1
# one line (the runner runs each line in its own shell and stops at the first failure): smoke runs even
# when the main e2e failed, and the step exits with the first non-zero code
bun verify --e2e e2e; a=$?; E2E_SMOKE=1 E2E_ANDROID_APP='${{ runner.temp }}/smoke.apk' bun verify --e2e e2e; b=$?; exit $(( a ? a : b ))
bun verify --e2e e2e
- uses: actions/upload-artifact@v4
if: always() # e2e retries once; keep traces of retried and failed attempts
if: always()
with:
name: verify-artifacts-e2e-android-bare
path: |
verify/artifacts/
verify/e2e/.e2e/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir
include-hidden-files: true

e2e-ios-bare:
runs-on: xcode-27
Expand All @@ -165,7 +149,7 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun install --frozen-lockfile
working-directory: example
- run: bun run prepare # the example bundles the package through exports -> lib/ (R4)
- run: bun run prepare
- name: Cache Swift packages
uses: actions/cache@v4
with:
Expand All @@ -178,19 +162,6 @@ jobs:
example/ios/Pods
example/ios/build/Build
key: ios-native-${{ hashFiles('ios/**', 'nitrogen/**', 'ReactNativeOpenTelemetry.podspec', 'ReactNativeOpenTelemetryCore.podspec', 'example/ios/Podfile', 'example/ios/Podfile.lock', 'example/ios/OpenTelemetryExample/**', 'example/ios/OpenTelemetryExample.xcodeproj/**', 'example/modules/**', 'bun.lock', 'example/bun.lock') }}
# smoke-device (R20, X11): a test-mode-off build, first, so the cache keeps the test-mode one; the switch
# recompiles only the core pod, the adapter and the app.
- name: pod install (smoke, test mode off)
working-directory: example/ios
run: pod install
- name: Build release app (smoke, test mode off)
id: ios-smoke-build
working-directory: example/ios
run: |
xcodebuild -workspace OpenTelemetryExample.xcworkspace -scheme OpenTelemetryExample \
-configuration Release -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' \
-derivedDataPath build ARCHS=arm64 build
cp -R build/Build/Products/Release-iphonesimulator/OpenTelemetryExample.app '${{ runner.temp }}/'
- name: pod install (test mode)
working-directory: example/ios
env:
Expand All @@ -210,23 +181,14 @@ jobs:
xcrun simctl boot "$udid"
xcrun simctl bootstatus "$udid" -b
- name: e2e (ios-bare)
timeout-minutes: 30 # a hung device run fails here, not at the job limit
timeout-minutes: 30
env:
E2E_TARGET: ios-bare
AGENT_DEVICE_DAEMON_STARTUP_TIMEOUT_MS: '600000' # the first daemon start on a cold runner outlasts the 120 s default
run: bun verify --e2e e2e
- name: e2e smoke (ios-bare, test mode off)
timeout-minutes: 10 # a hung device run fails here, not at the job limit
# also after a failed main e2e (that step already fails the job)
if: ${{ !cancelled() && steps.ios-smoke-build.outcome == 'success' }}
env:
E2E_TARGET: ios-bare
E2E_SMOKE: '1'
AGENT_DEVICE_DAEMON_STARTUP_TIMEOUT_MS: '600000'
run: E2E_IOS_APP='${{ runner.temp }}/OpenTelemetryExample.app' bun verify --e2e e2e
run: bun verify --e2e e2e
- name: Diagnose the simulator log
if: failure()
timeout-minutes: 4 # `log show` scans the whole store: ~1 min per call on a runner
timeout-minutes: 4
run: |
echo "--- RNOtel lines"; xcrun simctl spawn booted log show --last 10m --info --style compact --predicate 'eventMessage CONTAINS "RNOtel"' | tail -20
echo "--- app process lines"; xcrun simctl spawn booted log show --last 10m --info --style compact --predicate 'process == "OpenTelemetryExample"' | tail -20
Expand All @@ -239,18 +201,15 @@ jobs:
if-no-files-found: ignore
include-hidden-files: true
- uses: actions/upload-artifact@v4
if: always() # e2e retries once; keep traces of retried and failed attempts
if: always()
with:
name: verify-artifacts-e2e-ios-bare
path: |
verify/artifacts/
verify/e2e/.e2e/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir
include-hidden-files: true

# The Expo app (Task 28): JS-fallback init, CNG (`expo prebuild` every run; android/ and ios/ are not committed),
# same scenarios and the same android/ios expected files as the bare app. Test mode: OTEL_TEST_MODE=1 at prebuild
# (the local config plugin writes otelTestMode=true to gradle.properties) and at pod install.
e2e-android-expo:
runs-on: ubuntu-latest
timeout-minutes: 45
Expand All @@ -266,7 +225,7 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun install --frozen-lockfile
working-directory: example-expo
- run: bun run prepare # the app bundles the package through exports -> lib/ (R4)
- run: bun run prepare
- name: expo prebuild (test mode)
working-directory: example-expo
env:
Expand All @@ -280,7 +239,7 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
- name: Enable the Gradle build cache (setup-gradle persists it)
run: printf '\norg.gradle.caching=true\n' >> example-expo/android/gradle.properties
- name: Cache native build outputs # after prebuild, which regenerates android/
- name: Cache native build outputs
uses: actions/cache@v4
with:
path: |
Expand All @@ -295,7 +254,6 @@ jobs:
working-directory: example-expo/android
env:
OTEL_TEST_MODE: '1'
# one retry: plugin and NDK downloads fail transiently on hosted runners
run: |
./gradlew :app:assembleRelease -PreactNativeArchitectures=x86_64 ||
./gradlew :app:assembleRelease -PreactNativeArchitectures=x86_64
Expand All @@ -319,7 +277,7 @@ jobs:
disable-animations: false
script: echo "AVD snapshot created"
- name: e2e (android-expo)
timeout-minutes: 25 # a hung device run fails here, not at the job limit
timeout-minutes: 25
uses: reactivecircus/android-emulator-runner@v2
env:
E2E_TARGET: android-expo
Expand All @@ -334,14 +292,14 @@ jobs:
adb shell settings put global hide_error_dialogs 1
bun verify --e2e e2e
- uses: actions/upload-artifact@v4
if: always() # e2e retries once; keep traces of retried and failed attempts
if: always()
with:
name: verify-artifacts-e2e-android-expo
path: |
verify/artifacts/
verify/e2e/.e2e/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir
include-hidden-files: true

e2e-ios-expo:
runs-on: xcode-27
Expand All @@ -357,11 +315,11 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun install --frozen-lockfile
working-directory: example-expo
- run: bun run prepare # the app bundles the package through exports -> lib/ (R4)
- run: bun run prepare
- name: expo prebuild
working-directory: example-expo
run: bunx expo prebuild --clean --no-install --platform ios
- name: Cache native build outputs # after prebuild, which regenerates ios/
- name: Cache native build outputs
uses: actions/cache@v4
with:
path: |
Expand All @@ -388,10 +346,10 @@ jobs:
xcrun simctl boot "$udid"
xcrun simctl bootstatus "$udid" -b
- name: e2e (ios-expo)
timeout-minutes: 30 # a hung device run fails here, not at the job limit
timeout-minutes: 30
env:
E2E_TARGET: ios-expo
AGENT_DEVICE_DAEMON_STARTUP_TIMEOUT_MS: '600000' # the first daemon start on a cold runner outlasts the 120 s default
AGENT_DEVICE_DAEMON_STARTUP_TIMEOUT_MS: '600000'
run: bun verify --e2e e2e
- uses: actions/upload-artifact@v4
if: failure()
Expand All @@ -401,17 +359,15 @@ jobs:
if-no-files-found: ignore
include-hidden-files: true
- uses: actions/upload-artifact@v4
if: always() # e2e retries once; keep traces of retried and failed attempts
if: always()
with:
name: verify-artifacts-e2e-ios-expo
path: |
verify/artifacts/
verify/e2e/.e2e/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir
include-hidden-files: true

# The Expo app's Metro web export (react-native-web) and the web SDK, headless Chromium.
# The runner exports the app in test mode and serves it (e2e.config.ts `command`).
e2e-web:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand All @@ -423,7 +379,7 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun install --frozen-lockfile
working-directory: example-expo
- run: bun run prepare # the web app resolves the package through exports -> lib/ (browser condition)
- run: bun run prepare
- run: bunx e2e-web install chromium --with-deps
- run: bun verify --e2e e2e
env:
Expand All @@ -436,10 +392,10 @@ jobs:
verify/artifacts/
verify/e2e/.e2e/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir
include-hidden-files: true

budget:
needs: [static-fast, e2e-android-bare, e2e-ios-bare, e2e-android-expo, e2e-ios-expo, e2e-web] # every other job; extend when jobs are added
needs: [static-fast, e2e-android-bare, e2e-ios-bare, e2e-android-expo, e2e-ios-expo, e2e-web]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ android/generated
.superpowers/
verify/artifacts/
verify/e2e/.e2e/

ios/RNOtel/PackageVersion.swift
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,14 @@ We follow the [conventional commits specification](https://www.conventionalcommi

We use [TypeScript](https://www.typescriptlang.org/) for type checking and [OXLint](https://oxc.rs/docs/guide/usage/linter.html) for linting and formatting the code.

### Publishing to npm 🚧
### Publishing to npm

We use [changesets](https://github.com/changesets/changesets) for managing versions, though this is a manual process for now in the experimental phase.
We use [changesets](https://github.com/changesets/changesets). Releases are manual:

1. Add a changeset (`bunx changeset`) in your PR.
2. To release, check that CI is green on `main`, then run `bun run version` on `main`
(bumps `package.json` and writes `CHANGELOG.md`), review and commit it.
3. `bun run publish` (`changeset publish`) builds through `prepare` and publishes to npm.

### Scripts

Expand Down
Loading
Loading