Skip to content

Commit

Permalink
Merge branch 'main' into update-review-guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle authored Jul 8, 2024
2 parents 360eb15 + 08f11ae commit 392dce9
Show file tree
Hide file tree
Showing 33 changed files with 155 additions and 22 deletions.
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.7.2 / 2024-07-02

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.7.1 / 2023-11-23

* CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727)
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.7.1'
VERSION = '0.7.2'
end
end
end
6 changes: 6 additions & 0 deletions instrumentation/active_support/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History: opentelemetry-instrumentation-active_support

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

* BREAKING CHANGE: Custom ActiveSupport Span Names

* ADDED: Custom ActiveSupport Span Names

### v0.5.3 / 2024-06-20

* FIXED: Include span kind in ActiveSupport Instrumentation helper
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.5.3'
VERSION = '0.6.0'
end
end
end
11 changes: 9 additions & 2 deletions instrumentation/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History: opentelemetry-instrumentation-all

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change
* CHANGED: Update Rails Instrumentation
* CHANGED: Update Grape Instrumentation
* CHANGED: Update Sinatra Instrumentation

### v0.61.0 / 2024-06-04

* ADDED: Add aws lambda to instrumentation-all
Expand All @@ -25,15 +32,15 @@

### v0.56.0 / 2024-01-09

* BREAKING CHANGE: Use ActiveSupport instead of patches #703
* BREAKING CHANGE: Use ActiveSupport instead of patches #703

### v0.55.0 / 2024-01-06

