Skip to content

Commit

Permalink
Fix pipelinerun_taskrun_duration_seconds metric
Browse files Browse the repository at this point in the history
This CL changes reporting taskrun duration as
part of pipelinerun metric to use knative
metrics Record API to match with the rest of the
existing metrics.

We have been using opensensus stats Record API for
reporting pipelinerun_taskrun_duration_seconds metric
as oppose to other metrics that we used knative metrics
API to report them. At this point only the metrics
that are reported with knative metrics are being
correctly plumbed to metrics backend. So as a result
pipelinerun_taskrun_duration_seconds was missing on
the metrics backend.
  • Loading branch information
NavidZ authored and tekton-robot committed Jun 24, 2020
1 parent 9aff0a0 commit c944643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/reconciler/taskrun/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (r *Recorder) DurationAndCount(tr *v1beta1.TaskRun) error {
return err
}

stats.Record(ctx, prTRDuration.M(float64(duration/time.Second)))
metrics.Record(ctx, prTRDuration.M(float64(duration/time.Second)))
metrics.Record(ctx, trCount.M(1))
return nil
}
Expand Down

0 comments on commit c944643

Please sign in to comment.