DebugTransport
Wraps delegate, logging every event before delivering it — for eyeballing outgoing events on a real device/build during manual QA, separate from the app's production transport. Not connected to a warehouse or any assertion tooling (see the planned autograph-test module for unit-test assertions instead).
The default log (println) dumps every event's full properties/traits — do not wrap a production transport with this in a release build, since that can leak PII into device/console logs. Gate its use behind a debug-build check, or supply a log that redacts what it prints.
val tracker = Autograph {
transport(DebugTransport(SegmentTransport(analytics)))
}When delegate stamps in its own pipeline (Transport.stampsInPipeline), the envelope isn't known yet at the point this wrapper sees the event (the delegate stamps it later, inside its own pipeline) — the logged line shows envelope=null in that case, matching what delegate itself receives.
It is a MetadataAwareTransport, so wrapping a pipeline transport does not hide that capability from the tracker: an event's EventMetadata is logged and forwarded when delegate is one too. When delegate is a pipeline transport that is not, the tracker looks through this wrapper and treats the pair exactly as it treats delegate alone: the event is delivered without its metadata, and AutographConfig.logger is told once.
Properties
True when this transport calls EnvelopeSource.stamp inside its own pipeline. In that case the core passes envelope = null to the event methods and the transport is responsible for stamping every event exactly once.
Functions
Called once during setup, before any events are sent.
A transport that runs transform on every event before handing it to this one: to redact a property, add one, or drop the event (return null) for sampling (#302).
Delivers a screen view exactly as Transport.screen would, and adds metadata to the envelope the transport stamps for it. properties no longer contain RESERVED_METADATA_KEY.
Delivers an event exactly as Transport.track would, and adds metadata to the envelope the transport stamps for this event. properties no longer contain RESERVED_METADATA_KEY.