EventMapper - DataDog/dd-sdk-android GitHub Wiki
fun interface EventMapper<T : Any>
An interface which can be implemented to modify the writable attributes inside an event T.
Inheritors
NoOpEventMapper |
Functions
map
abstract fun map(event: T): T?
By implementing this method you can intercept and modify the writable attributes inside any event T before it gets serialised.
Return
the modified event T or NULL
Please note that if you return NULL from this method the event will be dropped and will not be serialised. If the object returned has a different reference than the object which was passed to the function, it will be dropped as well.
Parameters
event | the event to be serialised |