Add types for lifecycle events.

Additionally, "Failure" to me implies that the application terminated with a signal or non-zero exit code.