Client-side telemetry layer that Instagram apps send to graph.instagram.com/pigeon_nest. Used for profile visits, video/reel view counts, session and launcher events, push stats, and other signals the real app emits.
Integrated into @igpapi/android and @igpapi/ios runtimes — the actions that instrument a sequence (profile visits and the like) send their own Pigeon batches as part of running that action, best-effort.
yarn add @igpapi/pigeon-nest
videoViewSequence, and more in events/* — pre-built sequences that match real Instagram trafficpigeonSendInfraBatches, pigeonSendEvents — log the events and dispatch them as batchespigeonFlush — the delivery behind the FlushTelemetry effect (@igpapi/mobile); low-level pigeonSend for building your own sequencesPigeonDelivery — a batch of the Pigeon channel taken from the process's one telemetry store (TakeTelemetry), not a store of its ownTelemetryFlushResult ({ events }) and TelemetryDeliveryError ({ channel, events, reason } plus the response status, the transport cause, or neither for a session refusal)Through @igpapi/android or @igpapi/ios actions that need Pigeon events (profile visits, video view counts, and so on) log and send their own batches, best-effort: a rejected upload never fails the action and leaves its events in the store. The infrastructure batch that starts the session is a brick the caller runs itself — pigeonSendInfraBatches; no flow of the library sends it.
Everything accumulated is delivered by the explicit FlushTelemetry effect (pigeonFlush), which reports { events } and fails with TelemetryDeliveryError after putting the failed batch back, so the next flush sends the same events. A channel delivered before a failing one keeps its events sent — the error names the channel that failed.
The flush sends only into the Pigeon session the process began at startup: pigeonInit starts it, and pigeonSendInfraBatches runs it first. A process that never began it gets TelemetryDeliverySessionError (reason: 'session') and its batch stays in the store — no recording covers an upload without the session. An empty flush sends nothing, with or without a session.
Events are logged with EmitTelemetry into MobileTelemetry, the process's one telemetry store, on the pigeon channel. The store gives each event its own identity and the real time it was logged; a Pigeon batch takes only the pigeon events and never another delivery's, and a failed send puts its batch back so the retry sends the same identities. A caller that composes its own Effect flow must provide the MobileTelemetry service in its layer (the Android and iOS runtimes provide it). For direct access to event builders and sequences — import from @igpapi/pigeon-nest and compose your own Effect flow.
@igpapi/android / @igpapi/ios — runtimes that integrate pigeon automatically