Skip to content

Commit c253ab3

Browse files
committed
squash: refactor
1 parent 6a47a17 commit c253ab3

File tree

28 files changed

+28
-28
lines changed

28 files changed

+28
-28
lines changed

instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/http_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module HttpHelper
6363
# @param method [String, Symbol] The HTTP method
6464
# @param semconv [Symbol] The semantic convention to use (:stable or :old)
6565
# @return [SpanCreationAttributes] struct containing span_name, normalized_method, and original_method
66-
def self.span_attributes(method, semconv: :stable)
66+
def self.span_attrs_for(method, semconv: :stable)
6767
normalized = METHOD_CACHE[method]
6868
if normalized
6969
span_name = semconv == :old ? OLD_SPAN_NAMES[normalized] : normalized

instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/dup/easy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def reset
6868
end
6969

7070
def otel_before_request
71-
span_data = HttpHelper.span_attributes(@otel_method)
71+
span_data = HttpHelper.span_attrs_for(@otel_method)
7272

7373
@otel_span = tracer.start_span(
7474
span_data.span_name,

instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/old/easy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def reset
6767
end
6868

6969
def otel_before_request
70-
span_data = HttpHelper.span_attributes(@otel_method, semconv: :old)
70+
span_data = HttpHelper.span_attrs_for(@otel_method, semconv: :old)
7171

7272
@otel_span = tracer.start_span(
7373
span_data.span_name,

instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/stable/easy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def reset
6767
end
6868

6969
def otel_before_request
70-
span_data = HttpHelper.span_attributes(@otel_method)
70+
span_data = HttpHelper.span_attrs_for(@otel_method)
7171

7272
@otel_span = tracer.start_span(
7373
span_data.span_name,

instrumentation/excon/lib/opentelemetry/instrumentation/excon/http_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module HttpHelper
6363
# @param method [String, Symbol] The HTTP method
6464
# @param semconv [Symbol] The semantic convention to use (:stable or :old)
6565
# @return [SpanCreationAttributes] struct containing span_name, normalized_method, and original_method
66-
def self.span_attributes(method, semconv: :stable)
66+
def self.span_attrs_for(method, semconv: :stable)
6767
normalized = METHOD_CACHE[method]
6868
if normalized
6969
span_name = semconv == :old ? OLD_SPAN_NAMES[normalized] : normalized

instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/dup/tracer_middleware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TracerMiddleware < ::Excon::Middleware::Base
1717
def request_call(datum)
1818
return @stack.request_call(datum) if untraced?(datum)
1919

20-
span_data = HttpHelper.span_attributes(datum[:method])
20+
span_data = HttpHelper.span_attrs_for(datum[:method])
2121

2222
cleansed_url = OpenTelemetry::Common::Utilities.cleanse_url(::Excon::Utils.request_uri(datum))
2323
attributes = {

instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/old/tracer_middleware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TracerMiddleware < ::Excon::Middleware::Base
1717
def request_call(datum)
1818
return @stack.request_call(datum) if untraced?(datum)
1919

20-
span_data = HttpHelper.span_attributes(datum[:method], semconv: :old)
20+
span_data = HttpHelper.span_attrs_for(datum[:method], semconv: :old)
2121

2222
attributes = {
2323
OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host],

instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/stable/tracer_middleware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TracerMiddleware < ::Excon::Middleware::Base
1717
def request_call(datum)
1818
return @stack.request_call(datum) if untraced?(datum)
1919

20-
span_data = HttpHelper.span_attributes(datum[:method])
20+
span_data = HttpHelper.span_attrs_for(datum[:method])
2121

2222
attributes = {
2323
'http.request.method' => span_data.normalized_method,

instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/http_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module HttpHelper
6565
# @param method [String, Symbol] The HTTP method
6666
# @param semconv [Symbol] The semantic convention to use (:stable or :old)
6767
# @return [SpanCreationAttributes] struct containing span_name, normalized_method, and original_method
68-
module_function def span_attributes(method, semconv: :stable)
68+
module_function def span_attrs_for(method, semconv: :stable)
6969
normalized = METHOD_CACHE[method]
7070
if normalized
7171
span_name = semconv == :old ? OLD_SPAN_NAMES[normalized] : normalized

instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/dup/tracer_middleware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TracerMiddleware < ::Faraday::Middleware
1616
HTTP_STATUS_SUCCESS_RANGE = (100..399)
1717

1818
def call(env)
19-
span_data = HttpHelper.span_attributes(env.method)
19+
span_data = HttpHelper.span_attrs_for(env.method)
2020

2121
config = Faraday::Instrumentation.instance.config
2222

0 commit comments

Comments
 (0)