Keep in mind that a trap can exist in a game as one of several forms:
As an alternative form of puzzle, a trap is sometimes a fun encounter. In order for this to work, the players must be aware that the trap is there and need to be able to glean some information about how the trap works based on your description. Death traps are only acceptable here.
As a supplement to an encounter, a trap is something used to make an encounter more difficult or more interesting. Fighting the vampiric dragonkin is cool, yes, but doing so when his spells are exclusively variations on shatter and disintegrate and you're fighting on a searing-hot floating island in the midst of a magma sea is interesting (I'm treating the damaging environment as the trap). Or, fighting the enemy archers would be a simple matter, except that a gas fills the chamber, lowering the players' dexterity so that they cannot respond in kind. This sort of placement is a way to make people consider different tactical options than they've gotten used to.
As a well-hidden source of almost-inevitable damage, a trap is useful only to demonstrate that someone or something in-game is a total douchebag. Mage McMageypants, the BBEG fights the players and loses. The players take their hard-earned spoils and find his spellbook. On the front cover is a symbol of insanity, which causes the party to kill each other down to two members. What did this accomplish? It was something that was either found (and presumably disarmed easily), or not (in which case, many people die). From the perspective of the players, neither result is satisfying. If found, it was just a source of easy experience. If not, then it was an inevitable effect that the party couldn't really fight against. Challenging things are really only satisfying when you can beat them. As DMs, we do terrible things to our players to make it so that the ones who survive feel epic. There's no ultimate victory over something that happens without warning and then is gone.
I've come along a grand circle from the early days of my D&D experiences.