Context for error tracking.

Hi! I’m interested in writing an error tracking library.
For that, I’d like to know how can I get context of the game at the time of an error.

Image for example I’m initializing the game within a try/catch block. What API can I use to extract general information about the game’s state and the device it’s running?

using (var game = new Game1())
{
    try
    {
        game.Run();
    }
    catch (Exception e)
    {
        // ... What could I call here to get useful information to troubleshoot the game crash?

        // For example:
        Console.WriteLine($"The GPU is: {game.GraphicsDevice}");
    }
}