Test mode for SDK instrumentation
Test mode marks SDK events with isTestMode: true so teams can validate instrumentation before releasing it to real users. Use it when adding the SDK, changing an event taxonomy, testing a new paywall, or verifying a revenue-provider integration. Test events should appear in live debugging and setup flows without being treated as production traffic.
Enable test mode in the SDK
Turn test mode on in local builds, TestFlight, internal app sharing, or development flavors. Keep the production ingest URL and use a test ingest key when possible, so delivery behavior matches production while the data remains clearly separated.
// SwiftAppMetricsConfiguration( ingestURL: url, ingestKey: key, testMode: true)
// KotlinAppMetricsConfig( ingestUrl = url, ingestKey = key, testMode = true)What test mode changes
- Events are accepted by the ingest endpoint and visible in live debugging.
- Events are marked separately from production events for filtering and setup verification.
- Privacy checks still run, so unsafe payload keys are caught before release.
- Test events do not enter production rollups, alerts, or billable event counts.
- Use Live Events to confirm event names, payloads, and SDK metadata before switching to live mode.
Manual ingest check
If an SDK integration is hard to debug, send a single test event with curl. This separates server connectivity from app lifecycle code. After the request succeeds, open Live Events and confirm that App.launch appears with the test-mode filter enabled.
curl -X POST https://appmetricskit.com/api/ingest \ -H "Authorization: Bearer amk_test_..." \ -H "Content-Type: application/json" \ -d '{ "events": [{ "eventName": "App.launch", "eventId": "local-test-1", "isTestMode": true, "payload": { "source": "local-debug" } }] }'Release checklist
- Install the iOS or Android SDK and configure a test ingest key.
- Send
App.launch, one onboarding event, one paywall event, and one purchase test event. - Open Live Events and confirm that event names, payload keys, platform, app version, and test-mode status look correct.
- Open the privacy audit and fix any risky payload keys before shipping.
- Switch to the live ingest key and set
testMode: falseonly for production release builds.