Skip to content

Commit

Permalink
Merge branch 'main' into fix-singleton-race-condition
Browse files Browse the repository at this point in the history
  • Loading branch information
zvkemp authored Jan 7, 2025
2 parents fcd48b5 + 0cfc9d0 commit f101f21
Show file tree
Hide file tree
Showing 40 changed files with 306 additions and 194 deletions.
4 changes: 2 additions & 2 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ runs:
# ...but not for appraisals, sadly.
- name: Install Ruby ${{ inputs.ruby }} with dependencies
if: "${{ steps.setup.outputs.appraisals == 'false' }}"
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: "${{ inputs.ruby }}"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
Expand All @@ -77,7 +77,7 @@ runs:
# If we're using appraisals, do it all manually.
- name: Install Ruby ${{ inputs.ruby }} without dependencies
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: "${{ inputs.ruby }}"
bundler: "latest"
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/ci-markdown-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ name: Markdown Link Check

on:
pull_request:
paths:
- '**/*.md'

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: "Markdown Link Check"
uses: gaurav-nelson/github-action-markdown-link-check@v1
# equivalent cli: linkspector check
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
with:
config-file: '.markdown-link-check.json'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
fail_on_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

# equivalent cli: markdownlint-cli2 "**/*.md" "#**/CHANGELOG.md" --config .markdownlint.json
- name: "Markdown Lint Check"
uses: DavidAnson/markdownlint-cli2-action@v18
uses: DavidAnson/markdownlint-cli2-action@v19
with:
fix: false
globs: |
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 @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
# ATTENTION: Dependabot does not know how to update shared actions file.
# If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml
- uses: ruby/setup-ruby@v1.203.0
- uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: "Install Latest Gem Versions on ${{ 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 @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
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 @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
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 @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
- uses: ruby/setup-ruby@v1.203.0
- uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: "3.0"
bundler: latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-request-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
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 @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
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 @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.203.0
uses: ruby/setup-ruby@v1.207.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
10 changes: 0 additions & 10 deletions .markdown-link-check.json

This file was deleted.

4 changes: 4 additions & 0 deletions instrumentation/action_mailer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-action_mailer

### v0.3.0 / 2024-12-19

* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0

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

* ADDED: Subscribe to process.action_mailer notifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActionMailer
VERSION = '0.2.0'
VERSION = '0.3.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 3.0'

spec.add_dependency 'opentelemetry-api', '~> 1.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.1'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

spec.add_development_dependency 'appraisal', '~> 2.5'
Expand Down
32 changes: 18 additions & 14 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.8.0 / 2024-12-19

* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0

### v0.7.3 / 2024-08-23

* FIXED: ActionView Support Legacy Formats
Expand All @@ -24,51 +28,51 @@

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

* ADDED: Render layout for action view
* FIXED: Base config options
* ADDED: Render layout for action view
* FIXED: Base config options

### v0.5.0 / 2023-04-17

* BREAKING CHANGE: Drop support for EoL Ruby 2.7
* BREAKING CHANGE: Drop support for EoL Ruby 2.7

* ADDED: Drop support for EoL Ruby 2.7
* ADDED: Drop support for EoL Ruby 2.7

### v0.4.0 / 2023-02-01

* BREAKING CHANGE: Drop Rails 5 Support
* BREAKING CHANGE: Drop Rails 5 Support

* ADDED: Drop Rails 5 Support
* ADDED: Drop Rails 5 Support

### v0.3.1 / 2023-01-14

* DOCS: Fix gem homepage
* DOCS: More gem documentation fixes
* DOCS: Fix gem homepage
* DOCS: More gem documentation fixes

### v0.3.0 / 2022-06-09

* Upgrading Base dependency version
* FIXED: Broken test file requirements
* FIXED: Broken test file requirements

### v0.2.1 / 2022-05-02

* FIXED: RubyGems Fallback
* FIXED: RubyGems Fallback

### v0.2.0 / 2021-12-01

* ADDED: Move activesupport notification subscriber out of action_view gem
* FIXED: Instrumentation of Rails 7
* ADDED: Move activesupport notification subscriber out of action_view gem
* FIXED: Instrumentation of Rails 7

### v0.1.3 / 2021-10-06

* FIXED: Do not replace fanout
* FIXED: Do not replace fanout

### v0.1.2 / 2021-09-29

* (No significant changes)

### v0.1.1 / 2021-09-09

* FIXED: Keep Active Support subscriptions intact when patching
* FIXED: Keep Active Support subscriptions intact when patching

### v0.1.0 / 2021-08-12

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.7.3'
VERSION = '0.8.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 3.0'

spec.add_dependency 'opentelemetry-api', '~> 1.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.6'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

