Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -23,7 +23,7 @@ internal static class Approver
{
private static readonly string[] _typesToScrub = { nameof(IntPtr), nameof(Guid) };
private static readonly string[] _knownPropertiesToReplace = { "duration", "timestamp", "dd.span_id", "dd.trace_id", "id", "lineNumber", "thread_name", "thread_id", "<>t__builder", "s_taskIdCounter", "<>u__1", "stack", "m_task" };
private static readonly string[] _knownPropertiesToRemove = { "CachedReusableFilters", "MaxStateDepth", "MaxValidationDepth" };
private static readonly string[] _knownPropertiesToRemove = { "CachedReusableFilters", "MaxStateDepth", "MaxValidationDepth", "process_tags" };

internal static async Task ApproveSnapshots(string[] snapshots, string testName, ITestOutputHelper output, string[] knownPropertiesToReplace = null, string[] knownPropertiesToRemove = null, string[] typesToScrub = null, bool orderPostScrubbing = false)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,9 @@ private void SanitizeSpanTags(IImmutableList<MockSpan> spans)

foreach (var span in spans)
{
// Remove process tags that can be injected on the first span in a payload
span.Tags.Remove(global::Datadog.Trace.Tags.ProcessTags);

var toSanitize = span.Tags.Where(tag => tag.Key.StartsWith(errorTagStartWith) && tag.Key.EndsWith(errorTagEndWith)).ToList();
foreach (var keyValuePair in toSanitize)
{
Expand Down
Loading