diff --git a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb index 925699f4c..7850ac565 100644 --- a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb +++ b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb @@ -17,7 +17,7 @@ module Easy HTTP_METHODS_TO_SPAN_NAMES = Hash.new { |h, k| h[k] = "HTTP #{k}" } # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def http_request(url, action_name, options = {}) @otel_method = ACTION_NAMES_TO_HTTP_METHODS[action_name] diff --git a/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb b/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb index e14e64f44..b17bfc662 100644 --- a/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb +++ b/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 @@ -21,7 +22,7 @@ class TracerMiddleware < ::Excon::Middleware::Base end.freeze # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def request_call(datum) return @stack.request_call(datum) if untraced?(datum) diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb index fea0ded50..981e44e26 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb @@ -24,7 +24,7 @@ class TracerMiddleware < ::Faraday::Middleware }.freeze # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def call(env) http_method = HTTP_METHODS_SYMBOL_TO_STRING[env.method] diff --git a/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb b/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb index e28ac3bcd..1d98cb5c1 100644 --- a/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb +++ b/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb @@ -11,7 +11,7 @@ module Patches # Module to prepend to HTTP::Client for instrumentation module Client # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def perform(req, options) uri = req.uri diff --git a/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb b/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb index 878b09520..2635a39e6 100644 --- a/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb +++ b/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb @@ -12,7 +12,7 @@ module Plugin # an OTEL trace. class RequestTracer # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def initialize(request) @request = request @@ -92,4 +92,4 @@ def send(request) end end end -end \ No newline at end of file +end diff --git a/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb b/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb index b8b08f1c7..6cdbfdb2b 100644 --- a/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb +++ b/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb @@ -15,7 +15,7 @@ module Instrumentation USE_SSL_TO_SCHEME = { false => 'http', true => 'https' }.freeze # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def request(req, body = nil, &block) # Do not trace recursive call for starting the connection diff --git a/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb b/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb index acc3b39ea..1507948f7 100644 --- a/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb +++ b/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb @@ -11,7 +11,7 @@ module Patches # Module to prepend to RestClient::Request for instrumentation module Request # Constant for the HTTP status range - HTTP_STATUS_SUCCESS_RANGE = (100..399).freeze + HTTP_STATUS_SUCCESS_RANGE = (100..399) def execute(&block) trace_request do |_span|