Skip to content

Commit

Permalink
Merge branch 'main' into create-sql-instrumentation-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle authored Sep 19, 2023
2 parents 0566002 + 352812e commit 7329407
Show file tree
Hide file tree
Showing 155 changed files with 1,789 additions and 424 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,15 @@ updates:
directory: "/resource_detectors"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resources/azure"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resources/container"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resources/google_cloud_platform"
schedule:
interval: weekly
6 changes: 4 additions & 2 deletions .github/workflows/ci-contrib-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
name: "propagator-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -111,15 +111,17 @@ jobs:
matrix:
gem:
- resource_detectors
- resource-detector-azure
- resource-detector-container
- resource-detector-google_cloud_platform
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
name: "propagator-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -94,13 +94,15 @@ jobs:
matrix:
gem:
- resource_detectors
- resource-detector-azure
- resource-detector-container
- resource-detector-google_cloud_platform
os:
- ubuntu-latest
name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-instrumentation-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: ${{ matrix.gem }} / ubuntu-latest / services
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-instrumentation-with-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: other / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
name: mysql / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
name: kafka / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
name: redis / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
name: postgresql / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
name: rabbitmq / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/installation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: ${{ matrix.ruby-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
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 @@ -16,7 +16,7 @@ jobs:
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
- name: Process release request
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 @@ -17,7 +17,7 @@ jobs:
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
- name: Update open releases
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 @@ -26,7 +26,7 @@ jobs:
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
- name: Perform release
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 @@ -20,7 +20,7 @@ jobs:
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
- name: Open release pull request
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 @@ -23,7 +23,7 @@ jobs:
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys"
- name: Retry release
Expand Down
3 changes: 1 addition & 2 deletions .instrumentation_generator/templates/gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-api', '~> <%= opentelemetry_version %>'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> <%= instrumentation_base_version %>'

spec.add_development_dependency 'appraisal', '~> 2.2.0'
spec.add_development_dependency 'appraisal', '~> 2.5'
spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
Expand All @@ -38,7 +38,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'

if spec.respond_to?(:metadata)
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
Expand Down
18 changes: 14 additions & 4 deletions .toys/.data/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ gems:
directory: instrumentation/active_model_serializers
version_constant: [OpenTelemetry, Instrumentation, ActiveModelSerializers, VERSION]

- name: opentelemetry-instrumentation-all
directory: instrumentation/all
version_constant: [OpenTelemetry, Instrumentation, All, VERSION]

- name: opentelemetry-instrumentation-concurrent_ruby
directory: instrumentation/concurrent_ruby
version_constant: [OpenTelemetry, Instrumentation, ConcurrentRuby, VERSION]
Expand Down Expand Up @@ -203,6 +199,10 @@ gems:
directory: instrumentation/sinatra
version_constant: [OpenTelemetry, Instrumentation, Sinatra, VERSION]

- name: opentelemetry-instrumentation-all
directory: instrumentation/all
version_constant: [OpenTelemetry, Instrumentation, All, VERSION]

- name: opentelemetry-propagator-ottrace
directory: propagator/ottrace
version_constant: [OpenTelemetry, Propagator, OTTrace, VERSION]
Expand All @@ -216,7 +216,17 @@ gems:
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
version_constant: [OpenTelemetry, Resource, Detector, Azure, VERSION]

- name: opentelemetry-resource-detector-container
directory: resources/container
version_rb_path: lib/opentelemetry/resource/detector/container/version.rb
version_constant: [OpenTelemetry, Resource, Detector, Container, VERSION]

- name: opentelemetry-resource-detector-google_cloud_platform
directory: resources/google_cloud_platform
version_rb_path: lib/opentelemetry/resource/detector/google_cloud_platform/version.rb
version_constant: [OpenTelemetry, Resource, Detector, GoogleCloudPlatform, VERSION]
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,56 @@ For releases to succeed, new gems MUST include the following:
* A `CHANGELOG.md` file.
* A `yard` rake task.

## Dependabot Updates

This repository uses [Dependabot](https://dependabot.com/) to keep dependencies up to date, however there shared development dependencies are often scattered across multiple gems. Dependabot does not currently support the ability to group dependencies for gems in multiple subdirectories, so we use a custom script to bulk update dependencies across all gems.

E.g. if you want to update Rubocop to version 1.56.1, you would run:

```console

$> bin/update-dependencies rubocop 1.56.1

Review your changes and commit
Press any key to continue

```

This will then run a bulk update on all of the gems in the repository, and then prompt you to review the changes and stage them for a commit:

```console

diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec
index 42c5ecba..74fcc743 100644
--- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec
+++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'rake', '~> 13.0'
- spec.add_development_dependency 'rubocop', '~> 1.50.0'
+ spec.add_development_dependency 'rubocop', '~> 1.56.1'
spec.add_development_dependency 'simplecov', '~> 0.22.0'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'
(1/1) Stage this hunk [y,n,q,a,d,e,?]? y

diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec
index e29acbfc..85622d25 100644
--- a/propagator/xray/opentelemetry-propagator-xray.gemspec
+++ b/propagator/xray/opentelemetry-propagator-xray.gemspec
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'rake', '~> 13.0'
- spec.add_development_dependency 'rubocop', '~> 1.50.0'
+ spec.add_development_dependency 'rubocop', '~> 1.56.1'
spec.add_development_dependency 'simplecov', '~> 0.22.0'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'
(1/1) Stage this hunk [y,n,q,a,d,e,?]? y
```

[cncf-cla]: https://identity.linuxfoundation.org/projects/cncf
[github-draft]: https://github.blog/2019-02-14-introducing-draft-pull-requests/
[kube-github-workflow-pr]: https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md#7-create-a-pull-request
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.55.1'
gem 'rubocop', '~> 1.56.2'
19 changes: 19 additions & 0 deletions bin/update-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

if [ -z "$1" ] ; then
echo "gem name is required!" && exit 1;
fi

if [ -z "$2" ] ; then
echo "gem version is required!" && exit 2;
fi

for gemspec in $(git ls-files \*.gemspec)
do
sed -i -E "s/'$1', '~> [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'/'$1', '~> $2'/" "$gemspec"
done

echo "Review your changes and commit"
read -n 1 -s -r -p "Press any key to continue"
echo ""
git add -p
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'
spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.21'

spec.add_development_dependency 'appraisal', '~> 2.2.0'
spec.add_development_dependency 'appraisal', '~> 2.5'
spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rails', '>= 6'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.55.1'
spec.add_development_dependency 'rubocop', '~> 1.56.1'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'webmock', '~> 3.19'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'

if spec.respond_to?(:metadata)
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.1'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

spec.add_development_dependency 'appraisal', '~> 2.2.0'
spec.add_development_dependency 'appraisal', '~> 2.5'
spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rails', '>= 6'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.55.1'
spec.add_development_dependency 'rubocop', '~> 1.56.1'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'webmock', '~> 3.19'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'

if spec.respond_to?(:metadata)
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
Expand Down
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.0 / 2023-09-07

* FIXED: Align messaging instrumentation operation names

### v0.5.2 / 2023-08-03

* FIXED: Add code semconv attributes
Expand Down
Loading

0 comments on commit 7329407

Please sign in to comment.