Skip to content
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

Use UTC timezone for ES indices #646

Merged
merged 1 commit into from
Jan 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/storage/es/spanstore/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (s *SpanWriter) WriteSpan(span *model.Span) error {
}

func indexNames(span *model.Span) (string, string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something I don't understand. The issue said there is a discrepancy between reader and writer in the use of UTC, but this function is global. Is the function shared by the reader/writer? If not, I think that's the missed opportunity to remove the discrepancies.

I see that the reader has another function func indexWithDate(prefix string, date time.Time) string {.

So it looks like they both re-implement similar functionality instead of relying on a shared struct doing it for them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree I will address it in a separate PR

spanDate := span.StartTime.Format("2006-01-02")
spanDate := span.StartTime.UTC().Format("2006-01-02")
return spanIndexPrefix + spanDate, serviceIndexPrefix + spanDate
}

Expand Down