diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 8af4c8996..503c1ae3e 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History: opentelemetry-instrumentation-all +### v0.61.0 / 2024-06-04 + +* ADDED: Add aws lambda to instrumentation-all +* FIXED: Add action_mailer to rails and all + ### v0.60.0 / 2024-02-20 * ADDED: Add support gruf 2.19 diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index fab22c84e..3174770a5 100644 --- a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb +++ b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module All - VERSION = '0.60.0' + VERSION = '0.61.0' end end end diff --git a/instrumentation/ethon/Appraisals b/instrumentation/ethon/Appraisals index 137aed805..61520f97d 100644 --- a/instrumentation/ethon/Appraisals +++ b/instrumentation/ethon/Appraisals @@ -1,9 +1,9 @@ # frozen_string_literal: true -appraise 'ethon-0.12' do - gem 'ethon', '~> 0.12.0' +appraise 'ethon-0.16' do + gem 'ethon', '~> 0.16.0' end -appraise 'ethon-0.11' do - gem 'ethon', '~> 0.11.0' +appraise 'ethon-latest' do + gem 'ethon' end diff --git a/instrumentation/ethon/CHANGELOG.md b/instrumentation/ethon/CHANGELOG.md index 35f7b1a85..160a95104 100644 --- a/instrumentation/ethon/CHANGELOG.md +++ b/instrumentation/ethon/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-ethon +### v0.21.6 / 2024-06-12 + +* FIXED: Add net.peer.name to ethon + ### v0.21.5 / 2024-05-09 * FIXED: Untrace entire request diff --git a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb index 18b11dc51..74791818e 100644 --- a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb +++ b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb @@ -87,8 +87,11 @@ def span_creation_attributes(method) 'http.method' => method } - http_url = OpenTelemetry::Common::Utilities.cleanse_url(url) - instrumentation_attrs['http.url'] = http_url if http_url + uri = _otel_cleanse_uri(url) + if uri + instrumentation_attrs['http.url'] = uri.to_s + instrumentation_attrs['net.peer.name'] = uri.host if uri.host + end config = Ethon::Instrumentation.instance.config instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service] @@ -97,6 +100,20 @@ def span_creation_attributes(method) ) end + # Returns a URL string with userinfo removed. + # + # @param [String] url The URL string to cleanse. + # + # @return [String] the cleansed URL. + def _otel_cleanse_uri(url) + cleansed_url = URI.parse(url) + cleansed_url.password = nil + cleansed_url.user = nil + cleansed_url + rescue URI::Error + nil + end + def tracer Ethon::Instrumentation.instance.tracer end diff --git a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb index e62d8793b..1b74051bf 100644 --- a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb +++ b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Ethon - VERSION = '0.21.5' + VERSION = '0.21.6' end end end diff --git a/instrumentation/ethon/test/opentelemetry/instrumentation/ethon/instrumentation_test.rb b/instrumentation/ethon/test/opentelemetry/instrumentation/ethon/instrumentation_test.rb index 1c3a24035..e39779bf0 100644 --- a/instrumentation/ethon/test/opentelemetry/instrumentation/ethon/instrumentation_test.rb +++ b/instrumentation/ethon/test/opentelemetry/instrumentation/ethon/instrumentation_test.rb @@ -71,6 +71,7 @@ _(span.attributes['http.method']).must_equal 'N/A' _(span.attributes['http.status_code']).must_be_nil _(span.attributes['http.url']).must_equal 'http://example.com/test' + _(span.attributes['net.peer.name']).must_equal 'example.com' end end end @@ -275,8 +276,10 @@ def stub_response(options) multi.perform _(exporter.finished_spans.size).must_equal 2 - _(exporter.finished_spans[0].attributes['http.url']).must_equal nil + _(exporter.finished_spans[0].attributes['http.url']).must_be_nil + _(exporter.finished_spans[0].attributes['net.peer.name']).must_be_nil _(exporter.finished_spans[1].attributes['http.url']).must_equal 'test' + _(exporter.finished_spans[1].attributes['net.peer.name']).must_be_nil end end end diff --git a/instrumentation/grape/Appraisals b/instrumentation/grape/Appraisals index f12843271..0ada7ab1e 100644 --- a/instrumentation/grape/Appraisals +++ b/instrumentation/grape/Appraisals @@ -4,26 +4,15 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'grape-1.2' do - gem 'grape', '~> 1.2' +appraise 'grape-1.x' do + gem 'rack', '~> 2.0' + gem 'grape', '~> 1.8' end -appraise 'grape-1.3' do - gem 'grape', '~> 1.3' +appraise 'grape-2.0.x' do + gem 'grape', '~> 2.0.0' end -appraise 'grape-1.4' do - gem 'grape', '~> 1.4' -end - -appraise 'grape-1.5' do - gem 'grape', '~> 1.5' -end - -appraise 'grape-1.6' do - gem 'grape', '~> 1.6' -end - -appraise 'grape-1.7' do - gem 'grape', '~> 1.7' +appraise 'grape-latest' do + gem 'grape' end diff --git a/instrumentation/grape/Gemfile b/instrumentation/grape/Gemfile index ed1ec924e..a97f3cccf 100644 --- a/instrumentation/grape/Gemfile +++ b/instrumentation/grape/Gemfile @@ -15,4 +15,5 @@ gemspec group :test do gem 'opentelemetry-instrumentation-base', path: '../base' gem 'opentelemetry-instrumentation-rack', path: '../rack' + gem 'builder' end diff --git a/instrumentation/rails/CHANGELOG.md b/instrumentation/rails/CHANGELOG.md index d675a1c6a..ce815236c 100644 --- a/instrumentation/rails/CHANGELOG.md +++ b/instrumentation/rails/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rails +### v0.30.2 / 2024-06-04 + +* FIXED: Add action_mailer to rails and all + ### v0.30.1 / 2024-04-30 * FIXED: Bundler conflict warnings diff --git a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb index 9975f21a2..ace5badb9 100644 --- a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb +++ b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Rails - VERSION = '0.30.1' + VERSION = '0.30.2' end end end