Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge upstream changes #7

Merged
merged 29 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d7af22
chore: use stable toys version
arielvalentin Sep 27, 2023
48baa03
chore: use stable version of toys release code
arielvalentin Sep 27, 2023
d89b68e
release: Release 2 gems (#675)
github-actions[bot] Sep 27, 2023
1e8fd4e
fix: Fix "uses cases" typo in `CONTRIBUTING.md` (#679)
sambostock Sep 30, 2023
d298d61
chore(deps-dev): update webmock requirement from ~> 3.18.1 to ~> 3.19…
dependabot[bot] Sep 30, 2023
d3690bc
chore(deps-dev): update webmock requirement from ~> 3.18.1 to ~> 3.19…
dependabot[bot] Sep 30, 2023
aaac9bb
fix: Remove dependence on activesupport (#687)
arielvalentin Oct 10, 2023
fc5a75f
fix!: Drop DelayedJob ActiveRecord in Tests (#685)
arielvalentin Oct 10, 2023
93dcf35
fix: Add Rails 7.1 compatability (#684)
arielvalentin Oct 11, 2023
20e1cd0
feat!: obfuscation for mysql2, dalli and postgresql as default option…
xuan-cao-swi Oct 12, 2023
dd90f32
ci: Update test reset code for GraphQL-Ruby 2.1.3 (#691)
rmosolgo Oct 13, 2023
0cc425b
fix: Omit `nil` `net.peer.name` attributes (#693)
yoheyk Oct 16, 2023
9f0521d
ci: upgrade to latest stable version of toys (#694)
arielvalentin Oct 16, 2023
db09e16
release: Release 12 gems (#695)
github-actions[bot] Oct 16, 2023
54ed527
chore: Update CODEOWNERS (#692)
arielvalentin Oct 17, 2023
27448c4
release: Release opentelemetry-instrumentation-all 0.51.0 (was 0.50.1…
github-actions[bot] Oct 17, 2023
6e7f8da
feat(trilogy): instrument connect and ping (#704)
casperisfine Oct 21, 2023
c5f5c58
fix: Remove dependency on ActiveSupport core extensions from Grape in…
muripic Oct 23, 2023
06fba20
release: Release opentelemetry-instrumentation-trilogy 0.57.0 (was 0.…
github-actions[bot] Oct 27, 2023
c1f5e6a
chore(deps): update rubocop requirement from ~> 1.56.2 to ~> 1.57.1 (…
dependabot[bot] Oct 28, 2023
da70047
chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57…
dependabot[bot] Oct 28, 2023
4513de9
chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57…
dependabot[bot] Oct 28, 2023
84b5ea0
chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57…
dependabot[bot] Oct 28, 2023
d1104a0
chore(deps-dev): update rubocop requirement from ~> 1.56.1 to ~> 1.57…
dependabot[bot] Oct 28, 2023
331d5d5
Remove opentelemetry-resource_detectors all-in-one gem (#659)
scbjans Oct 30, 2023
828e137
fix: remove call to ActiveSupport::Notifications.notifier#synchronize…
octokatherine Oct 31, 2023
485300a
chore: Fix linter issue
arielvalentin Oct 31, 2023
5858549
release: Release 2 gems (#710)
github-actions[bot] Oct 31, 2023
36c1f82
Merge remote-tracking branch 'origin/main' into main-aoeur
jdehaan Nov 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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