withEventMetadata
fun Map<String, JsonElement>.withEventMetadata(kind: String?, impressionMinDurationMs: Long? = null, impressionMinFractionVisible: Double? = null, screenViewId: String? = null): JsonObject
These properties with the library's EventMetadata written on top under RESERVED_METADATA_KEY, for Autograph's own emit sites. Apply it last, after any scope merge, so the emit site's value is the one the tracker reads; whatever was under the key before is replaced.
Built from EventMetadata.toJson, so the shape the tracker parses back and the shape written to context.instrumentation cannot drift apart. Encoded as a string, for the reason given on RESERVED_METADATA_KEY.