-
Notifications
You must be signed in to change notification settings - Fork 431
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
feat(time)!: epoch timestamps as standard #4252
feat(time)!: epoch timestamps as standard #4252
Conversation
@geyslan Is the PR ok besides the change you've commented on? I will drop that commit since it's irrelevant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
69318a0
to
37db421
Compare
37db421
to
282dc1d
Compare
8b545a9
to
c1ea067
Compare
426adc8
to
3423902
Compare
When rebasing, please put ! in the breaking changes commits, like I did in the PR header. Tks. |
9437b4b
to
1486115
Compare
@rscampos Could you review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
func Init(clockID int32) error { | ||
var err error | ||
initTimeOnce.Do(func() { | ||
startTimeMonotonic, errIn := getClockTimeNS(clockID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The variable startTimeMonotonic
could represent either the result from a Monotonic or Boottime clock, depending on the value of clockID
, right?. Therefore, it may be a good idea to consider renaming the variable (also in the rest of the function) to better reflect this.
@@ -208,7 +214,7 @@ func (ctrl *Controller) procTreeExitProcessor(args []trace.Argument) error { | |||
|
|||
return ctrl.processTree.FeedFromExit( | |||
proctree.ExitFeed{ | |||
TimeStamp: uint64(ctrl.timeNormalizer.NormalizeTime(int(timestamp))), // time of exit is already a timestamp | |||
TimeStamp: time.BootToEpochNS(timestamp), // time of exit is already a times)p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment typo: timestamp
Instead of using a helper, and then using it in a specialized processor function - use function currying to enable creating generic time argument processors.
Remove all timeNormalizer object logic. Instead use simple normalization functions and normalize all timestamps in events asap: 1. Context timestamp normalization moved to decode stage 2. Relevant timestamp arguments normalized in processing stage, registered to run first.
1486115
to
8860f6e
Compare
1. Explain what the PR does
1486115 feat(time): normalize all time to epoch
fbbe9f9 feat(output)!: remove relative-time
1a55bdb chore(pipeline): streamline time args normalization
18d3abd chore: refactor time pkg
1486115 feat(time): normalize all time to epoch
1a55bdb chore(pipeline): streamline time args normalization
2. Explain how to test it
-o option:relative-time
should failparent_start_time
,start_time
,leader_start_time
,parent_process_start_time
)3. Other comments
Resolve #4287
Resolve #3820