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

Conversation

pavolloffay
Copy link
Member

Fixes #591

Signed-off-by: Pavol Loffay [email protected]

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ba16f14 on pavolloffay:fix-es-index-timezone into 1988a90 on jaegertracing:master.

@objectiser
Copy link
Contributor

It might also be good if timezone can be overridden by config - with local as the default.

@pavolloffay
Copy link
Member Author

I would prefer to do it in a separate PR. This just fixes inconsistency bug.

@pavolloffay
Copy link
Member Author

I would even prefer no conf prop if it can be configured via the system

@yurishkuro
Copy link
Member

it seems this change reverts another one specifically done to introduce the UTC, I think we have a conflict of requirements.

@pavolloffay
Copy link
Member Author

Which one? https://github.com/jaegertracing/jaeger/pulls?q=is%3Apr+utc+is%3Aclosed are related to tests failures only, Probably inconsystency between local and UTC.

@vprithvi
Copy link
Contributor

I strongly prefer UTC over local timezone because it's reliable when running components across regions, and doesn't have to deal with stuff like daylight saving time, etc.

What is the argument for updating to local tz?

Jaeger UI can translate these times to the user's current timezone.

@yurishkuro
Copy link
Member

I also prefer UTC. Different instances of collectors must all agree on when the index names roll over, so leaving this up to local time zone on the host opens them up to errors due to misconfiguration or regional differences.

@pavolloffay pavolloffay force-pushed the fix-es-index-timezone branch from ba16f14 to bb3f9bc Compare January 15, 2018 09:59
@pavolloffay pavolloffay changed the title Use local timezone for ES indices Use UTC timezone for ES indices Jan 15, 2018
@pavolloffay
Copy link
Member Author

It's a good argument when running in multiple regions. I think UTC is a better default, but it's harcoded. Setting to local leaves the opportunity to configure it in the system. However I don't know how people do it in practice.

I have updated to UTC.

@yurishkuro
Copy link
Member

I remember at my previous job, which was a Java shop, we used to run all Java apps with an env variable setting the timezone to UTC, to avoid surprises of local timezones.

@@ -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

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling bb3f9bc on pavolloffay:fix-es-index-timezone into 362b0c1 on jaegertracing:master.

@yurishkuro yurishkuro merged commit 593c8bf into jaegertracing:master Jan 15, 2018
@ghost ghost removed the review label Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants