Skip to content

Commit

Permalink
Fix timestamp issue. (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnburn authored Jan 11, 2018
1 parent 0d0fff9 commit 3bed4ab
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions opentracing/src/opentracing_request_instrumentor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "opentracing_request_instrumentor.h"
#include <iostream>
#include "utility.h"

extern "C" {
Expand Down Expand Up @@ -169,13 +168,7 @@ void OpenTracingRequestInstrumentor::set_request_span_context() {
// on_log_request
//------------------------------------------------------------------------------
void OpenTracingRequestInstrumentor::on_log_request() {
// Follows the same logic to determine the time point that the request is
// finished as that for NGINX's $request_time variable. See
// http://nginx.org/en/docs/http/ngx_http_log_module.html#var_request_time
auto timepoint = ngx_timeofday();
auto finish_timestamp =
opentracing::convert_time_point<std::chrono::steady_clock>(
to_system_timestamp(timepoint->sec, timepoint->msec));
auto finish_timestamp = std::chrono::steady_clock::now();

on_exit_block(finish_timestamp);

Expand Down

0 comments on commit 3bed4ab

Please sign in to comment.