Skip to content

Commit

Permalink
Make x-request-id part of the trace span. Cleanup of example configs. (
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanDzhabarov authored Oct 18, 2016
1 parent a212866 commit 8b0f57e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion configs/envoy_double_proxy.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"tracing_enabled": true,
"tracing": {
"operation_name": "ingress"
},
"idle_timeout_s": 840,
"access_log": [
{
Expand Down
4 changes: 3 additions & 1 deletion configs/envoy_front_proxy.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"config": {
"codec_type": "auto",
"add_user_agent": true,
"tracing_enabled": true,
"tracing": {
"operation_name": "ingress"
},
"idle_timeout_s": 840,
"access_log": [
{
Expand Down
8 changes: 7 additions & 1 deletion configs/envoy_service_to_service.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"config": {
"codec_type": "auto",
"http_codec_options": "no_compression",
"tracing_enabled": true,
"tracing": {
"operation_name": "ingress"
},
"idle_timeout_s": 840,
"access_log": [
{
Expand Down Expand Up @@ -97,6 +99,10 @@
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"tracing": {
"operation_name": "egress",
"type": "upstream_failure"
},
"add_user_agent": true,
"idle_timeout_s": 840,
"access_log": [
Expand Down
3 changes: 2 additions & 1 deletion source/common/tracing/http_tracer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ void LightStepSink::flushTrace(const Http::HeaderMap& request_headers, const Htt
lightstep::SetTag(
"user agent",
StringUtil::valueOrDefault(request_headers.get(Http::Headers::get().UserAgent), "-")),
lightstep::SetTag("node id", service_node_)});
lightstep::SetTag("node id", service_node_),
lightstep::SetTag("x-request-id", request_headers.get(Http::Headers::get().RequestId))});

if (request_info.responseCode().valid() &&
Http::CodeUtility::is5xx(request_info.responseCode().value())) {
Expand Down

0 comments on commit 8b0f57e

Please sign in to comment.