Skip to content

Commit

Permalink
services/horizon/ingest: added more description to the history archiv…
Browse files Browse the repository at this point in the history
…e metrics labels (stellar#5185)
  • Loading branch information
sreuland authored Feb 1, 2024
1 parent c33317d commit 2df2810
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion historyarchive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ func (arch *Archive) GetCheckpointManager() CheckpointManager {
func (a *Archive) GetPathHAS(path string) (HistoryArchiveState, error) {
var has HistoryArchiveState
rdr, err := a.backend.GetFile(path)
a.stats.incrementDownloads()
// this is a query on the HA server state, not a data/bucket file download
a.stats.incrementRequests()
if err != nil {
return has, err
}
Expand Down
8 changes: 7 additions & 1 deletion services/horizon/internal/ingest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,13 @@ func (s *system) initMetrics() {
s.metrics.HistoryArchiveStatsCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "horizon", Subsystem: "ingest", Name: "history_archive_stats_total",
Help: "counters of different history archive stats",
Help: "Counters of different history archive requests. " +
"'source' label will provide name/address of the physical history archive server from the pool for which a request may be sent. " +
"'type' label will further categorize the potential request into specific requests, " +
"'file_downloads' - the count of files downloaded from an archive server, " +
"'file_uploads' - the count of files uploaded to an archive server, " +
"'requests' - the count of all http requests(includes both queries and file downloads) sent to an archive server, " +
"'cache_hits' - the count of requests for an archive file that were found on local cache instead, no download request sent to archive server.",
},
[]string{"source", "type"},
)
Expand Down

0 comments on commit 2df2810

Please sign in to comment.