Skip to content

make the query log timestamps more parseable#4096

Merged
sougou merged 2 commits intovitessio:masterfrom
tinyspeck:logstats-dates-should-be-parseable
Jul 20, 2018
Merged

make the query log timestamps more parseable#4096
sougou merged 2 commits intovitessio:masterfrom
tinyspeck:logstats-dates-should-be-parseable

Conversation

@demmer
Copy link
Copy Markdown
Member

@demmer demmer commented Jul 19, 2018

Change how dates are formatted in the vtgate / vttablet query logs from using time.StampMicro to a custom format with a fixed format for the date part.

This way the resulting timestamps include the year and have a consistent number of characters for the day using a leading zero rather than a leading space for single-digit dates.

Note that I considered using the builtin RFC3339Nano format, but it doesn't include a fixed number of digits for the decimal part and has an inconsistent format for the timezone, so I opted for this smaller change to just the date part.

Change how dates are formatted in the vtgate / vttablet query logs
from using time.StampMicro to a custom format with a fixed format
for the date part.

This way the resulting timestamps include the year and have a
consistent number of characters for the day using a leading zero
rather than a leading space for single-digit dates.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
@demmer demmer requested a review from sougou July 19, 2018 13:10
@sougou
Copy link
Copy Markdown
Contributor

sougou commented Jul 19, 2018

Looks like more tests need fixing.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
@demmer
Copy link
Copy Markdown
Member Author

demmer commented Jul 20, 2018

@sougou fixed

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.

2 participants