Skip to content

Commit cae8ddd

Browse files
committed
squash: add documentation
1 parent d647256 commit cae8ddd

File tree

8 files changed

+48
-0
lines changed
  • instrumentation
    • ethon/lib/opentelemetry/instrumentation/ethon
    • excon/lib/opentelemetry/instrumentation/excon
    • faraday/lib/opentelemetry/instrumentation/faraday
    • http_client/lib/opentelemetry/instrumentation/http_client
    • httpx/lib/opentelemetry/instrumentation/httpx
    • http/lib/opentelemetry/instrumentation/http
    • net_http/lib/opentelemetry/instrumentation/net/http
    • restclient/lib/opentelemetry/instrumentation/restclient

8 files changed

+48
-0
lines changed

instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module Ethon
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

instrumentation/excon/lib/opentelemetry/instrumentation/excon/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module Excon
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module Faraday
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

instrumentation/http/lib/opentelemetry/instrumentation/http/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module HTTP
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module HttpClient
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module HTTPX
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ module HTTP
1212
module Helpers
1313
extend self
1414

15+
# Formats the span name based on the HTTP method and URL template if available
16+
#
17+
# @param attributes [Hash] The span attributes hash
18+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
19+
# @return [String] The formatted span name
20+
# @api private
1521
def format_span_name(attributes, http_method)
1622
template = attributes['url.template']
1723
template ? "#{http_method} #{template}" : http_method

instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/helpers.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module RestClient
1111
module Helpers
1212
extend self
1313

14+
# Formats the span name based on the HTTP method and URL template if available
15+
#
16+
# @param attributes [Hash] The span attributes hash
17+
# @param http_method [String] The HTTP request method (e.g., 'GET', 'POST')
18+
# @return [String] The formatted span name
19+
# @api private
1420
def format_span_name(attributes, http_method)
1521
template = attributes['url.template']
1622
template ? "#{http_method} #{template}" : http_method

0 commit comments

Comments
 (0)