Skip to content

Commit 6f15d86

Browse files
adhorodyskiclaude
andcommitted
test(e2e): example apps export to the full traces URL
The export URL is now used as given on every platform, so the bare and Expo apps pass `…:4318/v1/traces`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 84a3803 commit 6f15d86

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎example-expo/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {ScenariosScreen} from '../example/src/ScenariosScreen';
88
startReactNativeSdk({
99
serviceName: 'verify',
1010
exportConfig: {
11-
url: Platform.OS === 'android' ? 'http://10.0.2.2:4318' : 'http://localhost:4318',
11+
url: Platform.OS === 'android' ? 'http://10.0.2.2:4318/v1/traces' : 'http://localhost:4318/v1/traces',
1212
headers: {'x-api-key': 'test'}, // asserted by verify/e2e/export-headers.e2e.ts
1313
},
1414
});

‎example/android/app/src/main/java/opentelemetry/example/OtelInit.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal fun Application.startOtel() {
1313
RNOtel.start(this) {
1414
serviceName = "verify"
1515
export {
16-
url = testExportUrl() ?: "http://10.0.2.2:4318" // the e2e collector on the host
16+
url = testExportUrl() ?: "http://10.0.2.2:4318/v1/traces" // the e2e collector on the host
1717
headers = mapOf("x-api-key" to "test") // asserted by verify/e2e/export-headers.e2e.ts
1818
}
1919
}

‎example/ios/OpenTelemetryExample/AppDelegate.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func startOtel() {
1818
RNOtel.start { c in
1919
c.serviceName = "verify"
2020
// the e2e collector on the host; asserted by verify/e2e/export-headers.e2e.ts
21-
c.export = .init(url: testExportUrl() ?? "http://localhost:4318", headers: ["x-api-key": "test"])
21+
c.export = .init(url: testExportUrl() ?? "http://localhost:4318/v1/traces", headers: ["x-api-key": "test"])
2222
}
2323
// compile check: the otel API is part of RNOtel's public surface (a no-op tracer is cheap to build)
2424
_ = RNOtel.tracer("opentelemetry.example")

0 commit comments

Comments
 (0)