Service Accounts: Implement basic usage stats (#46619)

* Stats: do not count SAs as users

* Stats: implement basic service account metrics

* Stats: do not count service account tokens as api keys

* Stats: fix metric names

* Stats: add SA stats test

* rename user to sa
This commit is contained in:
Jguer
2022-03-16 16:54:34 +01:00
committed by GitHub
parent 943a8508a6
commit d5883c1b27
7 changed files with 106 additions and 10 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ func (uss *UsageStats) sendUsageStats(ctx context.Context) error {
return nil
}
uss.log.Debug(fmt.Sprintf("Sending anonymous usage stats to %s", usageStatsURL))
uss.log.Debug("Sending anonymous usage stats", "url", usageStatsURL)
report, err := uss.GetUsageReport(ctx)
if err != nil {