Repository navigation
Read the audit instance name from instance_name when collecting audit queues - #5973
Merged
Merged
Conversation
Newer ServiceControl Audit versions (6.21.0+) expose the instance name as "instance_name" in the host configuration instead of "service_name". Check for "instance_name" first and fall back to "service_name" for older instances, so the input queue is still added to the remote's queue list.
rbev
approved these changes
Oct 12, 2026
warwickschroeder
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AuditQuery.GetAuditRemotesreads each audit instance'sGET /api/configurationresponse and collects the queues that belong to that instance. It looked for the instance name underhost.service_name. Audit 5.5.0 renamed the setting fromServiceNametoInstanceName(#4313), and the response has carriedhost.instance_namesince then, so the lookup has not matched any audit instance from 5.5.0 on.Effect
The collected queues end up in
AuditThroughputCollectorHostedService.AuditQueues, whichPlatformEndpointHelper.IsPlatformEndpointuses to keep ServiceControl's own queues out of throughput data. The instance name is the audit instance's input queue. An audit instance whose name starts with the primary's queue name and a dot, such as the defaultParticular.ServiceControl.Audit, is still excluded by a separate prefix rule. An audit instance with any other name has had its input queue included in broker throughput as if it were an endpoint.Change
Read
host.instance_name, and fall back tohost.service_namefor audit instances older than 5.5.0.Testing
Should_include_the_input_queue_named_after_the_audit_instance, built on the shape of a real/api/configurationresponse captured from an audit instance. One case usesinstance_name(6.21.0) and one usesservice_name(5.4.0). Theinstance_namecase fails without the fix.Particular.LicensingComponent.UnitTests: 91/91.