A cannula assembly includes a tubular element forming a lumen, a deployable portion of the tubular element, and an electronic component mounted to the deployable portion of the tubular element. The tubular element has a proximal end and a distal end adapted to be inserted into a body cavity. The deployable portion of the tubular element is engaged near the distal end of the tubular element so as to transition between a closed position and an open position. The electronic component is at least partially disposed in the lumen when the deployable portion is in the closed position.