code: func (s *Segment) Capture(name string, fn func()) {
  	sub := s.NewSubsegment(name)
  	defer sub.Close()
  	fn()
  }
docs: // Capture creates a subsegment to record the execution of the given function.
  // Usage:
  //
  //     s := xray.ContextSegment(ctx)
  //     s.Capture("slow-func", func() {
  //         // ... some long executing code
  //     })
  //