File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def call(env)
3737
3838 OpenTelemetry ::Common ::HTTP ::ClientContext . with_attributes ( attributes ) do |attrs , _ |
3939 tracer . in_span (
40- http_method . to_s , attributes : attrs , kind : config . fetch ( :span_kind )
40+ http_method , attributes : attrs , kind : config . fetch ( :span_kind )
4141 ) do |span |
4242 OpenTelemetry . propagation . inject ( env . request_headers )
4343
@@ -59,11 +59,12 @@ def call(env)
5959 private
6060
6161 def span_creation_attributes ( http_method :, url :, config :)
62+ cleansed_url = OpenTelemetry ::Common ::Utilities . cleanse_url ( url . to_s )
6263 attrs = {
6364 'http.method' => http_method ,
6465 'http.request.method' => http_method ,
65- 'http.url' => OpenTelemetry :: Common :: Utilities . cleanse_url ( url . to_s ) ,
66- 'url.full' => OpenTelemetry :: Common :: Utilities . cleanse_url ( url . to_s ) ,
66+ 'http.url' => cleansed_url ,
67+ 'url.full' => cleansed_url ,
6768 'faraday.adapter.name' => app . class . name
6869 }
6970 attrs [ 'net.peer.name' ] = url . host if url . host
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def call(env)
3737
3838 OpenTelemetry ::Common ::HTTP ::ClientContext . with_attributes ( attributes ) do |attrs , _ |
3939 tracer . in_span (
40- http_method . to_s , attributes : attrs , kind : config . fetch ( :span_kind )
40+ http_method , attributes : attrs , kind : config . fetch ( :span_kind )
4141 ) do |span |
4242 OpenTelemetry . propagation . inject ( env . request_headers )
4343
You can’t perform that action at this time.
0 commit comments