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

Feature: Add exponential backoff for pg output plugin #74

Closed
wants to merge 7 commits into from
Closed

Feature: Add exponential backoff for pg output plugin #74

wants to merge 7 commits into from

Conversation

ansakharov
Copy link
Contributor

Description

Added expbackoff for pg output plugin while quering DB.

@ansakharov ansakharov self-assigned this Apr 14, 2022
@ansakharov ansakharov added the enhancement New feature or request label Apr 14, 2022
@ansakharov ansakharov linked an issue Apr 14, 2022 that may be closed by this pull request
@ssnd
Copy link
Member

ssnd commented Apr 15, 2022

could you create and link an issue to this PR that describes the feature you're working on.
and also please name the branches according to the guidelines we introduced a few days ago.

@ansakharov ansakharov changed the title Add exponential backoff for pg output plugin Feature: Add exponential backoff for pg output plugin Apr 15, 2022
@ansakharov ansakharov changed the title Feature: Add exponential backoff for pg output plugin [75] Feature: Add exponential backoff for pg output plugin Apr 15, 2022
@ansakharov ansakharov changed the title [75] Feature: Add exponential backoff for pg output plugin Feature: Add exponential backoff for pg output plugin Apr 15, 2022
go.mod Show resolved Hide resolved
@vano144
Copy link
Collaborator

vano144 commented May 11, 2022

LGTM

Copy link
Collaborator

@vadimalekseev vadimalekseev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vano144 vano144 requested a review from vitkovskii May 31, 2022 11:58
expbackoff/backoff.go Outdated Show resolved Hide resolved
expbackoff/backoff.go Outdated Show resolved Hide resolved
expbackoff/backoff.go Outdated Show resolved Hide resolved
expbackoff/backoff.go Outdated Show resolved Hide resolved
plugin/output/postgres/postgres.go Outdated Show resolved Hide resolved
plugin/output/postgres/postgres.go Outdated Show resolved Hide resolved
plugin/output/postgres/postgres.go Outdated Show resolved Hide resolved
consts/consts.go Outdated Show resolved Hide resolved
expbackoff/backoff.go Outdated Show resolved Hide resolved
backoff/backoff.go Outdated Show resolved Hide resolved
backoff/backoff.go Outdated Show resolved Hide resolved
@@ -174,8 +177,14 @@ func (p *Plugin) registerPluginMetrics() {
Subsystem: subsystemName,
Help: "Total pgsql duplicated messages",
})
stats.RegisterCounter(&stats.MetricDesc{
Name: sendErrorCounter,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -43,6 +43,7 @@ const (
// metrics
discardedEventCounter = "event_discarded"
duplicatedEventCounter = "event_duplicated"
sendErrorCounter = "send_error"
Copy link
Collaborator

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

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add exponential backoff for pg output
6 participants