private void autoSetMissingValues ( ) { // Ensure that a timestamp is set (to now at least!) if ( event . getTimestamp ( ) == null ) { event . setTimestamp ( new Date ( ) ) ; } // Ensure that a platform is set if ( event . getPlatform ( ) == null ) { event . setPlatform ( DEFAULT_PLATFORM ) ; } // Ensure that an SDK is set if ( event . getSdk ( ) == null ) { event . setSdk ( new Sdk ( SentryEnvironment . SDK_NAME , SentryEnvironment . SDK_VERSION , sdkIntegrations ) ) ; } // Ensure that a hostname is set if ( event . getServerName ( ) == null ) { event . setServerName ( HOSTNAME_CACHE . getHostname ( ) ) ; } }
Sets default values for each field that hasn t been provided manually .