Skip to content

Commit

Permalink
[ingester] fix up lost time accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
taloric committed Feb 27, 2024
1 parent 5c02498 commit dd059b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/ingester/profile/decoder/decoder.go
Expand Up @@ -275,8 +275,14 @@ func (d *Decoder) buildMetaData(profile *pb.Profile) ingestion.Metadata {
labels = segment.NewKey(labelKey)
labels.Add("__name__", profileName)
}
// use app-profile with `from` params
startTime := time.Unix(int64(profile.From), 0)
// using ebpf-profile with `timestamp` nanoseconds parse
if profile.Timestamp > 0 {
startTime = time.Unix(0, int64(profile.Timestamp))
}
return ingestion.Metadata{
StartTime: time.Unix(int64(profile.From), 0),
StartTime: startTime,
EndTime: time.Unix(int64(profile.Until), 0),
SpyName: profile.SpyName,
Key: labels,
Expand Down

0 comments on commit dd059b2

Please sign in to comment.