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

Fixes the ingestion of physical messages containing multiple logical messages #7129

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ public sealed class IncomingPipelineMetricTags
Dictionary<string, KeyValuePair<string, object?>>? tags;

/// <summary>
/// Adds the specified tag and value to the collection.
/// Adds the specified tag and value to the collection if not already present.
/// </summary>
/// <param name="tagKey">The tag to add.</param>
/// <param name="value">The value assigned to the tag.</param>
public void Add(string tagKey, object value)
{
tags ??= [];
tags.Add(tagKey, new(tagKey, value));
// We are using tryAdd to mitigate multiple logical messages transmitted in a single physical message
tags.TryAdd(tagKey, new(tagKey, value));
}

/// <summary>
Expand Down