Skip to content

Commit f8a1a26

Browse files
committed
Use volatile read
1 parent ed76fc2 commit f8a1a26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tracer/src/Datadog.Trace/Agent/StatsAggregator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public SpanCollection ProcessTrace(in SpanCollection trace)
220220
}
221221

222222
public StatsAggregationKey BuildKey(Span span, out List<byte[]> utf8PeerTags)
223-
=> BuildKey(span, _peerTagKeys, out utf8PeerTags);
223+
=> BuildKey(span, Volatile.Read(ref _peerTagKeys), out utf8PeerTags);
224224

225225
internal StatsAggregationKey BuildKey(Span span, List<string> peerTagKeys, out List<byte[]> utf8PeerTags)
226226
{

0 commit comments

Comments
 (0)