Of William Shakespeare's plays, A Midsummer Night's Dream is the one most often discussed in terms of metadrama, both due to the the presence of the "play within a play" and due to the way the dialogue comments on the nature of poetry and the imagination.
In literary criticism, the term metadrama is used to refer to breaking the illusion of the fourth wall in words or staging that overtly reference a play's own theatrically. Thus subplot concerning the rustics' efforts to prepare to perform "Pyramus and Thisbe," because it contains overt reference to the theatrical craft and serves as a comic mirror to the play we are watching, is a form of metadrama.
The ending of the play emphasizes this sense of metadrama as well, when Theseus comments on the nature of poetry (a term which would, at this period, include dramatic poetry):
The poet's...imagination bodies forth
The forms of things unknown,
... and gives to airy nothing
A local habitation and a name.
The very last monologue by Puck also breaks the barrier of the fourth wall by directly addressing the audience, reassuring them that the play they have just watched is a mere dreamlike vision or illusion, rather than a reality, and the actors mere shadows creating an "idle theme" for their entertainment.