You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR is to handle clock-skews as described here. It is a work-in-progress as the proposal is yet to be approved.
Spans are changed in gateway-service as a part of the span transformation pipeline. A span transformation pipeline registers a list of handlers that transform a supplied list of spans. One such handler is ClockskewAdjuster.java. I chose this design as this takes care of any new transformations we might have to apply to spans in the query layer.
The design assumes that there can be a bunch of strategies to adjust clock-skew (new heuristics can be added in future). Right now we have two strategies - A NoOpClockskewAdjuster adjuster (doesn't do any adjustment) and a JaegerBasedClockskewAdjuster (copies what Jaegar does). What adjuster to use can be controlled from the app config. Note that this PR does not handle controlling this feature from the UI. That is, once the config has been specified, all spans will then be adjusted.
This PR is still in early stages. JaegerBasedClockskewAdjuster.java's implementation is a bit terse and needs to be improved. I raised this so that everyone is updated on how we are implementing this feature.
Testing
ToDo
Checklist:
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
Any dependent changes have been merged and published in downstream modules
I think in this kind of fixes it is crucial to have the test cases to understand what use cases we are addressing, otherwise it is hard to follow (yeah, time is evil).
Merging #90 (9ef3143) into main (5f4c8f9) will decrease coverage by 1.03%.
The diff coverage is 25.96%.
❗ Current head 9ef3143 differs from pull request most recent head 5fd806e. Consider uploading reports for the commit 5fd806e to get more accurate results
I think in this kind of fixes it is crucial to have the test cases to understand what use cases we are addressing, otherwise it is hard to follow (yeah, time is evil).
Will be adding the tests now. Raised this a bit earlier to keep everyone updated.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is to handle clock-skews as described here. It is a work-in-progress as the proposal is yet to be approved.
Spans are changed in gateway-service as a part of the span transformation pipeline. A span transformation pipeline registers a list of handlers that transform a supplied list of spans. One such handler is
ClockskewAdjuster.java
. I chose this design as this takes care of any new transformations we might have to apply to spans in the query layer.The design assumes that there can be a bunch of strategies to adjust clock-skew (new heuristics can be added in future). Right now we have two strategies - A
NoOpClockskewAdjuster
adjuster (doesn't do any adjustment) and aJaegerBasedClockskewAdjuster
(copies what Jaegar does). What adjuster to use can be controlled from the app config. Note that this PR does not handle controlling this feature from the UI. That is, once the config has been specified, all spans will then be adjusted.This PR is still in early stages.
JaegerBasedClockskewAdjuster.java
's implementation is a bit terse and needs to be improved. I raised this so that everyone is updated on how we are implementing this feature.Testing
ToDo
Checklist:
Documentation
ToDo