Skip to content

Commit

Permalink
Merge branch 'main' into rails-6.0-eol
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin authored Oct 19, 2023
2 parents f78bc26 + 27448c4 commit 22f7128
Show file tree
Hide file tree
Showing 66 changed files with 283 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-hook-on-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
run: "gem install --no-document toys -v 0.15.1"
- name: Process release request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-hook-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
run: "gem install --no-document toys -v 0.15.1"
- name: Update open releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-perform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
run: "gem install --no-document toys -v 0.15.1"
- name: Perform release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
run: "gem install --no-document toys -v 0.15.1"
- name: Open release pull request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
run: "gem install --no-document toys -v 0.15.1"
- name: Retry release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .toys/.toys.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
toys_version! "0.14.7"
toys_version! "0.15.1"

load_git remote: "https://github.com/dazuma/toys.git",
path: ".toys/release",
as: "release",
commit: "toys/v0.14.7",
commit: "toys/v0.15.1",
update: 3600
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# https://help.github.com/en/articles/about-code-owners
#

* @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd
* @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle @open-telemetry/ruby-contrib-approvers

resources/container/ @scbjans @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd

Expand Down
4 changes: 4 additions & 0 deletions instrumentation/action_pack/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ end
appraise 'rails-7.0' do
gem 'rails', '~> 7.0.0'
end

appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
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.7.1 / 2023-10-16

* FIXED: Add Rails 7.1 compatibility

### v0.7.0 / 2023-06-05

* ADDED: Use Rack Middleware Helper
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.7.0'
VERSION = '0.7.1'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/action_view/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ end
appraise 'rails-7.0' do
gem 'rails', '~> 7.0.0'
end

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

### v0.6.1 / 2023-10-16

* FIXED: Add Rails 7.1 compatibility

### v0.6.0 / 2023-06-05

* ADDED: Render layout for action view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActionView
VERSION = '0.6.0'
VERSION = '0.6.1'
end
end
end
10 changes: 4 additions & 6 deletions instrumentation/active_job/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#
# SPDX-License-Identifier: Apache-2.0

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

appraise 'activejob-7.0' do
gem 'activejob', '~> 7.0.0'
%w[6.1.0 7.0.0 7.1.0].each do |version|
appraise "activejob-#{version}" do
gem 'activejob', "~> #{version}"
end
end
4 changes: 4 additions & 0 deletions instrumentation/active_job/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-active_job

### v0.6.1 / 2023-10-16

* FIXED: Add Rails 7.1 compatibility

### v0.6.0 / 2023-09-07

* FIXED: Align messaging instrumentation operation names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def job_attributes(job)
'messaging.destination' => job.queue_name,
'messaging.message_id' => job.job_id,
'messaging.active_job.provider_job_id' => job.provider_job_id,
'messaging.active_job.scheduled_at' => job.scheduled_at,
'messaging.active_job.scheduled_at' => job.scheduled_at&.to_f,
'messaging.active_job.priority' => job.priority
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActiveJob
VERSION = '0.6.0'
VERSION = '0.6.1'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,21 @@
end
end

it 'is set correctly for jobs that do wait' do
it 'records the scheduled at time for apps running Rails 7.1 and newer' do
skip 'scheduled jobs behave differently in Rails 7.1+' if ActiveJob.version < Gem::Version.new('7.1')

job = TestJob.set(wait: 0.second).perform_later

# Only the sending span is a 'scheduled' thing
_(publish_span.attributes['messaging.active_job.scheduled_at']).must_equal(job.scheduled_at)
assert(publish_span.attributes['messaging.active_job.scheduled_at'])
_(publish_span.attributes['messaging.active_job.scheduled_at']).must_equal(job.scheduled_at.to_f)
_(process_span.attributes['messaging.active_job.scheduled_at']).must_equal(job.scheduled_at.to_f)
end

it 'records the scheduled at time for apps running Rails 7.0 or older' do
skip 'scheduled jobs behave differently in Rails 7.1+' if ActiveJob.version >= Gem::Version.new('7.1')

job = TestJob.set(wait: 0.second).perform_later

# The processing span isn't a 'scheduled' thing
_(publish_span.attributes['messaging.active_job.scheduled_at']).must_equal(job.scheduled_at.to_f)
_(process_span.attributes['messaging.active_job.scheduled_at']).must_be_nil
end
end
Expand Down
4 changes: 4 additions & 0 deletions instrumentation/active_record/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ end
appraise 'activerecord-7.0' do
gem 'activerecord', '~> 7.0.0'
end

appraise 'activerecord-7.1' do
gem 'activerecord', '~> 7.1.0'
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.6.3 / 2023-10-16

* FIXED: Add Rails 7.1 compatibility

### v0.6.2 / 2023-08-14

* FIXED: Ensure that transaction name property is used, rather than self
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.6.2'
VERSION = '0.6.3'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/active_support/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ end
appraise 'activesupport-7.0' do
gem 'activesupport', '~> 7.0.0'
end

appraise 'activesupport-7.1' do
gem 'activesupport', '~> 7.1.0'
end
4 changes: 4 additions & 0 deletions instrumentation/active_support/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-active_support

