Skip to content

Add internal Checkout Kit telemetry foundations - #674

Open
tiagocandido wants to merge 1 commit into
mainfrom
telemetry/metrics-foundation
Open

Add internal Checkout Kit telemetry foundations#674
tiagocandido wants to merge 1 commit into
mainfrom
telemetry/metrics-foundation

Conversation

@tiagocandido

Copy link
Copy Markdown
Contributor

Summary

  • Define the bounded metric and privacy contract used by Checkout Kit integrations
  • Keep every implementation internal to Checkout Kit:
    • Kotlin lives inside the Android library and is no longer a separate published module
    • Swift uses package visibility and no longer exposes a telemetry library product
    • TypeScript exposes only the Web-facing factory, client interface, and protocol-method normalizer
  • Align metric model naming across Swift, Kotlin, and TypeScript while retaining language-idiomatic lifecycle APIs
  • Standardize OTLP resources:
    • service.name=checkout-kit
    • service.version=<Checkout Kit version>
    • telemetry.sdk.language=java|swift|webjs
    • telemetry.sdk.name=checkout-kit-telemetry
    • telemetry.sdk.version=<Checkout Kit version>
  • Add closed identity dimensions to every metric:
    • product=checkout_kit|accelerated_checkouts|customer_auth
    • platform=android|swift|web|react-native-android|react-native-swift
    • Identity attributes are merged last in all three clients so metric attributes can never shadow them
  • Distinguish retry-attempt errors with the bounded is_retry attribute
  • Define initial main-frame navigation timing and keep-alive connection-loss semantics in the contract
  • Keep bounded buffering, deterministic payloads, backoff, shutdown isolation, and runtime value normalization
  • Let keepalive flushes bypass export backoff so page-terminal flushes are not silently dropped
  • Wire telemetry into CI: changed-file filters cover the telemetry packages and the web workflow runs the TypeScript telemetry checks

Validation

  • TypeScript telemetry typecheck and unit tests
  • Android full unit suite, Detekt, and public API compatibility check
  • Swift full unit test suite
  • Web unit tests and package checks

@tiagocandido
tiagocandido requested a review from a team as a code owner August 18, 2026 15:01
@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 91%
90.97% (363/399) 87.29% (213/244) 100% (92/92)

@github-actions

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 96%
94.62% (299/316) 81.72% (152/186) 98.71% (77/78)

@github-actions

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Web npm tarball 70.6 KiB 70.6 KiB +11 B
React Native npm tarball 107.3 KiB 107.3 KiB 0 B
Android release AAR 279.8 KiB 338.6 KiB +58.8 KiB
Web file breakdown
File Base Head Delta
dist/index.js.map 192.2 KiB 192.2 KiB 0 B
dist/index.d.ts 44.9 KiB 44.9 KiB 0 B
dist/custom-elements.json 44.0 KiB 44.0 KiB 0 B
dist/index.js 31.5 KiB 31.5 KiB 0 B
README.md 19.0 KiB 19.0 KiB 0 B
package.json 2.8 KiB 2.9 KiB +48 B
LICENSE 1.1 KiB 1.1 KiB 0 B
React Native file breakdown
File Base Head Delta
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.ts 85.4 KiB 85.4 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.d.ts 53.0 KiB 53.0 KiB 0 B
android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java 16.0 KiB 16.0 KiB 0 B
ios/ShopifyCheckoutKit.swift 15.9 KiB 15.9 KiB 0 B
ios/AcceleratedCheckoutButtons.swift 14.1 KiB 14.1 KiB 0 B
src/components/AcceleratedCheckoutButtons.tsx 13.0 KiB 13.0 KiB 0 B
src/index.ts 12.7 KiB 12.7 KiB 0 B
lib/commonjs/index.js 12.4 KiB 12.4 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js 11.4 KiB 11.4 KiB 0 B
src/index.d.ts 11.1 KiB 11.1 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js.map 10.4 KiB 10.4 KiB 0 B
lib/module/index.js 10.4 KiB 10.4 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js 10.2 KiB 10.2 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.ts 9.5 KiB 9.5 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js.map 9.1 KiB 9.1 KiB 0 B
lib/module/index.js.map 8.1 KiB 8.1 KiB 0 B
src/present-dispatcher.ts 8.0 KiB 8.0 KiB 0 B
lib/commonjs/index.js.map 7.9 KiB 7.9 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.d.ts 7.6 KiB 7.6 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolRenameMap.ts 7.2 KiB 7.2 KiB 0 B
…and 117 smaller files
Android file breakdown
File Base Head Delta
classes.jar 295.6 KiB 359.5 KiB +63.9 KiB
res/layout/checkout_view_content.xml 2.6 KiB 2.6 KiB 0 B
res/layout/checkout_sheet_content.xml 2.0 KiB 2.0 KiB 0 B
res/values/values.xml 1.3 KiB 1.3 KiB 0 B
R.txt 1.2 KiB 1.2 KiB 0 B
AndroidManifest.xml 922 B 922 B 0 B
proguard.txt 798 B 798 B 0 B
res/drawable/close.xml 431 B 431 B 0 B
res/menu/checkout_menu.xml 354 B 354 B 0 B
META-INF/com/android/build/gradle/aar-metadata.properties 157 B 157 B 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@bitrise

bitrise Bot commented Aug 18, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
React Native Install with Tophat
Swift Install with Tophat
Kotlin Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
react-native-ios react-native ios latest iPhone 15
iOS 27 Beta
react-native-android react-native android latest Google Pixel 9
Android 17.0
kotlin-android kotlin android latest Google Pixel 9
Android 17.0
swift-ios swift ios latest iPhone 15
iOS 27 Beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant