Skip to content

Commit

Permalink
chore: merge upstream changes (#7)
Browse files Browse the repository at this point in the history
* chore: use stable toys version

* chore: use stable version of toys release code

* release: Release 2 gems (open-telemetry#675)

* fix: Fix "uses cases" typo in `CONTRIBUTING.md` (open-telemetry#679)

* chore(deps-dev): update webmock requirement from ~> 3.18.1 to ~> 3.19.1 in /resources/azure (open-telemetry#653)

* chore(deps-dev): update webmock requirement from ~> 3.18.1 to ~> 3.19.1 in /resources/google_cloud_platform (open-telemetry#652)

* fix: Remove dependence on activesupport (open-telemetry#687)

Instrumentations must not use transitive dependencies used by the library.

In this case, relying on the gruf library to load specific ActiveSupport extensions leaves the instrumentation vulnerable to bugs.

For this reason I have changed the code to use Enumerable methods instead of ActiveSupport extensions.

See open-telemetry#686

* fix!: Drop DelayedJob ActiveRecord in Tests (open-telemetry#685)

* fix: Add Rails 7.1 compatability (open-telemetry#684)

* chore: Add tests for Rails 7.1

* fix: Rails 7.1 incompatabilities

* feat!: obfuscation for mysql2, dalli and postgresql as default option for db_statement (open-telemetry#682)

* feat!: fuscation for mysql2, dalli and pg

* feat!: update readme

* feat!: set db.statement option to obfuscate by default for mysql2, pg and dalli

Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>

* ci: Update test reset code for GraphQL-Ruby 2.1.3 (open-telemetry#691)

Fixes open-telemetry#689

* fix: Omit `nil` `net.peer.name` attributes (open-telemetry#693)

* ci: upgrade to latest stable version of toys (open-telemetry#694)

Fixes errors with incompatible versions defined in the configs:

https://github.com/open-telemetry/opentelemetry-ruby-contrib/actions/runs/6534421626/job/17741560442#step:5:10

* release: Release 12 gems (open-telemetry#695)

* release: Release 12 gems

* opentelemetry-instrumentation-gruf 0.1.1 (was 0.1.0)
* opentelemetry-instrumentation-active_support 0.4.3 (was 0.4.2)
* opentelemetry-instrumentation-action_view 0.6.1 (was 0.6.0)
* opentelemetry-instrumentation-action_pack 0.7.1 (was 0.7.0)
* opentelemetry-instrumentation-active_job 0.6.1 (was 0.6.0)
* opentelemetry-instrumentation-active_record 0.6.3 (was 0.6.2)
* opentelemetry-instrumentation-dalli 0.25.0 (was 0.24.2)
* opentelemetry-instrumentation-delayed_job 0.22.0 (was 0.21.0)
* opentelemetry-instrumentation-faraday 0.23.3 (was 0.23.2)
* opentelemetry-instrumentation-mysql2 0.25.0 (was 0.24.3)
* opentelemetry-instrumentation-pg 0.26.0 (was 0.25.3)
* opentelemetry-instrumentation-rails 0.28.1 (was 0.28.0)

* ci: Trigger builds

* fix: Apply suggestions from code review

Co-authored-by: Josef Šimánek <josef.simanek@gmail.com>

* fix: bump gem versions

* fix: bump gems

---------

Co-authored-by: Ariel Valentin <ariel@arielvalentin.com>
Co-authored-by: Ariel Valentin <arielvalentin@github.com>
Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>
Co-authored-by: Josef Šimánek <josef.simanek@gmail.com>

* chore: Update CODEOWNERS (open-telemetry#692)

* chore: Update CODEOWNERS

Add @simi and @kaylareopelle and approvers to the list

* release: Release opentelemetry-instrumentation-all 0.51.0 (was 0.50.1) (open-telemetry#699)

* release: Release opentelemetry-instrumentation-all 0.51.0 (was 0.50.1)

* docs: Update all gem Changelog

---------

Co-authored-by: Ariel Valentin <ariel@arielvalentin.com>
Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>

* feat(trilogy): instrument connect and ping (open-telemetry#704)

These can be just as slow as a query if not slower.

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>

* fix: Remove dependency on ActiveSupport core extensions from Grape instrumentation (open-telemetry#706)

* release: Release opentelemetry-instrumentation-trilogy 0.57.0 (was 0.56.3) (open-telemetry#708)

* release: Release opentelemetry-instrumentation-trilogy 0.57.0 (was 0.56.3)

* Empty commit

* Release instrumentation-all as well.

---------

Co-authored-by: Ariel Valentin <ariel@arielvalentin.com>
Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com>

* chore(deps): update rubocop requirement from ~> 1.56.2 to ~> 1.57.1 (open-telemetry#702)

Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.56.2...v1.57.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1 in /instrumentation/base (open-telemetry#701)

chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1

Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.56.1...v1.57.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1 in /resource_detectors (open-telemetry#700)

chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1

Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.56.1...v1.57.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1 in /propagator/ottrace (open-telemetry#698)

chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1

Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.56.1...v1.57.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1 in /propagator/xray (open-telemetry#697)

chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57.1

Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.56.1...v1.57.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove opentelemetry-resource_detectors all-in-one gem (open-telemetry#659)

* fix: remove call to ActiveSupport::Notifications.notifier#synchronize deprecated in Rails 7.2 (open-telemetry#707)

* wrap call to depcrecated private API behind version conditional

* convert Rails version string to Gem::Version

* fix module access?

* check for synchronize method instead of Rails version

* add comment

---------

Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>

* chore: Fix linter issue

* release: Release 2 gems (open-telemetry#710)

* release: Release 2 gems

* opentelemetry-instrumentation-grape 0.1.5 (was 0.1.4)
* opentelemetry-instrumentation-active_support 0.4.4 (was 0.4.3)

* ci: Force

---------

Co-authored-by: Ariel Valentin <ariel@arielvalentin.com>
Co-authored-by: Ariel Valentin <arielvalentin@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ariel Valentin <arielvalentin@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sam Bostock <sambostock@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>
Co-authored-by: Xuan <112967240+xuan-cao-swi@users.noreply.github.com>
Co-authored-by: Robert Mosolgo <rdmosolgo@gmail.com>
Co-authored-by: Yohei Kitamura <3087402+yoheyk@users.noreply.github.com>
Co-authored-by: Ariel Valentin <ariel@arielvalentin.com>
Co-authored-by: Josef Šimánek <josef.simanek@gmail.com>
Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Muriel <m.picone.farias@catawiki.nl>
Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com>
Co-authored-by: Sander Jans <scbjans@gmail.com>
Co-authored-by: Katherine Oelsner <49968061+octokatherine@users.noreply.github.com>
  • Loading branch information
17 people authored Nov 2, 2023
1 parent ef4ba0b commit 5d4b7d8
Show file tree
Hide file tree
Showing 107 changed files with 402 additions and 1,225 deletions.
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ updates:
directory: "/instrumentation/rails"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resource_detectors"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resources/azure"
schedule:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci-contrib-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
fail-fast: false
matrix:
gem:
- resource_detectors
- resource-detector-azure
- resource-detector-container
- resource-detector-google_cloud_platform
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
fail-fast: false
matrix:
gem:
- resource_detectors
- resource-detector-azure
- resource-detector-container
- resource-detector-google_cloud_platform
Expand Down
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
5 changes: 0 additions & 5 deletions .toys/.data/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,6 @@ gems:
directory: propagator/xray
version_constant: [OpenTelemetry, Propagator, XRay, VERSION]

- name: opentelemetry-resource_detectors
directory: resource_detectors
version_rb_path: lib/opentelemetry/resource/detectors/version.rb
version_constant: [OpenTelemetry, Resource, Detectors, VERSION]

- name: opentelemetry-resource-detector-azure
directory: resources/azure
version_rb_path: lib/opentelemetry/resource/detector/azure/version.rb
Expand Down
3 changes: 2 additions & 1 deletion .toys/.toys.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
toys_version! ">= 0.14.5"
toys_version! "0.15.1"

load_git remote: "https://github.com/dazuma/toys.git",
path: ".toys/release",
as: "release",
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
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ As with other OpenTelemetry clients, opentelemetry-ruby follows the
### Focus on Capabilities, Not Structure Compliance

OpenTelemetry is an evolving specification, one where the desires and
use cases are clear, but the method to satisfy those uses cases are not.
use cases are clear, but the method to satisfy those use cases are not.

As such, Contributions should provide functionality and behavior that
conforms to the specification, but the interface and structure are flexible.
Expand Down Expand Up @@ -67,15 +67,15 @@ _Setting up a running Ruby environment is outside the scope of this document._
This repository contains multiple Ruby gems:

* Various instrumentation gems located in subdirectories of `instrumentation`
* Various resource detector gems located in subdirectories of `resources`
* `opentelemetry-propagator-xray` located in the `propagator/xray` directory
* `opentelemetry-propagator-ottrace` located in the `propagator/ottrace` directory
* `opentelemetry-resource_detectors` located in the `resource_detectors` directory

Each of these gems has its configuration and tests.

For example, to test `opentelemetry-resource_detectors` you would:
For example, to test `opentelemetry-instrumentation-action_pack` you would:

1. Change directory to `resource_detectors`
1. Change directory to `instrumentation/action_pack`
2. Install the bundle with `bundle install`
3. Run the tests with `bundle exec rake`

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

gem 'rake', '~> 13.0'
gem 'rubocop', '~> 1.56.2'
gem 'rubocop', '~> 1.57.1'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ using OpenTelemetry with minimal changes to your application. See the
This repository also contains libraries to aid with interoperablity with vendor specific tracing solutions:

- [Context Propagation](propagator/): OTTrace and Amazon X-Ray
- [Resource Detectors](resource_detectors/):
- [Resource Detectors](resources/):
- Azure
- Container
- Google Cloud Platform
Expand Down
4 changes: 4 additions & 0 deletions instrumentation/action_pack/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,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 @@ -15,3 +15,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
14 changes: 4 additions & 10 deletions instrumentation/active_job/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'activejob-6.0' do
gem 'activejob', '~> 6.0.0'
end

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

appraise 'activejob-7.0' do
gem 'activejob', '~> 7.0.0'
%w[6.0.0 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 @@ -15,3 +15,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 @@ -15,3 +15,7 @@ end
appraise 'activesupport-7.0' do
gem 'activesupport', '~> 7.0.0'
end

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

### v0.4.4 / 2023-10-31

* FIXED: Remove call to ActiveSupport::Notifications.notifier#synchronize deprecated in Rails 7.2

### 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 @@ -30,19 +30,23 @@ def self.subscribe(

subscriber_object = ::ActiveSupport::Notifications.subscribe(pattern, subscriber)

::ActiveSupport::Notifications.notifier.synchronize do
subscribers = ::ActiveSupport::Notifications.notifier.instance_variable_get(:@string_subscribers)[pattern]

if subscribers.nil?
OpenTelemetry.handle_error(
message: 'Unable to move OTEL ActiveSupport Notifications subscriber to the front of the notifications list which may cause incomplete traces.' \
'Please report an issue here: ' \
'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/new?labels=bug&template=bug_report.md&title=ActiveSupport%20Notifications%20subscribers%20list%20is%20nil'
)
else
subscribers.unshift(
subscribers.delete(subscriber_object)
)
# this can be removed once we drop support for Rails < 7.2
# see https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/707 for more context
if ::ActiveSupport::Notifications.notifier.respond_to?(:synchronize)
::ActiveSupport::Notifications.notifier.synchronize do
subscribers = ::ActiveSupport::Notifications.notifier.instance_variable_get(:@string_subscribers)[pattern]

if subscribers.nil?
OpenTelemetry.handle_error(
message: 'Unable to move OTEL ActiveSupport Notifications subscriber to the front of the notifications list which may cause incomplete traces.' \
'Please report an issue here: ' \
'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/new?labels=bug&template=bug_report.md&title=ActiveSupport%20Notifications%20subscribers%20list%20is%20nil'
)
else
subscribers.unshift(
subscribers.delete(subscriber_object)
)
end
end
end
subscriber_object
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.4'
end
end
end
8 changes: 8 additions & 0 deletions instrumentation/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release History: opentelemetry-instrumentation-all

### v0.51.1 / 2023-10-27

* ADDED: Instrument connect and ping (Trilogy)

### 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.1'
end
end
end
Loading

0 comments on commit 5d4b7d8

Please sign in to comment.