This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
Record a Start Time Per Time Series within a View #1220
Merged
james-bebbington
merged 8 commits into
census-instrumentation:master
from
ian-mi:start-per-row
Jul 14, 2020
Merged
Record a Start Time Per Time Series within a View #1220
james-bebbington
merged 8 commits into
census-instrumentation:master
from
ian-mi:start-per-row
Jul 14, 2020
Conversation
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 allows exporters to set a more accurate initial interval when a metric row is added.
ian-mi
changed the title
Record a Start Time Per Time Series
Record a Start Time Per Time Series within a View
Jul 10, 2020
james-bebbington
approved these changes
Jul 13, 2020
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
Comment on lines
324
to
329
case *view.CountData: | ||
data.Start = time.Time{} | ||
case *view.SumData: | ||
data.Start = time.Time{} | ||
case *view.DistributionData: | ||
data.Start = time.Time{} |
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:
Suggested change
case *view.CountData: | |
data.Start = time.Time{} | |
case *view.SumData: | |
data.Start = time.Time{} | |
case *view.DistributionData: | |
data.Start = time.Time{} | |
case *view.CountData, *view.SumData, *view.DistributionData: | |
data.Start = time.Time{} |
(similar for other tests)
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.
This won't work because go must resolve data to a concrete type in order to reference the Start field.
nilebox
reviewed
Jul 14, 2020
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.
Overall the idea looks good, just please cleanup the tests from duplicate code
nilebox
approved these changes
Jul 14, 2020
This was referenced Jul 14, 2020
This was referenced Sep 18, 2020
Merged
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Currently all time series within a view will use a single start time recorded when the view is registered. Consequently if a time series is first recorded long after the view is registered the first point will be misattributed to a potentially very long time interval. Instead record a separate start time per time series within AggregationData that is recorded when data for that time series is first recorded. This start time is used when converting rows to TimeSeries and may also be used directly by stats exporters.