lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.19.3 vs lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.20.0

- old
+ new

@@ -56,10 +56,11 @@ if untraced_request?(env) OpenTelemetry::Common::Utilities.untraced do return @app.call(env) end end + original_env = env.dup extracted_context = OpenTelemetry.propagation.extract( env, getter: OpenTelemetry::Context::Propagation.rack_env_getter ) @@ -139,10 +140,10 @@ # see Datadog::Quantization::HTTP.url if (implementation = config[:url_quantization]) implementation.call(request_uri_or_path_info, env) else - request_uri_or_path_info + "HTTP #{env['REQUEST_METHOD']}" end end def set_attributes_after_request(span, status, headers, _response) span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status.to_i)