code: func (e *Invocation) reportCompletionMetrics(c context.Context) {
  	if !e.Status.Final() || e.Finished.IsZero() {
  		panic(fmt.Errorf("reportCompletionMetrics on incomplete invocation: %v", e))
  	}
  	duration := e.Finished.Sub(e.Started)
  	metricInvocationsDurations.Add(c, duration.Seconds(), e.JobID, string(e.Status))
  }
docs: // reportCompletionMetrics reports invocation stats to monitoring.
  // Should be called after transaction to save this invocation is completed.