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

Feat: info message #38

Merged
merged 4 commits into from
Aug 3, 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
11 changes: 6 additions & 5 deletions metrics/series.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
seriesType SeriesType
subType string
operation string
status string

Check failure on line 16 in metrics/series.go

View workflow job for this annotation

GitHub Actions / Lint and Test Go Code

field `status` is unused (unused)
}

seriesContextKey struct{}
Expand Down Expand Up @@ -87,12 +87,13 @@
)

// Info returns the metric name and labels for an informational event.
func (s Series) Info() (string, prometheus.Labels) {
func (s Series) Info(message string) (string, prometheus.Labels) {
return "operation_count", prometheus.Labels{
"series_type": s.seriesType.String(),
"sub_type": s.subType,
"operation": s.operation,
"status": seriesTypeInfo,
"series_type": s.seriesType.String(),
"sub_type": s.subType,
"operation": s.operation,
"status": seriesTypeInfo,
"info_message": message,
}
}

Expand Down
Loading