Converts a list of ScoutApm.Internal.Context types into an appropriate data structure to serialize via Poison.encode!