code: func (s *Segment) NewSubsegment(name string) *Segment {
  	s.Lock()
  	defer s.Unlock()
  
  	sub := &Segment{
  		Mutex:      &sync.Mutex{},
  		ID:         NewID(),
  		TraceID:    s.TraceID,
  		ParentID:   s.ID,
  		Type:       "subsegment",
  		Name:       name,
  		StartTime:  now(),
  		InProgress: true,
  		Parent:     s,
  		conn:       s.conn,
  	}
  	s.Subsegments = append(s.Subsegments, sub)
  	s.counter++
  	return sub
  }
docs: // NewSubsegment creates a subsegment of s.