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

Switch analytics logging of "request_at" to be end time (not start time) #251

Merged
merged 1 commit into from
Jun 12, 2016

Conversation

GUI
Copy link
Member

@GUI GUI commented Jun 12, 2016

Previously, the "request_at" field in the analytics was the timestamp of when the request began. This changes the behavior so "request_at" is now the timestamp of when the response finished.

Using the start time caused potential issues with the new hadoop analytics processing for long-running requests. Because we partition the live incoming data by the request_at timestamp, it meant that if a request took 3 minutes to complete, we would suddenly be inserting data into the partition from 3 minutes ago. This complicates data processing, since we have to deal with out-of-order insertion timestamps (which vary depending on how long the requests take).

By switching to use the end time, data processing is much simpler, since the timestamps should always be incrementing.

Using the end time also better aligns our timestamps with the timestamps nginx logs in the access.log file (which can be useful for debugging).

Previously, the "request_at" field in the analytics was the timestamp of
when the request began. This changes the behavior so "request_at" is now
the timestamp of when the response finished.

Using the start time caused potential issues with the new hadoop
analytics processing for long-running requests. Because we partition the
live incoming data by the request_at timestamp, it meant that if a
request took 3 minutes to complete, we would suddenly be inserting data
into the partition from 3 minutes ago. This complicates data
processing, since we have to deal with out-of-order insertion timestamps
(which vary depending on how long the requests take).

By switching to use the end time, data processing is much simpler, since
the timestamps should always be incrementing.

Using the end time also better aligns our timestamps with the timestamps
nginx logs in the access.log file (which can be useful for debugging).
@GUI GUI merged commit a3c564c into master Jun 12, 2016
@GUI GUI deleted the request_at_timestamp branch June 12, 2016 19:21
GUI added a commit that referenced this pull request Jun 13, 2016
In light of #251, the field
we're storing is now the end time, rather than beginning time of the
request. To make this column name more generic, rename the fields to
"timestamp_*" in the new SQL storage. Also better clarify the main
"timestamp_utc" column to clarify it should always contain the UTC time
(versus the "timestamp_tz_*" columns).

Elasticsearch will continue to store it as "request_at" for backwards
compatibility.
@GUI GUI added this to the v0.12 milestone Jun 26, 2016
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.

1 participant