Skip to content

Commit

Permalink
Refactor PeerServiceResolver check
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest committed May 13, 2022
1 parent 5eec545 commit 62feceb
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,16 @@ public bool ForEach(KeyValuePair<string, object> activityTag)
if (attribute != null)
{
PooledList<OtlpCommon.KeyValue>.Add(ref this.Tags, attribute);
}

switch (activityTag.Value)
{
case string s:
PeerServiceResolver.InspectTag(ref this, key, s);
break;
case int i:
PeerServiceResolver.InspectTag(ref this, key, i);
break;
switch (attribute.Value.ValueCase)
{
case OtlpCommon.AnyValue.ValueOneofCase.StringValue:
PeerServiceResolver.InspectTag(ref this, key, attribute.Value.StringValue);
break;
case OtlpCommon.AnyValue.ValueOneofCase.IntValue:
PeerServiceResolver.InspectTag(ref this, key, attribute.Value.IntValue);
break;
}
}

return true;
Expand Down

0 comments on commit 62feceb

Please sign in to comment.