Skip to content

Commit 62bb176

Browse files
authored
[enrichments]Use representative count for success count attr (#113)
1 parent cc9eca1 commit 62bb176

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

enrichments/trace/internal/elastic/span.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func (s *spanEnrichmentContext) setTxnResult(span ptrace.Span) {
322322
func (s *spanEnrichmentContext) setEventOutcome(span ptrace.Span) {
323323
// default to success outcome
324324
outcome := "success"
325-
successCount := 1
325+
successCount := getRepresentativeCount(span.TraceState().AsRaw())
326326
switch {
327327
case s.spanStatusCode == ptrace.StatusCodeError:
328328
outcome = "failure"

enrichments/trace/internal/elastic/span_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func TestElasticTransactionEnrich(t *testing.T) {
9696
AttributeTransactionRepresentativeCount: float64(256),
9797
AttributeTransactionDurationUs: int64(0),
9898
AttributeEventOutcome: "success",
99-
AttributeSuccessCount: int64(1),
99+
AttributeSuccessCount: int64(256),
100100
AttributeTransactionResult: "Success",
101101
AttributeTransactionType: "unknown",
102102
},

0 commit comments

Comments
 (0)