spiffe/spire

Fix the "expiring" and "outdated" metrics emitted during entry sync to be accurate across the whole cache

オープン

#2,437 opened on 2021/08/03

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)Go (631 件のフォーク)auto 404
help wantedpriority/backlog

Repository metrics

Stars
 (2,443 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Ref https://github.com/spiffe/spire/blob/04bee9741ac3b8c4b204e6367d0bd6146f78a8c7/pkg/agent/manager/sync.go#L67

	// TODO: this values are not real, we may remove
	if expiring > 0 {
		telemetry_agent.AddCacheManagerExpiredSVIDsSample(m.c.Metrics, float32(expiring))
		m.c.Log.WithField(telemetry.ExpiringSVIDs, expiring).Debug("Updating expiring SVIDs in cache")
	}
	if outdated > 0 {
		telemetry_agent.AddCacheManagerOutdatedSVIDsSample(m.c.Metrics, float32(outdated))
		m.c.Log.WithField(telemetry.OutdatedSVIDs, outdated).Debug("Updating SVIDs with outdated attributes in cache")
	}

It's not clear what is meant by "[these] values are not real" and why (I'm assuming) the metric blocks may be removed?

  • If this logic or similar may be removed, let's go ahead and remove it for this issue
  • If removal can't be done yet, let's update that comment to be more specific, and add a github issue number tracking removal
  • If the removal can't or is not foreseen as ever removable, let's get rid of the comment

コントリビューターガイド