code: func GetRequestID(ctx context.Context) (uint64, bool) {
  	var (
  		szID   []string
  		szIDOK bool
  	)
  
  	// Prefer the incoming context, but look in both types.
  	if md, ok := metadata.FromIncomingContext(ctx); ok {
  		szID, szIDOK = md[RequestIDKey]
  	} else if md, ok := metadata.FromOutgoingContext(ctx); ok {
  		szID, szIDOK = md[RequestIDKey]
  	}
  
  	if szIDOK && len(szID) == 1 {
  		if id, err := strconv.ParseUint(szID[0], 10, 64); err == nil {
  			return id, true
  		}
  	}
  
  	return 0, false
  }
docs: // GetRequestID inspects the context for gRPC metadata and returns
  // its request ID if available.