lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-excon-0.22.1 vs lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-excon-0.22.3
- old
+ new
@@ -25,13 +25,14 @@
return @stack.request_call(datum) if untraced?(datum)
http_method = HTTP_METHODS_TO_UPPERCASE[datum[:method]]
attributes = {
+ OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host],
OpenTelemetry::SemanticConventions::Trace::HTTP_METHOD => http_method,
OpenTelemetry::SemanticConventions::Trace::HTTP_SCHEME => datum[:scheme],
OpenTelemetry::SemanticConventions::Trace::HTTP_TARGET => datum[:path],
- OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host],
+ OpenTelemetry::SemanticConventions::Trace::HTTP_URL => OpenTelemetry::Common::Utilities.cleanse_url(::Excon::Utils.request_uri(datum)),
OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => datum[:hostname],
OpenTelemetry::SemanticConventions::Trace::NET_PEER_PORT => datum[:port]
}
peer_service = Excon::Instrumentation.instance.config[:peer_service]