spec.add_development_dependency 'appraisal', '~> 2.5'
Expand Down
18 changes: 11 additions & 7 deletions instrumentation/active_model_serializers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-active_model_serializers

### v0.21.0 / 2024-12-19

* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0

### v0.20.3 / 2024-12-04

* FIXED: Use ActiveSupport::Notifications subscriber to serialize events.
Expand All @@ -10,28 +14,28 @@

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

* FIXED: Base config options
* FIXED: Base config options

### v0.20.0 / 2023-04-17

* BREAKING CHANGE: Drop support for EoL Ruby 2.7

* ADDED: Drop support for EoL Ruby 2.7
* ADDED: Drop support for EoL Ruby 2.7

### v0.19.1 / 2023-01-14

* DOCS: Fix gem homepage
* DOCS: More gem documentation fixes
* DOCS: Fix gem homepage
* DOCS: More gem documentation fixes

### v0.19.0 / 2022-06-09

* Upgrading Base dependency version
* FIXED: Broken test file requirements
* FIXED: Broken test file requirements

### v0.18.5 / 2022-05-02

* FIXED: `ActiveSupport` constant conflict in Active Model Serializers instrumentation
* FIXED: RubyGems Fallback
* FIXED: `ActiveSupport` constant conflict in Active Model Serializers instrumentation
* FIXED: RubyGems Fallback

### v0.18.4 / 2021-12-02

Expand Down
1 change: 1 addition & 0 deletions instrumentation/active_model_serializers/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ gemspec

group :test do
gem 'opentelemetry-instrumentation-base', path: '../base'
gem 'opentelemetry-instrumentation-active_support', path: '../active_support'
end
2 changes: 1 addition & 1 deletion instrumentation/active_model_serializers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end

## Examples

Example usage of active_model_serializers can be seen in the `./example/active_model_serializers.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/active_model_serializers/example/active_model_serializers.rb)
Example usage of active_model_serializers can be seen in the `./example/` folder [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/active_model_serializers/example)

## How can I get involved?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActiveModelSerializers
VERSION = '0.20.3'
VERSION = '0.21.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 3.0'

spec.add_dependency 'opentelemetry-api', '~> 1.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '>= 0.6.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '>= 0.7.0'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

spec.add_development_dependency 'active_model_serializers', '>= 0.10.0'
Expand Down
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.7.0 / 2024-12-19

* ADDED: Enable support for `Regexp` patterns when subscribing to Active Support's instrumentation Events

### v0.6.0 / 2024-07-02

* BREAKING CHANGE: Custom ActiveSupport Span Names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.subscribe(
span_name_formatter: nil
)
subscriber = OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new(
name: pattern,
pattern: pattern,
tracer: tracer,
notification_payload_transform: notification_payload_transform,
disallowed_notification_payload_keys: disallowed_notification_payload_keys,
Expand Down Expand Up @@ -64,17 +64,18 @@ class SpanSubscriber
ALWAYS_VALID_PAYLOAD_TYPES = [TrueClass, FalseClass, String, Numeric, Symbol].freeze

# rubocop:disable Metrics/ParameterLists
def initialize(name:, tracer:, notification_payload_transform: nil, disallowed_notification_payload_keys: nil, kind: nil, span_name_formatter: nil)
@span_name = safe_span_name_for(span_name_formatter, name).dup.freeze
def initialize(pattern:, tracer:, notification_payload_transform: nil, disallowed_notification_payload_keys: nil, kind: nil, span_name_formatter: nil)
@pattern = pattern
@tracer = tracer
@notification_payload_transform = notification_payload_transform
@disallowed_notification_payload_keys = Array(disallowed_notification_payload_keys)
@kind = kind || :internal
@span_name_formatter = span_name_formatter
end
# rubocop:enable Metrics/ParameterLists

def start(name, id, payload)
span = @tracer.start_span(@span_name, kind: @kind)
span = @tracer.start_span(safe_span_name_for(name), kind: @kind)
token = OpenTelemetry::Context.attach(
OpenTelemetry::Trace.context_with_span(span)
)
Expand Down Expand Up @@ -140,8 +141,8 @@ def sanitized_value(value)
# Helper method to try an shield the span name formatter from errors
#
# It wraps the user supplied formatter in a rescue block and returns the original name if a StandardError is raised by the formatter
def safe_span_name_for(span_name_formatter, name)
span_name_formatter&.call(name) || name
def safe_span_name_for(name)
@span_name_formatter&.call(name) || name
rescue StandardError => e
OpenTelemetry.handle_error(exception: e, message: 'Error calling span_name_formatter. Using default span name.')
name
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.6.0'
VERSION = '0.7.0'
end
end
end
Loading

0 comments on commit f101f21

Please sign in to comment.