Skip to content

Commit

Permalink
ensure after appending the value
Browse files Browse the repository at this point in the history
  • Loading branch information
umanwizard committed Oct 9, 2024
1 parent c608de5 commit 0883c2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reporter/parca_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ func (r *ParcaReporter) ReportTraceEvent(trace *libpf.Trace,
r.sampleWriter.Label(k).AppendString(v)
}

r.sampleWriter.EnsureLabelLengths()

buf := [16]byte{}
trace.Hash.PutBytes16(&buf)
r.sampleWriter.StacktraceID.Append(buf[:])

r.sampleWriter.Value.Append(1)
r.sampleWriter.EnsureLabelLengths()

r.sampleWriter.Timestamp.Append(int64(meta.Timestamp))
}

Expand Down

0 comments on commit 0883c2f

Please sign in to comment.