lib/hypertrace/instrumentation/net_http_patch.rb in hypertrace-agent-0.1.2 vs lib/hypertrace/instrumentation/net_http_patch.rb in hypertrace-agent-0.2.1

- old
+ new

@@ -1,9 +1,12 @@ module OpenTelemetry::Instrumentation::Net::HTTP::Patches::Instrumentation def request(req, body = nil, &block) # Do not trace recursive call for starting the connection return super(req, body, &block) unless started? + # Prevent tracing our own export calls + return super(req, body, &block) if req.path == "/v1/traces" + scheme = use_ssl? ? "https://" : "http" url = "#{scheme}#{@address}:#{@port}#{req.path}" attributes = { OpenTelemetry::SemanticConventions::Trace::HTTP_METHOD => req.method, OpenTelemetry::SemanticConventions::Trace::HTTP_SCHEME => USE_SSL_TO_SCHEME[use_ssl?], \ No newline at end of file