* CHANGED: Upgrade Trilogy and Rack [#796](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/796)

### v0.54.0 / 2023-11-28

* ADDED: Updated excon to include connect spans
* ADDED: Updated excon to include connect spans

### v0.53.0 / 2023-11-28

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.61.0'
VERSION = '0.62.0'
end
end
end
6 changes: 3 additions & 3 deletions instrumentation/all/opentelemetry-instrumentation-all.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-ethon', '~> 0.21.1'
spec.add_dependency 'opentelemetry-instrumentation-excon', '~> 0.22.0'
spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.24.0'
spec.add_dependency 'opentelemetry-instrumentation-grape', '~> 0.1.3'
spec.add_dependency 'opentelemetry-instrumentation-grape', '~> 0.2.0'
spec.add_dependency 'opentelemetry-instrumentation-graphql', '~> 0.28.0'
spec.add_dependency 'opentelemetry-instrumentation-gruf', '~> 0.2.0'
spec.add_dependency 'opentelemetry-instrumentation-http', '~> 0.23.1'
Expand All @@ -50,15 +50,15 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.8.0'
spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.3.0'
spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.24.0'
spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.30.0'
spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.31.0'
spec.add_dependency 'opentelemetry-instrumentation-rake', '~> 0.2.1'
spec.add_dependency 'opentelemetry-instrumentation-rdkafka', '~> 0.4.0'
spec.add_dependency 'opentelemetry-instrumentation-redis', '~> 0.25.1'
spec.add_dependency 'opentelemetry-instrumentation-resque', '~> 0.5.0'
spec.add_dependency 'opentelemetry-instrumentation-restclient', '~> 0.22.1'
spec.add_dependency 'opentelemetry-instrumentation-ruby_kafka', '~> 0.21.0'
spec.add_dependency 'opentelemetry-instrumentation-sidekiq', '~> 0.25.0'
spec.add_dependency 'opentelemetry-instrumentation-sinatra', '~> 0.23.1'
spec.add_dependency 'opentelemetry-instrumentation-sinatra', '~> 0.24.0'
spec.add_dependency 'opentelemetry-instrumentation-trilogy', '~> 0.59.0'

spec.add_development_dependency 'active_model_serializers'
Expand Down
4 changes: 4 additions & 0 deletions instrumentation/aws_sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-aws_sdk

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.5.2 / 2024-04-30

* FIXED: Bundler conflict warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module AwsSdk
VERSION = '0.5.2'
VERSION = '0.5.3'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/bunny/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-bunny

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.21.3 / 2024-04-30

* FIXED: Bundler conflict warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Bunny
VERSION = '0.21.3'
VERSION = '0.21.4'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/delayed_job/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-delayed_job

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.22.2 / 2024-04-30

* FIXED: Bundler conflict warnings
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.22.2'
VERSION = '0.22.3'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/grape/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-grape

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

* ADDED: Make the install of rack instrumentation by grape instrumentation optional

### v0.1.8 / 2024-05-14

* DOCS: Instrumentation Authors Guide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ module OpenTelemetry
module Instrumentation
module Grape
# The Instrumentation class contains logic to detect and install the Grape instrumentation
# # Configuration keys and options
# ## `:ignored_events`
#
# Default is `[]`. Specifies which ActiveSupport::Notifications events published by Grape to ignore.
# Ignored events will not be published as Span events.
#
# ## `:install_rack`
#
# Default is `true`. Specifies whether or not to install the Rack instrumentation as part of installing the Grape instrumentation.
# This is useful in cases where you have multiple Rack applications but want to manually specify where to insert the tracing middleware.
class Instrumentation < OpenTelemetry::Instrumentation::Base
# Minimum Grape version needed for compatibility with this instrumentation
MINIMUM_VERSION = Gem::Version.new('1.2.0')
Expand All @@ -27,6 +37,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base
end

option :ignored_events, default: [], validate: :array
option :install_rack, default: true, validate: :boolean

private

Expand All @@ -35,6 +46,8 @@ def gem_version
end

def install_rack_instrumentation
return unless config[:install_rack]

OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.install({})
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module OpenTelemetry
module Instrumentation
module Grape
# Current gem version
VERSION = '0.1.8'
VERSION = '0.2.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -418,5 +418,56 @@ class IgnoredEventAPI < Grape::API
_(events_per_name('grape.endpoint_render').length).must_equal 0
end
end

describe 'when install_rack is set to false' do
class BasicAPI < Grape::API
format :json
get :hello do
{ message: 'Hello, world!' }
end
end

let(:config) { { install_rack: false } }

let(:app) do
builder = Rack::Builder.app do
run BasicAPI
end
Rack::MockRequest.new(builder)
end

let(:request_path) { '/hello' }
let(:expected_span_name) { 'HTTP GET /hello' }

describe 'missing rack installation' do
it 'disables tracing' do
app.get request_path
_(exporter.finished_spans).must_be_empty
end
end

describe 'when rack is manually installed' do
let(:app) do
build_rack_app(BasicAPI)
end

before do
OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.install
end

it 'creates a span' do
app.get request_path
_(exporter.finished_spans.first.attributes).must_equal(
'code.namespace' => 'BasicAPI',
'http.method' => 'GET',
'http.host' => 'unknown',
'http.scheme' => 'http',
'http.target' => '/hello',
'http.route' => '/hello',
'http.status_code' => 200
)
end
end
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/que/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-que

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.8.1 / 2024-04-30

* FIXED: Bundler conflict warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Que
VERSION = '0.8.1'
VERSION = '0.8.2'
end
end
end
4 changes: 4 additions & 0 deletions instrumentation/racecar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-racecar

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.3.2 / 2024-04-30

* FIXED: Bundler conflict warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ module OpenTelemetry
module Instrumentation
# This class contains the ASN subsciber that instruments message processing
class ProcessMessageSubscriber
GETTER = if Gem::Version.new(::Rdkafka::VERSION) >= Gem::Version.new('0.13.0')
Context::Propagation.text_map_getter
else
OpenTelemetry::Common::Propagation.symbol_key_getter
end
private_constant :GETTER

def tracer
Racecar::Instrumentation.instance.tracer
end

def start(_name, _id, payload)
attrs = attributes(payload)

parent_context = OpenTelemetry.propagation.extract(payload[:headers], getter: OpenTelemetry::Common::Propagation.symbol_key_getter)
parent_context = OpenTelemetry.propagation.extract(payload[:headers], getter: GETTER)
parent_token = OpenTelemetry::Context.attach(parent_context)

span_context = OpenTelemetry::Trace.current_span(parent_context).context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Racecar
VERSION = '0.3.2'
VERSION = '0.3.3'
end
end
end
7 changes: 6 additions & 1 deletion instrumentation/rails/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release History: opentelemetry-instrumentation-rails

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change
* CHANGED: Update ActiveSupport Instrumentation

### v0.30.2 / 2024-06-04

* FIXED: Add action_mailer to rails and all
Expand All @@ -10,7 +15,7 @@

### v0.30.0 / 2024-01-09

* BREAKING CHANGE: Use ActiveSupport instead of patches #703
* BREAKING CHANGE: Use ActiveSupport instead of patches #703

### v0.29.1 / 2023-11-23

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Rails
VERSION = '0.30.2'
VERSION = '0.31.0'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-action_view', '~> 0.7.0'
spec.add_dependency 'opentelemetry-instrumentation-active_job', '~> 0.7.0'
spec.add_dependency 'opentelemetry-instrumentation-active_record', '~> 0.7.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.5.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.6.0'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

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

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

* DOCS: Fix CHANGELOGs to reflect a past breaking change

### v0.4.6 / 2024-06-18

* FIXED: Relax otel common gem constraints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module Rdkafka
VERSION = '0.4.6'
VERSION = '0.4.7'
end
end
end
Loading

0 comments on commit 392dce9

Please sign in to comment.