 Samsara Inc. shares rallied in the extended session Wednesday after the cloud-based operations platform reported a better-than-expected outlook and results in its first earnings as a public company. 