go-agent
go-agent copied to clipboard
Be able to set a Segment's StartTime to a time in the past
Summary
I'd like to be able to set the StartTime for a segment to some time.Time value that's in the past
Desired Behaviour
Possible Solution
Maybe something like this:
sgmt := txn.StartSegment("someRequest")
sgmt.StartTime = NewSegmentStartTime(time.Now())
Additional context
I am using gqlgen
which provides me with some hooks to instrument. But the hooks it provides are only there after the main logic/resolver code has run - but it does provide me with a nifty field called OperationStart
which is the time.Time
when the request began.
Hi @odannyc , thanks for this suggestion! I know that the New Relic back-end will start discarding data after a certain amount of back-dating, but from a quick glance, your millisecond-sized changes shouldn't cause problems.
I'll bring this to the attention of our Product Manager to see what kind of priority we can assign to this issue.