Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuditThroughputCollectorHostedService can throw a null reference exception #4846

Open
andreasohlund opened this issue Feb 27, 2025 · 0 comments

Comments

@andreasohlund
Copy link
Member

Describe the bug

Description

Spotted this in a customer logfile

2025-02-20 12:28:42.5872|30|Error|Particular.LicensingComponent.AuditThroughput.AuditThroughputCollectorHostedService|Failed to gather throughput from audit|System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`2.GetEnumerator()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.ToList()
   at ServiceControl.CompositeViews.MessageCounting.GetAuditCountsForEndpointApi.ProcessResults(AuditCountsForEndpointContext input, QueryResult`1[] results) in /_/src/ServiceControl/CompositeViews/AuditCounts/GetAuditCountsForEndpointApi.cs:line 34
   at ServiceControl.CompositeViews.Messages.ScatterGatherApi`3.AggregateResults(TIn input, QueryResult`1[] results) in /_/src/ServiceControl/CompositeViews/Messages/ScatterGatherApi.cs:line 77
   at ServiceControl.CompositeViews.Messages.ScatterGatherApi`3.Execute(TIn input, String pathAndQuery) in /_/src/ServiceControl/CompositeViews/Messages/ScatterGatherApi.cs:line 63
   at ServiceControl.Infrastructure.Api.AuditCountApi.GetEndpointAuditCounts(String endpoint, CancellationToken token) in /_/src/ServiceControl/Infrastructure/Api/AuditCountApi.cs:line 14
   at Particular.LicensingComponent.AuditThroughput.AuditQuery.GetAuditCountForEndpoint(String endpointUrlName, CancellationToken cancellationToken) in /_/src/Particular.LicensingComponent/AuditThroughput/AuditQuery.cs:line 39
   at Particular.LicensingComponent.AuditThroughput.AuditThroughputCollectorHostedService.GatherThroughput(CancellationToken cancellationToken) in /_/src/Particular.LicensingComponent/AuditThroughput/AuditThroughputCollectorHostedService.cs:line 75
   at Particular.LicensingComponent.AuditThroughput.AuditThroughputCollectorHostedService.ExecuteAsync(CancellationToken cancellationToken) in /_/src/Particular.LicensingComponent/AuditThroughput/AuditThroughputCollectorHostedService.cs:line 35

Expected behavior

Actual behavior

Versions

  • Latest 6.3

Steps to reproduce

Not sure at this stage

Relevant log output

Additional Information

Workarounds

Possible solutions

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants