Why Tomori Is the Missing Piece in Mobile Observability
In production environments, we found that traditional APM tools left a blind spot when debugging data flows between mobile clients and microservices. Tomori closes that gap by providing deterministic tracing from a user's tap to the database commit. After evaluating a dozen open-source platforms, our team chose Tomori for its zero-configuration setup and its ability to surface root causes without manual instrumentation overhead.
The real challenge isn't collecting logs - it's correlating them across 14 different services, three SDK versions, and two CDN edge providers. Tomori's pipeline handles this by attaching a unique trace ID at the device level and propagating it through every HTTP call, WebSocket message. And background job. This approach mirrors the design principles outlined in the OpenTelemetry trace specification. But adds mobile-specific context like battery state and network type,
What Exactly Is Tomori and Why Should You Care?
Tomori is an open-source observability framework designed specifically for mobile-first architectures. Unlike APM tools that treat the mobile client as a black box, Tomori instruments the entire request lifecycle from the device's UI thread through edge workers and into backend services. Think of it as distributed tracing with full mobile context - including CPU throttling - memory pressure. And network latency profiles.
Our production data shows that 73% of performance regressions originate from changes in the mobile SDK or client-side state management, not from backend code. Traditional logging can't tie a crash to a specific GraphQL query or screen transition because the connection is broken the moment the device goes offline. Tomori solves this by buffering traces locally and replaying them via a reliable HTTP/2 channel when connectivity resumes. This architecture is similar to the offline-first pattern used by Service Workers. But applied to observability data.
How Tomori Differs from Conventional APM Solutions
Most APM tools (New Relic, Datadog, Dynatrace) were built for server-side monitoring and later retrofitted for mobile. This retrofit creates two critical gaps: session fragmentation - where the same user action splits across multiple traces - context loss - where network errors lose the parent span because the mobile device doesn't maintain an active connection. Tomori was built from scratch with mobile as a first-class citizen.
- Deterministic trace IDs: Generated on the client using a combination of device fingerprint and monotonic clock, ensuring uniqueness even offline.
- Edge-aware spans: Every CDN hit or Lambda@Edge execution gets attached to the same trace, not a separate fragment.
- Battery-aware sampling: Tomori automatically reduces trace granularity when the device is on low battery, avoiding false positives from background kills.
In our benchmarking, Tomori added only 2. 3 ms of overhead per API call on a Pixel 6, versus 18 ms for the leading competitor's SDK. The difference matters when your mobile app displays a loading spinner for every extra millisecond.
Under the Hood: Tomori's Data Pipeline and Storage Layer
Tomori uses a three-stage pipeline: collect β buffer β export. On the device, traces are stored in a LevelDB-backed local store with a configurable retention window (default 24 hours). The export stage uses HTTP/2 multiplexing to push spans to a collector service. Which can be run as a sidecar or a standalone cluster. This design avoids the "thundering herd" problem when thousands of devices come back online after a subway tunnel.
At the storage layer, Tomori recommends using ClickHouse for time-series analytics and PostgreSQL for trace metadata. Our team initially tried Elasticsearch but switched after observing 4Γ faster query responses for trace ID lookups in ClickHouse. The official Tomori documentation includes a detailed migration guide for teams moving from Elastic APM.
Real-World Case Study: Debugging a Payment Confirmation Race Condition
A FinTech client experienced a 2. 3% cart abandonment rate increase after a routine app update. Traditional APM showed no backend errors. But Tomori's client-side traces revealed that the payment confirmation UI was rendering before the server acknowledged the transaction. The device's optimistic update logic was destroying a necessary span before the WebSocket callback arrived.
Using Tomori's span timeline viewer, we identified that the payment ack event arrived 40 ms after the ui, and confirmationShown span endedThe fix was simple: delay the UI update until the server-side span completes. This regression would have taken three days to debug with conventional tools; with Tomori, we found it in 90 minutes. The fix reduced abandonment from 2. 3% to 1. 1% - directly attributable to the tomori implementation.
Integrating Tomori with Your CI/CD Pipeline
Tomori includes a CLI tool (tomori-check) that can be run in your CI pipeline to enforce observability invariants. For example, you can require that every new API endpoint is covered by at least one trace point. Or that the ratio of long traces (>10s) does not exceed 5% of total traces. Our team added a step to our GitHub Actions workflow that fails the build if any span has a missing parent ID.
We also configured tomori-check to compare trace volumes across commits. If a commit introduces 20% fewer traces than the baseline, it likely means the instrumentation was accidentally removed. This caught a production bug where a developer inlined a REST call and forgot to pass the tomori-trace-id header. The CI failure prevented the deployment from reaching staging.
Security and Privacy Considerations with Tomori
Because Tomori collects sensitive data like screen names and API payload sizes, you must think carefully about PII redaction. The SDK supports attribute masking via regular expressions - we used it to hide email addresses and credit card BIN numbers before the traces left the device. Additionally, Tomori's export channel uses mutual TLS. And the collector can be deployed inside your VPC to avoid sending data to any third party.
For GDPR compliance, Tomori provides a forgetUser(userId) API that deletes all traces associated with a given user across the entire pipeline - including buffered traces on the device (via a push notification). This is critical for applications that handle medical or financial data.
Performance Impact and Resource Usage
We measured Tomori's CPU and battery footprint on three Android devices (Pixel 6, Galaxy S22, Xiaomi Redmi Note 11) under normal usage scenarios. The SDK consumed on average 0. 74% of CPU per hour and added 12 MB to the app binary size (APK). Memory usage peaked at 4 MB during trace exports. These numbers are lower than any other open-source tracing SDK we've tested - including OpenTelemetry's Java instrumentation.
The key design decision that keeps resource usage low is Tomori's use of off-main-thread serialization. Spans are created on a dedicated background thread using a lock-free ring buffer. So UI jank is virtually eliminated. In our stress tests, we sent 1,000 traces in one second from the device; the UI maintained 60 fps throughout.
Common Pitfalls When Adopting Tomori
The most frequent mistake we see teams make is assuming Tomori replaces application logging entirely. It doesn't - it complements structured logging by providing trace context that logs can reference via trace_id. Without a proper logging strategy, you lose the ability to search for specific error messages across sessions. We recommend pairing Tomori with structured logging in the backend
Another pitfall: not configuring the maxSpansPerTrace limit (default 100). Some teams hit memory issues on low-end devices because a single long-running WebSocket connection generated thousands of spans. We set the limit to 50 for our IoT Bluetooth app and saw memory usage drop by 30%.
FAQ About Tomori
- Q: Is Tomori production-ready for iOS? - Yes, the iOS SDK has been in production since version 1, and 4It supports Swift 5. And 9 and iOS 15+We have run it in three production apps without major issues.
- Q: Can Tomori be used with React Native or Flutter? - Yes, there are community-supported bridges for both frameworks. The Flutter SDK uses a Dart FFI binding to the native Tomori library. While React Native uses a TurboModule.
- Q: How does Tomori handle data privacy regulations like CCPA? - Tomori provides a built-in data retention policy engine. You can set automatic deletion of user identifiers after 24 hours. And use the
forgetUserAPI to comply with deletion requests. - Q: What is the licensing model for Tomori? - The core SDK and collector are licensed under Apache 2. The enterprise tier (offering SLA guarantees and advanced alerting) is available under a commercial license from Tomori Inc.
- Q: Does Tomori support OpenTelemetry natively? - Yes, the exporter can send traces in OTLP format to any OTLP-compatible backend. You can also configure Tomori to receive traces from other OpenTelemetry SDKs via its HTTP endpoint.
Conclusion and Next Steps
If your mobile development team is still trying to correlate crashes with backend logs using manual timestamps, you're leaving money and user satisfaction on the table. Tomori provides the observability fabric that modern, distributed mobile architectures demand - with performance overhead so low you won't notice it until a production incident happens. Start by instrumenting your most critical user flow (e, and g, checkout, login. Or onboarding) and watch how fast your mean time to resolution drops.
Ready to try Tomori? The quickest path is to clone the Tomori SDK repository and add the dependency to your build gradle or Podfile. The documentation includes a 10-minute tutorial that walks you through capturing your first trace.
What do you think?
Should observability tools like Tomori enforce strict company-wide policies (e, and g, fail CI if a trace is missing),? Or should they remain purely advisory to avoid slowing down developer velocity?
Given the added complexity of trace instrumentation, do you believe the average mobile team should adopt distributed tracing,? Or is it only justified for teams of 10+ developers working on high-stakes transactions?
How should the open-source community balance the need for offline-first trace buffering with the risk of data loss on devices that never reconnect to the network? Is a best-effort approach acceptable?
.Need a Custom App Built?
Let's discuss your project and bring your ideas to life.
Contact Me Today β