Fix topic statistics source collision for multiple subscriptions#3151
Open
Saigirish23 wants to merge 1 commit into
Open
Fix topic statistics source collision for multiple subscriptions#3151Saigirish23 wants to merge 1 commit into
Saigirish23 wants to merge 1 commit into
Conversation
Signed-off-by: Saigirish23 <185754693+Saigirish23@users.noreply.github.com>
9c24f1d to
167ac31
Compare
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.
Description
When multiple subscriptions are created within the same node, their topic statistics messages currently share the same
measurement_source_namebecause only the node name is used when constructingSubscriptionTopicStatistics.This makes it impossible to distinguish statistics originating from different subscriptions in the same node.
This change includes the subscribed topic name in the generated source identifier by constructing it as:
node_name + topic_nameA regression test has also been added to verify that multiple subscriptions produce distinct
measurement_source_namevalues.Fixes #2756
Is this user-facing behavior change?
Yes. Topic statistics messages now uniquely identify subscriptions within the same node by including the subscribed topic name in
measurement_source_name.Did you use Generative AI?
Yes. ChatGPT was used for guidance during development and debugging. All code changes, testing, and verification were reviewed and validated manually.
Additional Information
The regression test validates that multiple subscriptions created within the same node produce distinct
measurement_source_namevalues in published statistics messages.