### v0.4.3 / 2023-10-16

* FIXED: Add Rails 7.1 compatibility

### v0.4.2 / 2023-09-07

FIXED: Reduce Object allocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActiveSupport
VERSION = '0.4.2'
VERSION = '0.4.3'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-all

### v0.51.0 / 2023-10-16

* CHANGED: See [#695](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/695) for details

### v0.50.1 / 2023-09-07

* FIXED: Align messaging instrumentation operation names (Resque)
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.50.1'
VERSION = '0.51.0'
end
end
end
8 changes: 4 additions & 4 deletions instrumentation/all/opentelemetry-instrumentation-all.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.5.0'
spec.add_dependency 'opentelemetry-instrumentation-bunny', '~> 0.21.0'
spec.add_dependency 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.21.1'
spec.add_dependency 'opentelemetry-instrumentation-dalli', '~> 0.24.1'
spec.add_dependency 'opentelemetry-instrumentation-delayed_job', '~> 0.21.0'
spec.add_dependency 'opentelemetry-instrumentation-dalli', '~> 0.25.0'
spec.add_dependency 'opentelemetry-instrumentation-delayed_job', '~> 0.22.0'
spec.add_dependency 'opentelemetry-instrumentation-ethon', '~> 0.21.1'
spec.add_dependency 'opentelemetry-instrumentation-excon', '~> 0.21.1'
spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.23.1'
Expand All @@ -43,9 +43,9 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-koala', '~> 0.20.1'
spec.add_dependency 'opentelemetry-instrumentation-lmdb', '~> 0.22.1'
spec.add_dependency 'opentelemetry-instrumentation-mongo', '~> 0.22.1'
spec.add_dependency 'opentelemetry-instrumentation-mysql2', '~> 0.24.2'
spec.add_dependency 'opentelemetry-instrumentation-mysql2', '~> 0.25.0'
spec.add_dependency 'opentelemetry-instrumentation-net_http', '~> 0.22.1'
spec.add_dependency 'opentelemetry-instrumentation-pg', '~> 0.25.2'
spec.add_dependency 'opentelemetry-instrumentation-pg', '~> 0.26.0'
spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.7.0'
spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.3.0'
spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.23.1'
Expand Down
6 changes: 6 additions & 0 deletions instrumentation/dalli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History: opentelemetry-instrumentation-dalli

### v0.25.0 / 2023-10-16

* BREAKING CHANGE: Obfuscation for mysql2, dalli and postgresql as default option for db_statement

* ADDED: Obfuscation for mysql2, dalli and postgresql as default option for db_statement

### v0.24.2 / 2023-07-21

* ADDED: Update `opentelemetry-common` from [0.19.3 to 0.20.0](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/537)
Expand Down
16 changes: 16 additions & 0 deletions instrumentation/dalli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ OpenTelemetry::SDK.configure do |c|
end
```

### Configuration options

```ruby
OpenTelemetry::SDK.configure do |c|
c.use 'OpenTelemetry::Instrumentation::Dalli', {
# You may optionally set a value for 'peer.service', which
# will be included on all spans from this instrumentation:
peer_service: '',

# The obfuscation of query in the db.statement attribute is enabled by default.
# To disable, set db_statement to :include; to omit the query completely, set db_statement to :omit
db_statement: :include,
}
end
```

## How can I get involved?

The `opentelemetry-instrumentation-dalli` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base
end

option :peer_service, default: nil, validate: :string
option :db_statement, default: :include, validate: %I[omit obfuscate include]
option :db_statement, default: :obfuscate, validate: %I[omit obfuscate include]

private

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Dalli
VERSION = '0.24.2'
VERSION = '0.25.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

describe 'tracing' do
before do
instrumentation.install
instrumentation.install(db_statement: :include)
end

it 'accepts peer service name from config' do
Expand Down
12 changes: 10 additions & 2 deletions instrumentation/delayed_job/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'delayed_job-4.1' do
gem 'delayed_job', '~> 4.1.0'
appraise 'delayed_job_4.1-rails-7.1' do
gem 'activejob', '~> 7.1.0'
end

appraise 'delayed_job_4.1-rails-7.0' do
gem 'activejob', '~> 7.0.0'
end

appraise 'delayed_job-4.1-rails-6.1' do
gem 'activejob', '~> 6.1.0'
end
6 changes: 6 additions & 0 deletions instrumentation/delayed_job/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History: opentelemetry-instrumentation-delayed_job

### v0.22.0 / 2023-10-16

* BREAKING CHANGE: Drop DelayedJob ActiveRecord in Tests

* FIXED: Drop DelayedJob ActiveRecord in Tests

### v0.21.0 / 2023-09-07

* FIXED: Align messaging instrumentation operation names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def build_attributes(job)
end

def add_events(span, job)
span.add_event('created_at', timestamp: job.created_at)
span.add_event('run_at', timestamp: job.run_at) if job.run_at
span.add_event('locked_at', timestamp: job.locked_at) if job.locked_at
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module DelayedJob
VERSION = '0.21.0'
VERSION = '0.22.0'
end
end
end
Loading

0 comments on commit 22f7128

Please sign in to comment.