AmbientContext

An immutable snapshot of a ScopeStack: the accumulated scope defaults plus the effective screen / section. Use enrich to apply it to an event's properties.

Properties

Link copied to clipboard
val scope: JsonObject
Link copied to clipboard
Link copied to clipboard

Whether a masked frame (ScopeStack.setScreenMasked) is what left screen null — i.e. the surface on display asserts it has no screen, rather than simply never having named one.

Link copied to clipboard

The visit of screen this context belongs to (#242): the id the Screen Viewed that started the visit carried, for Autograph's capture pipelines to attach to the events they capture during it. It comes from the frame that names screen, so it is never another screen's.

Link copied to clipboard

Functions

Link copied to clipboard
fun enrich(properties: Map<String, JsonElement>): JsonObject

Returns properties enriched with this context: scope merged underneath (so an explicit property in properties wins over a scope default), then screen / section written on top under those reserved keys (overwriting any same-named entry) — the same precedence the Compose path applies via its scope decorator and withScreenContext.