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

Updating Link/TelemetrySpan to accept SpanAttributes #1120

Merged
merged 12 commits into from
Aug 21, 2020
Prev Previous commit
Next Next commit
updating link tests
eddynaka committed Aug 20, 2020
commit aad66ef7c1d30432f6287bdc3fb3d481f0e02697
10 changes: 7 additions & 3 deletions test/OpenTelemetry.Tests/Trace/LinkTest.cs
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ public class LinkTest : IDisposable
{
private readonly IDictionary<string, object> attributesMap = new Dictionary<string, object>();
private readonly SpanContext spanContext;
private readonly ActivityTagsCollection tags;
private readonly SpanAttributes tags;

public LinkTest()
{
@@ -34,7 +34,11 @@ public LinkTest()
this.attributesMap.Add("MyAttributeKey1", 10L);
this.attributesMap.Add("MyAttributeKey2", true);
this.attributesMap.Add("MyAttributeKey3", 0.005);
this.tags = new ActivityTagsCollection(this.attributesMap);
this.tags = new SpanAttributes();
this.tags.Add("MyAttributeKey0", "MyStringAttribute");
this.tags.Add("MyAttributeKey1", 10L);
this.tags.Add("MyAttributeKey2", true);
this.tags.Add("MyAttributeKey3", 0.005);
}

[Fact]
@@ -91,7 +95,7 @@ public void NotEquality()
[Fact]
public void NotEquality_WithAttributes()
{
var tag1 = new ActivityTagsCollection(new Dictionary<string, object>());
var tag1 = new SpanAttributes();
var tag2 = this.tags;
var link1 = new Link(this.spanContext, tag1);
var link2 = new Link(this.spanContext, tag2);