Skip to content

Add ability to log timings of some events...#248

Draft
VGoshev wants to merge 2 commits intomasterfrom
add-log-timing-ability
Draft

Add ability to log timings of some events...#248
VGoshev wants to merge 2 commits intomasterfrom
add-log-timing-ability

Conversation

@VGoshev
Copy link
Collaborator

@VGoshev VGoshev commented Feb 11, 2026

Add configurable support for logging different timings via calling of external tool.
Currently are supported following events:

  • master_unavailable
  • node_offline
  • switchover_failed
  • failover_failed
  • switchover_complete
  • failover_complete

Copy link
Contributor

@secwall secwall left a comment

Choose a reason for hiding this comment

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

I also think that we need to add tests on this.

go r.send(eventType, duration)
}

func (r *timingReporter) send(eventType string, duration time.Duration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This approach leads to unlimited number of simultaneously running commands. Shouldn't we try a different approach? Like running a goroutine that reads a buffered channel of events and runs a single command to send them one by one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants