Merge branch 'main' into v2

* main:
  fix(config): properly apply defaults when reading folder configuration (#10034)
  chore(model): add metric for total number of conflicts (#10037)
  build: replace underscore in Debian version (#10032)
This commit is contained in:
Jakob Borg
2025-04-04 19:05:08 +02:00
5 changed files with 44 additions and 5 deletions
+8
View File
@@ -57,6 +57,13 @@ var (
Name: "folder_processed_bytes_total",
Help: "Total amount of data processed during folder syncing, per folder ID and data source (network/local_origin/local_other/skipped)",
}, []string{"folder", "source"})
metricFolderConflictsTotal = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "syncthing",
Subsystem: "model",
Name: "folder_conflicts_total",
Help: "Total number of conflicts",
}, []string{"folder"})
)
const (
@@ -88,4 +95,5 @@ func registerFolderMetrics(folderID string) {
metricFolderProcessedBytesTotal.WithLabelValues(folderID, metricSourceLocalOrigin)
metricFolderProcessedBytesTotal.WithLabelValues(folderID, metricSourceLocalOther)
metricFolderProcessedBytesTotal.WithLabelValues(folderID, metricSourceSkipped)
metricFolderConflictsTotal.WithLabelValues(folderID)
}