Skip to content

Conversation

@johnsimons
Copy link
Member

@johnsimons johnsimons commented Sep 18, 2025

We are increasing AzureServiceBus to collect 90 days of data and SQS to collect 365 days.
This is related to https://github.com/Particular/CustomerSuccess/issues/4092

@johnsimons johnsimons self-assigned this Sep 18, 2025
@johnsimons johnsimons marked this pull request as ready for review September 18, 2025 06:53
foreach (var metricValue in metricValues)
{
currentDate = DateOnly.FromDateTime(metricValue.TimeStamp.UtcDateTime);
data[currentDate] = new DailyThroughput { MessageCount = (long)(metricValue.Total ?? 0), DateUTC = currentDate };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we distinguish your initialized "0" above from the metrics "0"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to distinguish whether the zero comes from the default or is set later on?
There is no reason to distinguish those.
The reason we need to do (metricValue.Total ?? 0) is because metricValue.Total can return a null, that is all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what circumstances lead to a null?

@johnsimons
Copy link
Member Author

@saratry @aleksandr-samila, I have pushed an update to deal with the start/end dates.
I tested this in both AWS and Azure, and both start creating metrics when a queue is created.
But because a user can create a new queue anytime, this means we can have multiple start dates based on when the queues are created. Which really means that the report will include the default 90 or 365 days for when the sampling is taken, but the actual internal data may not be for that length.

Also, I realise that if a customer decommissions an endpoint and deletes the queue, the metrics will no longer be available for the deleted queue. Hopefully, this is not something that happens a lot!

@johnsimons johnsimons merged commit 85d8247 into main Oct 14, 2025
5 checks passed
@johnsimons johnsimons deleted the john/more_days branch October 14, 2025 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants