-
Notifications
You must be signed in to change notification settings - Fork 332
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
Allows to modify the start time and end time properties of the SegmentSpan object. #437
Conversation
} | ||
} | ||
|
||
public void SetTimes(DateTimeOffset startTime, DateTimeOffset endTime) |
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.
Why and when would you need to change manually? This is not a typical feature for SkyWalking.
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.
For example, in the diagnostic information of StackExchange.Redis(SERedis), the start time and end time are determined by SERedis
I have read this, but it is not clear.
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.
The collection method of SERedis is to collect all commands and time objects under the current link at one time.
it contains the exact time of the beginning and end of the event, so I hope to modify the time of the SegmentSpan object.
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.
@liuhaoyang Your call. This seems very language related.
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.
I tried to implement the ISegmentContextFactory
interface, but still cannot modify the SegmentContext and SegmentSpan object properties.
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.
My suggestion is that you add StartTime to the API of ISegmentContextFactory
and modify the Finish function of SegmentSpan
to pass in the EndtTime parameter.
public interface ISegmentContextFactory
{
SegmentContext CreateEntrySegment(string operationName, ICarrier carrier,long stratTime = default(...));
...
}
public class SegmentSpan
{
...
public void Finish(long endTime = default(...))
{
...
}
}
Okay, I have modified and commit it as suggested. |
Why submit this pull request?
New feature
Allows to modify the start time and end time properties of the SegmentSpan object.
In a specific scenario, I want to modify the start time and end time properties of the SegmentSpan object.
For example, in the diagnostic information of
StackExchange.Redis
(SERedis), the start time and end time are determined by SERedis