How do traps affect encounter design budgets?

When you’re designing an encounter and you plan on traps being part of it, how do you calculate the CR of that? Does 5e take that into account some where? Or do I just ignore it and calculate the monsters only?