Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore (telemetry) Fix the naming of Latency Metrics #98

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions telemetry/prometheus/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (p *metrics) IncMonotonic(name string, tags []string) {

// Error implements the Error method of the Metrics interface using CounterVec.
func (p *metrics) Error(errName string) {
p.IncMonotonic("stats.errors", []string{fmt.Sprintf("type:%s", errName)})
p.IncMonotonic("errors", []string{fmt.Sprintf("type:%s", errName)})
}

// Histogram implements the Histogram method of the Metrics interface using HistogramVec.
Expand Down Expand Up @@ -208,7 +208,7 @@ func (p *metrics) Time(name string, value time.Duration, tags []string) {

// Latency is a helper function to measure the latency of a routine.
func (p *metrics) Latency(jobName string, start time.Time, tags ...string) {
p.Time("stats.latency", time.Since(start), append(tags, fmt.Sprintf("job:%s", jobName)))
p.Time(fmt.Sprintf("%s.latency", jobName), time.Since(start), tags)
calbera marked this conversation as resolved.
Show resolved Hide resolved
}

// parseTagsToLabelPairs converts a slice of tags in "key:value" format to two slices:
Expand Down
Loading