The native SDKs Cocoa and Android have auto instrumentation, which doesn't add any spans to the hybrid SDK transaction, such as HTTP, DB, and file IO. This issue aims to pass these auto-instrumented spans from the native layers to the hybrid SDKs.
We (@krystofwoldrich and @philipphofmann) hacked together a POC for HTTP spans from Cocoa to RN. You can visit the code on Cocoa and RN and the internal Notion doc. The approach we chose is to keep HTTP spans in a cache on Cocoa and request these spans from RN when a transaction finishes.
Hybrid SDKs only add spans from the native SDKs for transactions bound to the scope. The hybrid SDKs have to communicate to the native SDKs when to start collecting spans, which is when they start a transaction bound to the scope. When the hybrid SDKs finish a transaction, they tell the native SDK to stop collecting spans, request them, and put them on the hybrid transaction.
This approach is future-proof considering single-span ingestion, as active spans will behave as transactions bound to the scope.
The native SDKs Cocoa and Android have auto instrumentation, which doesn't add any spans to the hybrid SDK transaction, such as HTTP, DB, and file IO. This issue aims to pass these auto-instrumented spans from the native layers to the hybrid SDKs.
We (@krystofwoldrich and @philipphofmann) hacked together a POC for HTTP spans from Cocoa to RN. You can visit the code on Cocoa and RN and the internal Notion doc. The approach we chose is to keep HTTP spans in a cache on Cocoa and request these spans from RN when a transaction finishes.
Hybrid SDKs only add spans from the native SDKs for transactions bound to the scope. The hybrid SDKs have to communicate to the native SDKs when to start collecting spans, which is when they start a transaction bound to the scope. When the hybrid SDKs finish a transaction, they tell the native SDK to stop collecting spans, request them, and put them on the hybrid transaction.
This approach is future-proof considering single-span ingestion, as active spans will behave as transactions bound to the scope.
Related RFC: https://github.com/getsentry/rfcs/pull/131.
Open todos