1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

Record links/events attribute drops independently (#1771)

* Record links/events attribute drops independently

* Update PR number

* Remove unneeded span.droppedAttributeCount
This commit is contained in:
Tyler Yahn
2021-04-06 14:51:15 +00:00
committed by GitHub
parent 5bbfc22cbc
commit e9aaa04b8f
8 changed files with 56 additions and 21 deletions
+11 -4
View File
@@ -1491,10 +1491,10 @@ func TestAddEventsWithMoreAttributesThanLimit(t *testing.T) {
attribute.Bool("key1", true),
attribute.String("key2", "value2"),
},
DroppedAttributeCount: 2,
},
},
SpanKind: trace.SpanKindInternal,
DroppedAttributeCount: 2,
InstrumentationLibrary: instrumentation.Library{Name: "AddSpanEventWithOverLimitedAttributes"},
}
if diff := cmpDiff(got, want); diff != "" {
@@ -1536,10 +1536,17 @@ func TestAddLinksWithMoreAttributesThanLimit(t *testing.T) {
Parent: sc.WithRemote(true),
Name: "span0",
Links: []trace.Link{
{SpanContext: sc1, Attributes: []attribute.KeyValue{k1v1}},
{SpanContext: sc2, Attributes: []attribute.KeyValue{k2v2}},
{
SpanContext: sc1,
Attributes: []attribute.KeyValue{k1v1},
DroppedAttributeCount: 1,
},
{
SpanContext: sc2,
Attributes: []attribute.KeyValue{k2v2},
DroppedAttributeCount: 2,
},
},
DroppedAttributeCount: 3,
SpanKind: trace.SpanKindInternal,
InstrumentationLibrary: instrumentation.Library{Name: "Links"},
}