Skip to content

Commit

Permalink
Add default http.host tag (#32)
Browse files Browse the repository at this point in the history
Some tracing backends such as jaeger
[don't support](jaegertracing/jaeger#684)
wildcard queries. This tag also is part of the multi-vendor opencensus
[http specification](https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/HTTP.md#attributes)
and makes it possible to query for traces by a specific vhost.
  • Loading branch information
SEJeff authored and rnburn committed Apr 18, 2018
1 parent 2cea68b commit 3036b89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opentracing/src/ngx_http_opentracing_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const std::pair<ngx_str_t, ngx_str_t> kDefaultOpenTracingTags[] = {
{ngx_string("nginx.worker_pid"), ngx_string("$pid")},
{ngx_string("peer.address"), ngx_string("$remote_addr:$remote_port")},
{ngx_string("http.method"), ngx_string("$request_method")},
{ngx_string("http.url"), ngx_string("$scheme://$http_host$request_uri")}};
{ngx_string("http.url"), ngx_string("$scheme://$http_host$request_uri")},
{ngx_string("http.host"), ngx_string("$http_host")}};

//------------------------------------------------------------------------------
// add_opentracing_tag
Expand Down

0 comments on commit 3036b89

Please sign in to comment.