code: public void recordTermination() {
          StaplerRequest request = Stapler.getCurrentRequest();
          if (request != null) {
              terminatedBy.add(new TerminationRequest(
                      String.format("Termination requested at %s by %s [id=%d] from HTTP request for %s",
                              new Date(),
                              Thread.currentThread(),
                              Thread.currentThread().getId(),
                              request.getRequestURL()
                      )
              ));
          } else {
              terminatedBy.add(new TerminationRequest(
                      String.format("Termination requested at %s by %s [id=%d]",
                              new Date(),
                              Thread.currentThread(),
                              Thread.currentThread().getId()
                      )
              ));
          }
      }
docs: This method captures the information of a request to terminate a computer instance. Method is public as
  it needs to be called from {@link AbstractCloudSlave} and {@link jenkins.model.Nodes}. In general you should
  not need to call this method directly, however if implementing a custom node type or a different path
  for removing nodes, it may make sense to call this method in order to capture the originating request.
  
  @since 1.607