Skip to content

Commit

Permalink
Merge pull request #195 from Aiven-Open/nicois/metric-streams
Browse files Browse the repository at this point in the history
Generate a metric tracking basebackup creation
  • Loading branch information
bridgetb authored Nov 28, 2024
2 parents d0945c9 + 45b79b9 commit 8045f01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions myhoard/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,7 @@ def _refresh_backups_list_and_streams(self):
elif backup["resumable"] and not backup["closed_at"]:
self.log.info("Starting resumable non-closed stream %r", stream_id)
new_stream = self._build_backup_stream(backup)
self.stats.increase("myhoard.backup_started", tags={"resumed": "true"})
new_stream.start()
new_streams[stream_id] = new_stream
elif not backup["resumable"] and stream_id in self.state["owned_stream_ids"]:
Expand Down Expand Up @@ -1756,6 +1757,7 @@ def _start_new_backup(self, *, backup_reason: BackupStream.BackupReason, normali
backup_request=None,
owned_stream_ids=self.state["owned_stream_ids"] + [stream_id],
)
self.stats.increase("myhoard.backup_started", tags={"resumed": "false"})
stream.start()

def _state_file_from_stream_id(self, stream_id):
Expand Down

0 comments on commit 8045f01

Please sign in to comment.