Skip to content

Commit

Permalink
[fix] updated function calls for new metric names
Browse files Browse the repository at this point in the history
  • Loading branch information
4lch4 committed Dec 14, 2023
1 parent 7eacd6c commit 33f8f79
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata"
)

var (
errClientNotInitErr = errors.New("http client not initialized")
)
var errClientNotInitErr = errors.New("http client not initialized")

type githubScraper struct {
client *http.Client
Expand Down Expand Up @@ -138,7 +136,7 @@ func (ghs *githubScraper) scrape(ctx context.Context) (pmetric.Metrics, error) {

age := getAge(pr.CreatedAt, pr.MergedAt)

ghs.mb.RecordGitRepositoryPullRequestMergeTimeDataPoint(now, age, name, pr.HeadRefName)
ghs.mb.RecordGitRepositoryPullRequestMergedTimeDataPoint(now, age, name, pr.HeadRefName)

} else {
open++
Expand All @@ -150,7 +148,7 @@ func (ghs *githubScraper) scrape(ctx context.Context) (pmetric.Metrics, error) {
if pr.Reviews.TotalCount > 0 {
age := getAge(pr.CreatedAt, pr.Reviews.Nodes[0].CreatedAt)

ghs.mb.RecordGitRepositoryPullRequestApprovalTimeDataPoint(now, age, name, pr.HeadRefName)
ghs.mb.RecordGitRepositoryPullRequestApprovedTimeDataPoint(now, age, name, pr.HeadRefName)
}
}
}
Expand Down

0 comments on commit 33f8f79

Please sign in to comment.