Add new clients into the monthly breakdown (#18766)

* Add new clients into the monthly breakdown

* add changelog
This commit is contained in:
Josh Black 2023-01-19 09:12:17 -08:00 committed by GitHub
parent 97eac57b4f
commit fa1447cb3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

3
changelog/18766.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
core/activity: add namespace breakdown for new clients when date range spans multiple months, including the current month.
```

View File

@ -1664,6 +1664,7 @@ func (a *ActivityLog) handleQuery(ctx context.Context, startTime, endTime time.T
a.logger.Warn("no month data found, returning query with no namespace attribution for current month")
} else {
currentMonth.Namespaces = currentMonthNamespaceAttribution[0].Namespaces
currentMonth.NewClients.Namespaces = currentMonthNamespaceAttribution[0].NewClients.Namespaces
}
pq.Months = append(pq.Months, currentMonth)
distinctEntitiesResponse += pq.Months[len(pq.Months)-1].NewClients.Counts.EntityClients