Skip to content

Include endpoint-provided usage information in the usage report - #5905

Open
mikeminutillo wants to merge 9 commits into
masterfrom
endpoint-throughput
Open

mikeminutillo wants to merge 9 commits into
masterfrom
endpoint-throughput

Conversation

@mikeminutillo

Copy link
Copy Markdown
Member

Related to Particular/NServiceBus#7933
Related to Particular/Particular.LicensingComponent.Report#138

Endpoints can be configured to send usage information to ServiceControl:

endpointConfiguration.EnableServicePlatform().SendUsageInfo();

The endpoint tracks how many messages it has processed and periodically sends that information to ServiceControl. ServiceControl keeps track of that over time and includes that information in the usage report sent to Particular.

@mikeminutillo mikeminutillo self-assigned this Sep 17, 2026

if (endpoint is null)
{
// TODO: Fill in more of the endpoint details if needed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO: Fill in more of the endpoint details if needed
// TODO: Fill in more of the endpoint details if needed, e.g. Scope if it becomes available

var items = throughputs.SelectMany(t => t).ToArray();

if (items.Any())
public static long MaxDailyThroughput(this Dictionary<DateOnly, long> dailyThroughput)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

alias Dictionary<DateOnly, long> to DailyThroughputValues or something similar

return 0;
}

// keep this in sync with the internal licensing calculation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this comment was important, but the calculation is spread out now. I think it still needs to be captured somewhere that we have an internal calculation that this class needs to match behaviour-wise

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.

2 participants