Skip to content

Commit

Permalink
Allow non intersecting spans matching in a trace. Additional data to …
Browse files Browse the repository at this point in the history
…span. (#171)
  • Loading branch information
RomanDzhabarov authored Oct 25, 2016
1 parent c241ccd commit 2701313
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/common/tracing/http_tracer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ void LightStepSink::flushTrace(const Http::HeaderMap& request_headers, const Htt
lightstep::Span span = tls_.getTyped<TlsLightStepTracer>(tls_slot_).tracer_.StartSpan(
tracing_context.operationName(),
{lightstep::StartTimestamp(request_info.startTime()),
lightstep::SetTag("join:x-request-id", request_headers.get(Http::Headers::get().RequestId)),
lightstep::SetTag("guid:x-request-id", request_headers.get(Http::Headers::get().RequestId)),
lightstep::SetTag("request line", buildRequestLine(request_headers, request_info)),
lightstep::SetTag("response code", buildResponseCode(request_info)),
lightstep::SetTag("request size", request_info.bytesReceived()),
lightstep::SetTag("response size", request_info.bytesSent()),
lightstep::SetTag("host header", request_headers.get(Http::Headers::get().Host)),
lightstep::SetTag(
"downstream cluster",
Expand Down
2 changes: 2 additions & 0 deletions test/common/tracing/http_tracer_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ TEST_F(LightStepSinkTest, FlushSpansTimer) {
EXPECT_CALL(request_info, startTime()).WillOnce(Return(start_time));
Optional<uint32_t> code(200);
EXPECT_CALL(request_info, responseCode()).WillRepeatedly(ReturnRef(code));
EXPECT_CALL(request_info, bytesReceived()).WillOnce(Return(10UL));
EXPECT_CALL(request_info, bytesSent()).WillOnce(Return(100UL));

const std::string protocol = "http/1";
EXPECT_CALL(request_info, protocol()).WillOnce(ReturnRef(protocol));
Expand Down

0 comments on commit 2701313

Please sign in to comment.