From 3bed4abb042877f14c836e01909bb54cdc5f210d Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jan 2018 11:20:04 +0000 Subject: [PATCH] Fix timestamp issue. (#21) --- opentracing/src/opentracing_request_instrumentor.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/opentracing/src/opentracing_request_instrumentor.cpp b/opentracing/src/opentracing_request_instrumentor.cpp index 5e2b0cc1..6c60ada7 100644 --- a/opentracing/src/opentracing_request_instrumentor.cpp +++ b/opentracing/src/opentracing_request_instrumentor.cpp @@ -1,5 +1,4 @@ #include "opentracing_request_instrumentor.h" -#include #include "utility.h" extern "C" { @@ -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( - to_system_timestamp(timepoint->sec, timepoint->msec)); + auto finish_timestamp = std::chrono::steady_clock::now(); on_exit_block(finish_timestamp);