Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/googleapis/release…
Browse files Browse the repository at this point in the history
…-please-action-4.1.3
  • Loading branch information
arielvalentin authored Jun 16, 2024
2 parents 3b91eae + 3f46e7a commit 38da851
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 28 deletions.
5 changes: 5 additions & 0 deletions instrumentation/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module All
VERSION = '0.60.0'
VERSION = '0.61.0'
end
end
end
8 changes: 4 additions & 4 deletions instrumentation/ethon/Appraisals
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions instrumentation/ethon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Ethon
VERSION = '0.21.5'
VERSION = '0.21.6'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
25 changes: 7 additions & 18 deletions instrumentation/grape/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions instrumentation/grape/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ gemspec
group :test do
gem 'opentelemetry-instrumentation-base', path: '../base'
gem 'opentelemetry-instrumentation-rack', path: '../rack'
gem 'builder'
end
4 changes: 4 additions & 0 deletions instrumentation/rails/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Rails
VERSION = '0.30.1'
VERSION = '0.30.2'
end
end
end

0 comments on commit 38da851

Please sign in to comment.