Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/DavidAnson/markdow…
Browse files Browse the repository at this point in the history
…nlint-cli2-action-18
  • Loading branch information
arielvalentin authored Nov 24, 2024
2 parents b11de10 + 5970bd3 commit 550a422
Show file tree
Hide file tree
Showing 90 changed files with 286 additions and 183 deletions.
1 change: 1 addition & 0 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ runs:
run: |
# 💎 Install dependencies and generate appraisals 💎
bundle install --quiet --jobs=3 --retry=4
bundle exec appraisal clean
bundle exec appraisal generate
working-directory: "${{ steps.setup.outputs.gem_dir }}"

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# Appraisals
instrumentation/**/gemfiles
instrumentation/**/tmp/**/*

# Sqlite file for tests
instrumentation/active_record/db
Expand All @@ -26,3 +27,4 @@ instrumentation/active_record/db
.ruby-version

tags
!**/*/.gitkeep
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source 'https://rubygems.org'

gem 'rake', '~> 13.0'
gem 'rubocop', '~> 1.68.0'
gem 'rubocop-performance', '~> 1.21.0'
gem 'rubocop-performance', '~> 1.23.0'
2 changes: 1 addition & 1 deletion helpers/mysql/opentelemetry-helpers-mysql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.22.0'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'

Expand Down
24 changes: 12 additions & 12 deletions instrumentation/action_mailer/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'rails-6.1' do
gem 'rails', '~> 6.1.0'
end

appraise 'rails-7.0' do
gem 'rails', '~> 7.0.0'
end

appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
%w[6.1.0 7.0.0 7.1.0].each do |version|
appraise "action_mailer-#{version}" do
gem 'rails', "~> #{version}"
end
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
%w[7.2.0].each do |version|
appraise "action_mailer-#{version}" do
gem 'rails', "~> #{version}"
end
end

appraise 'action_mailer-latest' do
gem 'rails'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
24 changes: 12 additions & 12 deletions instrumentation/action_pack/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'rails-6.1' do
gem 'rails', '~> 6.1.0'
end

appraise 'rails-7.0' do
gem 'rails', '~> 7.0.0'
end

appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
%w[6.1.0 7.0.0 7.1.0].each do |version|
appraise "rails-#{version}" do
gem 'rails', "~> #{version}"
end
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
%w[7.2.0].each do |version|
appraise "rails-#{version}" do
gem 'rails', "~> #{version}"
end
end

appraise 'rails-latest' do
gem 'rails'
end
end
4 changes: 4 additions & 0 deletions instrumentation/action_pack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-action_pack

### v0.10.0 / 2024-11-19

* ADDED: Use Semconv Naming For ActionPack

### v0.9.0 / 2024-01-09

* BREAKING CHANGE: Use ActiveSupport instead of patches #703
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActionPack
VERSION = '0.9.0'
VERSION = '0.10.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let(:exporter) { EXPORTER }
let(:spans) { exporter.finished_spans }
let(:span) { exporter.finished_spans.last }
let(:rails_app) { DEFAULT_RAILS_APP }
let(:rails_app) { AppConfig.initialize_app }
let(:config) { {} }

# Clear captured spans
Expand Down
5 changes: 0 additions & 5 deletions instrumentation/action_pack/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,3 @@
c.use 'OpenTelemetry::Instrumentation::ActionPack'
c.add_span_processor span_processor
end

# Create a globally available Rails app, this should be used in test unless
# specifically testing behaviour with different initialization configs.
DEFAULT_RAILS_APP = AppConfig.initialize_app
Rails.application = DEFAULT_RAILS_APP
4 changes: 2 additions & 2 deletions instrumentation/action_pack/test/test_helpers/app_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
# SPDX-License-Identifier: Apache-2.0

class Application < Rails::Application; end
require 'action_controller/railtie'
class Application < Rails::Application; end
require_relative 'middlewares'
require_relative 'controllers'
require_relative 'routes'
Expand All @@ -30,7 +30,7 @@ def initialize_app(use_exceptions_app: false, remove_rack_tracer_middleware: fal
case Rails.version
when /^6\.1/
apply_rails_6_1_configs(new_app)
when /^7\./
when /^7|8\./
apply_rails_7_configs(new_app)
end

Expand Down
24 changes: 12 additions & 12 deletions instrumentation/action_view/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'rails-6.1' do
gem 'rails', '~> 6.1.0'
end

appraise 'rails-7.0' do
gem 'rails', '~> 7.0.0'
end

appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
%w[6.1.0 7.0.0 7.1.0].each do |version|
appraise "action_view-#{version}" do
gem 'rails', "~> #{version}"
end
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
%w[7.2.0].each do |version|
appraise "rails-#{version}" do
gem 'rails', "~> #{version}"
end
end

appraise 'rails-latest' do
gem 'rails'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rails', '>= 6.1'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
12 changes: 10 additions & 2 deletions instrumentation/active_job/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
end
end

appraise 'activejob-latest' do
gem 'activejob'
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
%w[7.2.0].each do |version|
appraise "activejob-#{version}" do
gem 'activejob', "~> #{version}"
end
end

appraise 'activejob-latest' do
gem 'activejob'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rspec-mocks'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
27 changes: 15 additions & 12 deletions instrumentation/active_record/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'activerecord-6.1' do
gem 'activerecord', '~> 6.1.0'
end

appraise 'activerecord-7.0' do
gem 'activerecord', '~> 7.0.0'
end

appraise 'activerecord-7.1' do
gem 'activerecord', '~> 7.1.0'
%w[6.1.0 7.0.0 7.1.0].each do |version|
appraise "activerecord-#{version}" do
gem 'sqlite3', '~> 1.4'
gem 'activerecord', "~> #{version}"
end
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'activerecord-7.2' do
gem 'activerecord', '~> 7.2.0'
%w[7.2.0].each do |version|
appraise "activerecord-#{version}" do
gem 'sqlite3', '~> 1.4'
gem 'activerecord', "~> #{version}"
end
end

appraise 'activerecord-latest' do
gem 'sqlite3', '>= 2.1'
gem 'activerecord'
end
end
4 changes: 4 additions & 0 deletions instrumentation/active_record/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-active_record

### v0.8.1 / 2024-11-21

* FIXED: Pass block argument in ActiveRecord `find_by_sql` patch.

### v0.8.0 / 2024-10-22

* BREAKING CHANGE: Rename Active Record find_by_sql spans to query
Expand Down
1 change: 0 additions & 1 deletion instrumentation/active_record/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ group :test do
gem 'byebug'
gem 'opentelemetry-instrumentation-base', path: '../base'
gem 'pry-byebug'
gem 'sqlite3', '~> 1.4'
end
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class << base
module ClassMethods
method_name = ::ActiveRecord.version >= Gem::Version.new('7.0.0') ? :_query_by_sql : :find_by_sql

define_method(method_name) do |*args, **kwargs|
define_method(method_name) do |*args, **kwargs, &block|
tracer.in_span("#{self} query") do
super(*args, **kwargs)
super(*args, **kwargs, &block)
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActiveRecord
VERSION = '0.8.0'
VERSION = '0.8.1'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
Loading

0 comments on commit 550a422

Please sign in to comment.