-
Notifications
You must be signed in to change notification settings - Fork 80
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
Feature: Add exponential backoff for pg output plugin #74
Conversation
could you create and link an issue to this PR that describes the feature you're working on. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -174,8 +177,14 @@ func (p *Plugin) registerPluginMetrics() { | |||
Subsystem: subsystemName, | |||
Help: "Total pgsql duplicated messages", | |||
}) | |||
stats.RegisterCounter(&stats.MetricDesc{ | |||
Name: sendErrorCounter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use https://prometheus.io/docs/practices/naming/ naming guide
@@ -43,6 +43,7 @@ const ( | |||
// metrics | |||
discardedEventCounter = "event_discarded" | |||
duplicatedEventCounter = "event_duplicated" | |||
sendErrorCounter = "send_error" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request/out _total
also let's add label status="ok|error|retry|etc", instead of separate metrics for error
Description
Added expbackoff for pg output plugin while quering DB.