code: func trimURLPath(path string) string {
  	parts := strings.SplitN(strings.TrimPrefix(path, "/"), "/", 3)
  	if len(parts) == 0 {
  		return path
  	}
  
  	if parts[0] == "metrics" && len(parts) > 1 {
  		return fmt.Sprintf("%s/%s", parts[0], parts[1])
  
  	}
  	return parts[0]
  }
docs: // trimURLPath trims a URL path.
  // For paths in the format of "/metrics/xxx", "metrics/xxx" is returned;
  // For all other paths, the first part of the path is returned.