Hi,
There are a couple of ways to check if an instance of App Engine is up and running however they are all external to the app itself. Based on my research, it seems that what you are looking for is not available on App Engine at the moment and due to that I would recommend that you file a feature request via this page.
Please provide more information about the use case and the end result that you are trying to achieve. This will help our App Engine engineering team narrow down exactly how the feature should be implemented.
One of the ways to check externally if an instance is running, would be to use the LIST and GET methods of the apps.services.versions.instances REST resource of the App Engine Admin API.
The idea here would be to fetch the name of the instance via LIST and then use GET to obtain the Availability status of the instance. If the status is “Resident” or “Dynamic” it would mean that the instance is currently running. You could then use this to trigger an action in Cloud Datastore.