From 5d405628eeb1d32767bd7544c249e4aa74b1f140 Mon Sep 17 00:00:00 2001 From: Xuan <112967240+xuan-cao-swi@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:30:05 -0500 Subject: [PATCH 01/13] feat: instrument mysql2 prepare statement (#862) * feat: instrument prepare for mysql2 lib * revision --- .../instrumentation/mysql2/patches/client.rb | 64 +++++++++++++------ .../mysql2/instrumentation_test.rb | 47 ++++++++++++++ 2 files changed, 90 insertions(+), 21 deletions(-) diff --git a/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/patches/client.rb b/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/patches/client.rb index a4c78db4f..eca0e4d9f 100644 --- a/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/patches/client.rb +++ b/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/patches/client.rb @@ -14,7 +14,40 @@ module Patches # Module to prepend to Mysql2::Client for instrumentation module Client def query(sql, options = {}) - attributes = client_attributes + tracer.in_span( + _otel_span_name(sql), + attributes: _otel_span_attributes(sql), + kind: :client + ) do + super(sql, options) + end + end + + def prepare(sql) + tracer.in_span( + _otel_span_name(sql), + attributes: _otel_span_attributes(sql), + kind: :client + ) do + super(sql) + end + end + + private + + def _otel_span_name(sql) + OpenTelemetry::Helpers::MySQL.database_span_name( + sql, + OpenTelemetry::Instrumentation::Mysql2.attributes[ + SemanticConventions::Trace::DB_OPERATION + ], + _otel_database_name, + config + ) + end + + def _otel_span_attributes(sql) + attributes = _otel_client_attributes case config[:db_statement] when :include attributes[SemanticConventions::Trace::DB_STATEMENT] = sql @@ -24,30 +57,18 @@ def query(sql, options = {}) sql, obfuscation_limit: config[:obfuscation_limit], adapter: :mysql ) end - tracer.in_span( - OpenTelemetry::Helpers::MySQL.database_span_name( - sql, - OpenTelemetry::Instrumentation::Mysql2.attributes[ - SemanticConventions::Trace::DB_OPERATION - ], - database_name, - config - ), - attributes: attributes.merge!(OpenTelemetry::Instrumentation::Mysql2.attributes), - kind: :client - ) do - super(sql, options) - end - end - private + attributes.merge!(OpenTelemetry::Instrumentation::Mysql2.attributes) + attributes.compact! + attributes + end - def database_name + def _otel_database_name # https://github.com/brianmario/mysql2/blob/ca08712c6c8ea672df658bb25b931fea22555f27/lib/mysql2/client.rb#L78 (query_options[:database] || query_options[:dbname] || query_options[:db])&.to_s end - def client_attributes + def _otel_client_attributes # The client specific attributes can be found via the query_options instance variable # exposed on the mysql2 Client # https://github.com/brianmario/mysql2/blob/ca08712c6c8ea672df658bb25b931fea22555f27/lib/mysql2/client.rb#L25-L26 @@ -59,8 +80,9 @@ def client_attributes SemanticConventions::Trace::NET_PEER_NAME => host, SemanticConventions::Trace::NET_PEER_PORT => port } - attributes[SemanticConventions::Trace::DB_NAME] = database_name if database_name - attributes[SemanticConventions::Trace::PEER_SERVICE] = config[:peer_service] if config[:peer_service] + + attributes[SemanticConventions::Trace::DB_NAME] = _otel_database_name + attributes[SemanticConventions::Trace::PEER_SERVICE] = config[:peer_service] attributes end diff --git a/instrumentation/mysql2/test/opentelemetry/instrumentation/mysql2/instrumentation_test.rb b/instrumentation/mysql2/test/opentelemetry/instrumentation/mysql2/instrumentation_test.rb index 8a0b5a948..319e138d8 100644 --- a/instrumentation/mysql2/test/opentelemetry/instrumentation/mysql2/instrumentation_test.rb +++ b/instrumentation/mysql2/test/opentelemetry/instrumentation/mysql2/instrumentation_test.rb @@ -88,6 +88,53 @@ end end + describe 'prepare statement' do + it 'after requests with prepare' do + client.prepare('SELECT 1') + + _(span.name).must_equal 'select' + _(span.attributes['db.system']).must_equal 'mysql' + _(span.attributes['db.name']).must_equal 'mysql' + _(span.attributes['db.statement']).must_equal 'SELECT 1' + _(span.attributes['net.peer.name']).must_equal host.to_s + _(span.attributes['net.peer.port']).must_equal port.to_s + end + + it 'after requests with prepare select ?' do + client.prepare('SELECT ?') + + _(span.name).must_equal 'select' + _(span.attributes['db.system']).must_equal 'mysql' + _(span.attributes['db.name']).must_equal 'mysql' + _(span.attributes['db.statement']).must_equal 'SELECT ?' + _(span.attributes['net.peer.name']).must_equal host.to_s + _(span.attributes['net.peer.port']).must_equal port.to_s + end + + it 'query ? sequences for db.statement with prepare' do + sql = 'SELECT * from users where users.id = ? and users.email = ?' + expect do + client.prepare(sql) + end.must_raise Mysql2::Error + + _(span.attributes['db.system']).must_equal 'mysql' + _(span.attributes['db.name']).must_equal 'mysql' + _(span.name).must_equal 'select' + _(span.attributes['db.statement']).must_equal sql + _(span.attributes['net.peer.name']).must_equal host.to_s + _(span.attributes['net.peer.port']).must_equal port.to_s + end + + it 'query invalid byte sequences for db.statement without prepare' do + sql = 'SELECT * from users where users.id = ? and users.email = ?' + expect do + client.query(sql) + end.must_raise Mysql2::Error + + _(span.events[0].attributes['exception.message'].slice(0, 37)).must_equal 'You have an error in your SQL syntax;' + end + end + it 'after requests' do client.query('SELECT 1') From 40069035ee7977ead85be4123c07d835526f4148 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:53:55 -0600 Subject: [PATCH 02/13] release: Release 2 gems (#868) * release: Release 2 gems * opentelemetry-instrumentation-mysql2 0.27.0 (was 0.26.1) * opentelemetry-instrumentation-all 0.58.0 (was 0.57.0) * Update instrumentation/all/CHANGELOG.md * squash: Bump mysql2 gem --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/all/CHANGELOG.md | 4 ++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 +- instrumentation/mysql2/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/mysql2/version.rb | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 2ad91b1f4..344e84a13 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.58.0 / 2024-02-15 + +* CHANGED: upgrade mysql2 instrumentation + ### v0.57.0 / 2024-02-08 * BREAKING CHANGE: Move shared sql behavior to helper gems diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index a27879fe6..890dcb022 100644 --- a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb +++ b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module All - VERSION = '0.57.0' + VERSION = '0.58.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 3645b0b55..5ebbc1ceb 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -43,7 +43,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-koala', '~> 0.20.1' spec.add_dependency 'opentelemetry-instrumentation-lmdb', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-mongo', '~> 0.22.1' - spec.add_dependency 'opentelemetry-instrumentation-mysql2', '~> 0.26.0' + spec.add_dependency 'opentelemetry-instrumentation-mysql2', '~> 0.27.0' spec.add_dependency 'opentelemetry-instrumentation-net_http', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-pg', '~> 0.27.0' spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.8.0' diff --git a/instrumentation/mysql2/CHANGELOG.md b/instrumentation/mysql2/CHANGELOG.md index 5ef94002c..d2ad6cc5b 100644 --- a/instrumentation/mysql2/CHANGELOG.md +++ b/instrumentation/mysql2/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-mysql2 +### v0.27.0 / 2024-02-15 + +* ADDED: Instrument mysql2 prepare statement + ### v0.26.1 / 2024-02-08 * FIXED: Add missing requires for sql-helpers to mysql, pg, and trilogy instrumentation diff --git a/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/version.rb b/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/version.rb index 1497b9b49..7d86b76a0 100644 --- a/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/version.rb +++ b/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Mysql2 - VERSION = '0.26.1' + VERSION = '0.27.0' end end end From c497728a8b46e25c3541df56e8df257e8890d600 Mon Sep 17 00:00:00 2001 From: Elena Tanasoiu Date: Fri, 16 Feb 2024 17:35:10 +0000 Subject: [PATCH 03/13] feat!: Cache GraphQL attributes (#867) --- .../graphql/tracers/graphql_tracer.rb | 68 +++++++++++++++---- .../graphql/tracers/graphql_tracer_test.rb | 5 +- 2 files changed, 56 insertions(+), 17 deletions(-) diff --git a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_tracer.rb b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_tracer.rb index bd65f7d88..0d4c3b0ad 100644 --- a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_tracer.rb +++ b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_tracer.rb @@ -13,6 +13,8 @@ module Tracers # GraphQLTracer contains the OpenTelemetry tracer implementation compatible with # the GraphQL tracer API class GraphQLTracer < ::GraphQL::Tracing::PlatformTracing + DEFAULT_HASH = {}.freeze + self.platform_keys = { 'lex' => 'graphql.lex', 'parse' => 'graphql.parse', @@ -86,24 +88,60 @@ def config end def attributes_for(key, data) - attributes = {} case key - when 'execute_field', 'execute_field_lazy' - attributes['graphql.field.parent'] = data[:owner]&.graphql_name # owner is the concrete type, not interface - attributes['graphql.field.name'] = data[:field]&.graphql_name - attributes['graphql.lazy'] = key == 'execute_field_lazy' - when 'authorized', 'authorized_lazy' - attributes['graphql.type.name'] = data[:type]&.graphql_name - attributes['graphql.lazy'] = key == 'authorized_lazy' - when 'resolve_type', 'resolve_type_lazy' - attributes['graphql.type.name'] = data[:type]&.graphql_name - attributes['graphql.lazy'] = key == 'resolve_type_lazy' + when 'execute_field' + field_attr_cache = data[:query].context.namespace(:otel_attrs)[:execute_field_attrs] ||= attr_cache do |field| + attrs = {} + attrs['graphql.field.parent'] = field.owner.graphql_name if field.owner.graphql_name + attrs['graphql.field.name'] = field.graphql_name if field.graphql_name + attrs['graphql.lazy'] = false + attrs.freeze + end + field_attr_cache[data[:field]] + when 'execute_field_lazy' + lazy_field_attr_cache = data[:query].context.namespace(:otel_attrs)[:execute_field_lazy_attrs] ||= attr_cache do |field| + attrs = {} + attrs['graphql.field.parent'] = field.owner.graphql_name if field.owner.graphql_name + attrs['graphql.field.name'] = field.graphql_name if field.graphql_name + attrs['graphql.lazy'] = true + attrs.freeze + end + lazy_field_attr_cache[data[:field]] + when 'authorized', 'resolve_type' + type_attrs_cache = data[:context].namespace(:otel_attrs)[:type_attrs] ||= attr_cache do |type| + attrs = {} + attrs['graphql.type.name'] = type.graphql_name if type.graphql_name + attrs['graphql.lazy'] = false + attrs.freeze + end + type_attrs_cache[data[:type]] + when 'authorized_lazy', 'resolve_type_lazy' + type_lazy_attrs_cache = data[:context].namespace(:otel_attrs)[:type_lazy_attrs] ||= attr_cache do |type| + attrs = {} + attrs['graphql.type.name'] = type.graphql_name if type.graphql_name + attrs['graphql.lazy'] = true + attrs.freeze + end + type_lazy_attrs_cache[data[:type]] when 'execute_query' - attributes['graphql.operation.name'] = data[:query].selected_operation_name if data[:query].selected_operation_name - attributes['graphql.operation.type'] = data[:query].selected_operation.operation_type - attributes['graphql.document'] = data[:query].query_string + attrs = {} + attrs['graphql.document'] = data[:query].query_string if data[:query].query_string + # rubocop:disable Style/SafeNavigation - using safe navigation creates more objects, we want to avoid this + attrs['graphql.operation.type'] = data[:query].selected_operation.operation_type if data[:query].selected_operation && data[:query].selected_operation.operation_type + # rubocop:enable Style/SafeNavigation + attrs['graphql.operation.name'] = data[:query].selected_operation_name || 'anonymous' + attrs.freeze + else + DEFAULT_HASH + end + end + + def attr_cache + cache_h = Hash.new do |h, k| + h[k] = yield(k) end - attributes + cache_h.compare_by_identity + cache_h end end end diff --git a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb index 0813c22c0..61908a79d 100644 --- a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb +++ b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb @@ -83,7 +83,8 @@ it 'omits nil attributes for execute_query' do expected_attributes = { 'graphql.operation.type' => 'query', - 'graphql.document' => '{ simpleField }' + 'graphql.document' => '{ simpleField }', + 'graphql.operation.name' => 'anonymous' } SomeGraphQLAppSchema.execute('{ simpleField }') @@ -141,7 +142,7 @@ it 'includes attributes using platform types' do skip if uses_platform_interfaces? expected_attributes = { - 'graphql.field.parent' => 'Car', # type name, not interface + 'graphql.field.parent' => 'Vehicle', # interface name, not type 'graphql.field.name' => 'model', 'graphql.lazy' => false } From a005a987c74f1dd0958aae9e4d47ad84cf34a611 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:15:45 -0600 Subject: [PATCH 04/13] release: Release 2 gems (#871) * release: Release 2 gems * opentelemetry-instrumentation-graphql 0.28.0 (was 0.27.0) * opentelemetry-instrumentation-all 0.59.0 (was 0.58.0) * squash: Apply suggestions from code review * squash: Bump GraphQL --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/all/CHANGELOG.md | 4 ++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- .../all/opentelemetry-instrumentation-all.gemspec | 2 +- instrumentation/graphql/CHANGELOG.md | 6 ++++++ .../lib/opentelemetry/instrumentation/graphql/version.rb | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 344e84a13..530cc5a12 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.59.0 / 2024-02-16 + +* BREAKING CHANGE: GraphQL Legacy Tracer perf improvements [#867](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/867). + ### v0.58.0 / 2024-02-15 * CHANGED: upgrade mysql2 instrumentation diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index 890dcb022..f5a4717aa 100644 --- a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb +++ b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module All - VERSION = '0.58.0' + VERSION = '0.59.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 5ebbc1ceb..9889edef5 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-excon', '~> 0.22.0' spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.23.1' spec.add_dependency 'opentelemetry-instrumentation-grape', '~> 0.1.3' - spec.add_dependency 'opentelemetry-instrumentation-graphql', '~> 0.27.0' + spec.add_dependency 'opentelemetry-instrumentation-graphql', '~> 0.28.0' spec.add_dependency 'opentelemetry-instrumentation-gruf', '~> 0.1.0' spec.add_dependency 'opentelemetry-instrumentation-http', '~> 0.23.1' spec.add_dependency 'opentelemetry-instrumentation-http_client', '~> 0.22.1' diff --git a/instrumentation/graphql/CHANGELOG.md b/instrumentation/graphql/CHANGELOG.md index c75886695..f95201393 100644 --- a/instrumentation/graphql/CHANGELOG.md +++ b/instrumentation/graphql/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History: opentelemetry-instrumentation-graphql +### v0.28.0 / 2024-02-16 + +* BREAKING CHANGE: GraphQL Legacy Tracer perf improvements [#867](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/867). + +* ADDED: GraphQL Legacy Tracer perf improvements [#867](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/867). + ### v0.27.0 / 2023-11-28 * CHANGED: Performance optimization cache attribute hashes [#723](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/723) diff --git a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/version.rb b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/version.rb index db8496fff..e864e46c7 100644 --- a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/version.rb +++ b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module GraphQL - VERSION = '0.27.0' + VERSION = '0.28.0' end end end From 6eaadb4f924b2a85a7700ef384976c8bb7a649ea Mon Sep 17 00:00:00 2001 From: Aleksandr Starovojtov <37301326+AS-AlStar@users.noreply.github.com> Date: Sun, 18 Feb 2024 19:32:34 +0300 Subject: [PATCH 05/13] feat: Add support gruf 2.19 (#872) --- .github/workflows/ci-instrumentation-canary.yml | 2 -- .github/workflows/ci-instrumentation.yml | 2 -- instrumentation/gruf/Appraisals | 12 ++++++++---- .../gruf/opentelemetry-instrumentation-gruf.gemspec | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-instrumentation-canary.yml b/.github/workflows/ci-instrumentation-canary.yml index a731bffd2..e3e1afe16 100644 --- a/.github/workflows/ci-instrumentation-canary.yml +++ b/.github/workflows/ci-instrumentation-canary.yml @@ -60,8 +60,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: "Test Ruby 3.3" - # BLOCKED BY: https://github.com/bigcommerce/gruf/pull/197 - if: "${{ matrix.gem != 'gruf' }}" uses: ./.github/actions/test_gem with: gem: "opentelemetry-instrumentation-${{ matrix.gem }}" diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index ebfefb309..59088633a 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -51,8 +51,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: "Test Ruby 3.3" - # BLOCKED BY: https://github.com/bigcommerce/gruf/pull/197 - if: "${{ matrix.gem != 'gruf' }}" uses: ./.github/actions/test_gem with: gem: "opentelemetry-instrumentation-${{ matrix.gem }}" diff --git a/instrumentation/gruf/Appraisals b/instrumentation/gruf/Appraisals index 8501003fc..c07e47bb9 100644 --- a/instrumentation/gruf/Appraisals +++ b/instrumentation/gruf/Appraisals @@ -4,10 +4,14 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'gruf-2.15.1' do - gem 'gruf', '~> 2.15.1' +appraise 'gruf-2.17' do + gem 'gruf', '~> 2.17.0' end -appraise 'gruf-2.16.1' do - gem 'gruf', '~> 2.16.1' +appraise 'gruf-2.18' do + gem 'gruf', '~> 2.18.0' +end + +appraise 'gruf-2.19' do + gem 'gruf', '~> 2.19.0' end diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index 06b9aa58f..229b76ff1 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '>= 1.17' spec.add_development_dependency 'grpc_mock' - spec.add_development_dependency 'gruf', '>= 2.15.1' + spec.add_development_dependency 'gruf', '>= 2.19.0' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' spec.add_development_dependency 'opentelemetry-test-helpers' From a2669ad5d86854052d3c9a884fdcc37ab0fbc50c Mon Sep 17 00:00:00 2001 From: Sam <370182+plantfansam@users.noreply.github.com> Date: Tue, 20 Feb 2024 09:23:07 -0700 Subject: [PATCH 06/13] fix: dup string if frozen in trilogy query (#863) * fix: propagate context from trilogy instrumentation for frozen strings --- .../trilogy/instrumentation.rb | 19 +------- .../instrumentation/trilogy/patches/client.rb | 9 +++- .../trilogy/instrumentation_test.rb | 44 +++++++++++++++++-- 3 files changed, 50 insertions(+), 22 deletions(-) diff --git a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb index cdb411b96..684fbe660 100644 --- a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb +++ b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb @@ -7,22 +7,6 @@ module OpenTelemetry module Instrumentation module Trilogy - # @api private - class NoopPropagator - EMPTY_LIST = [].freeze - private_constant(:EMPTY_LIST) - - def inject(carrier, context: Context.current, setter: nil); end - - def extract(carrier, context: Context.current, getter: nil) - context - end - - def fields - EMPTY_LIST - end - end - # The Instrumentation class contains logic to detect and install the Trilogy instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base install do |config| @@ -61,10 +45,9 @@ def configure_propagator(config) propagator = config[:propagator] @propagator = case propagator when 'vitess' then fetch_propagator(propagator, 'OpenTelemetry::Propagator::Vitess') - when 'none', nil then NoopPropagator.new + when 'none', nil then nil else OpenTelemetry.logger.warn "The #{propagator} propagator is unknown and cannot be configured" - NoopPropagator.new end end diff --git a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb index 1f7ae1fae..d5e93e7a8 100644 --- a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb +++ b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb @@ -50,7 +50,14 @@ def query(sql) ), kind: :client ) do |_span, context| - propagator.inject(sql, context: context) + if propagator && sql.frozen? + sql = +sql + propagator.inject(sql, context: context) + sql.freeze + elsif propagator + propagator.inject(sql, context: context) + end + super(sql) end end diff --git a/instrumentation/trilogy/test/opentelemetry/instrumentation/trilogy/instrumentation_test.rb b/instrumentation/trilogy/test/opentelemetry/instrumentation/trilogy/instrumentation_test.rb index 0bc3a6324..9b1b7b845 100644 --- a/instrumentation/trilogy/test/opentelemetry/instrumentation/trilogy/instrumentation_test.rb +++ b/instrumentation/trilogy/test/opentelemetry/instrumentation/trilogy/instrumentation_test.rb @@ -375,14 +375,52 @@ describe 'when propagator is set to vitess' do let(:config) { { propagator: 'vitess' } } - it 'does inject context' do + it 'does inject context on frozen strings' do + sql = 'SELECT * from users where users.id = 1 and users.email = "test@test.com"' + assert(sql.frozen?) + propagator = OpenTelemetry::Instrumentation::Trilogy::Instrumentation.instance.propagator + + arg_cache = {} # maintain handles to args + allow(client).to receive(:query).and_wrap_original do |m, *args| + arg_cache[:query_input] = args[0] + assert(args[0].frozen?) + m.call(args[0]) + end + + allow(propagator).to receive(:inject).and_wrap_original do |m, *args| + arg_cache[:inject_input] = args[0] + refute(args[0].frozen?) + assert_match(sql, args[0]) + m.call(args[0], context: args[1][:context]) + end + + expect do + client.query(sql) + end.must_raise Trilogy::Error + + # arg_cache[:inject_input] _was_ a mutable string, so it has the context injected + encoded = Base64.strict_encode64("{\"uber-trace-id\":\"#{span.hex_trace_id}:#{span.hex_span_id}:0:1\"}") + assert_equal(arg_cache[:inject_input], "/*VT_SPAN_CONTEXT=#{encoded}*/#{sql}") + + # arg_cache[:inject_input] is now frozen + assert(arg_cache[:inject_input].frozen?) + end + + it 'does inject context on unfrozen strings' do + # inbound SQL is not frozen (string prefixed with +) sql = +'SELECT * from users where users.id = 1 and users.email = "test@test.com"' - original_sql = sql.dup + refute(sql.frozen?) + + # dup sql for comparison purposes, since propagator mutates it + cached_sql = sql.dup + expect do client.query(sql) end.must_raise Trilogy::Error + encoded = Base64.strict_encode64("{\"uber-trace-id\":\"#{span.hex_trace_id}:#{span.hex_span_id}:0:1\"}") - _(sql).must_equal "/*VT_SPAN_CONTEXT=#{encoded}*/#{original_sql}" + assert_equal(sql, "/*VT_SPAN_CONTEXT=#{encoded}*/#{cached_sql}") + refute(sql.frozen?) end end From 39f9a8088d1e3bd2abb37ab4f7115c4470c6a626 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 20 Feb 2024 10:40:50 -0600 Subject: [PATCH 07/13] feat: faraday add support for internal spans (#873) --- .../faraday/instrumentation.rb | 1 + .../faraday/middlewares/tracer_middleware.rb | 18 ++++++++----- .../middlewares/tracer_middleware_test.rb | 27 +++++++++++++++++++ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb index 0c98ea8f5..abed74af4 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb @@ -20,6 +20,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base defined?(::Faraday) end + option :span_kind, default: :client, validate: %i[client internal] option :peer_service, default: nil, validate: :string private diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb index 01c6da394..9289eacad 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb @@ -25,11 +25,13 @@ class TracerMiddleware < ::Faraday::Middleware def call(env) http_method = HTTP_METHODS_SYMBOL_TO_STRING[env.method] + config = Faraday::Instrumentation.instance.config + attributes = span_creation_attributes( - http_method: http_method, url: env.url + http_method: http_method, url: env.url, config: config ) tracer.in_span( - "HTTP #{http_method}", attributes: attributes, kind: :client + "HTTP #{http_method}", attributes: attributes, kind: config.fetch(:span_kind) ) do |span| OpenTelemetry.propagation.inject(env.request_headers) @@ -39,21 +41,23 @@ def call(env) private - attr_reader :app - - def span_creation_attributes(http_method:, url:) + def span_creation_attributes(http_method:, url:, config:) instrumentation_attrs = { 'http.method' => http_method, - 'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url.to_s) + 'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url.to_s), + 'faraday.adapter.name' => app.class.name } instrumentation_attrs['net.peer.name'] = url.host if url.host - config = Faraday::Instrumentation.instance.config instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service] + instrumentation_attrs.merge!( OpenTelemetry::Common::HTTP::ClientContext.attributes ) end + # Versions prior to 1.0 do not define an accessor for app + attr_reader :app if Gem::Version.new(Faraday::VERSION) < Gem::Version.new('1.0.0') + def tracer Faraday::Instrumentation.instance.tracer end diff --git a/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb b/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb index 417c0c367..ffed5628f 100644 --- a/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb +++ b/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb @@ -110,6 +110,33 @@ _(span.attributes['peer.service']).must_equal 'example:faraday' end + it 'defaults to span kind client' do + instrumentation.instance_variable_set(:@installed, false) + instrumentation.install + + client.get('/success') + + _(span.kind).must_equal :client + end + + it 'allows overriding the span kind to internal' do + instrumentation.instance_variable_set(:@installed, false) + instrumentation.install(span_kind: :internal) + + client.get('/success') + + _(span.kind).must_equal :internal + end + + it 'reports the name of the configured adapter' do + instrumentation.instance_variable_set(:@installed, false) + instrumentation.install + + client.get('/success') + + _(span.attributes.fetch('faraday.adapter.name')).must_equal Faraday::Adapter::Test.name + end + it 'prioritizes context attributes over config for peer service name' do instrumentation.instance_variable_set(:@installed, false) instrumentation.install(peer_service: 'example:faraday') From 347a286d64b582aece8759a8e3cefd27e957312a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 09:49:41 -0700 Subject: [PATCH 08/13] release: Release opentelemetry-instrumentation-trilogy 0.59.2 (was 0.59.1) (#875) Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> --- instrumentation/trilogy/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/trilogy/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/instrumentation/trilogy/CHANGELOG.md b/instrumentation/trilogy/CHANGELOG.md index f2246f355..7d9ffccd1 100644 --- a/instrumentation/trilogy/CHANGELOG.md +++ b/instrumentation/trilogy/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-trilogy +### v0.59.2 / 2024-02-20 + +* FIXED: Dup string if frozen in trilogy query + ### v0.59.1 / 2024-02-08 * FIXED: Add missing requires for sql-helpers to mysql, pg, and trilogy instrumentation diff --git a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb index 4755747b0..e5a4b0b2e 100644 --- a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb +++ b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Trilogy - VERSION = '0.59.1' + VERSION = '0.59.2' end end end From c95e91909912fede6dad07bffa15213c087a677d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:26:18 -0600 Subject: [PATCH 09/13] release: Release 3 gems (#881) * release: Release 3 gems * opentelemetry-instrumentation-gruf 0.2.0 (was 0.1.1) * opentelemetry-instrumentation-faraday 0.24.0 (was 0.23.4) * opentelemetry-instrumentation-all 0.60.0 (was 0.59.0) * docs: Update instrumentation/all/CHANGELOG.md * chore: bump dependencies --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/all/CHANGELOG.md | 5 +++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- .../all/opentelemetry-instrumentation-all.gemspec | 4 ++-- instrumentation/faraday/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/faraday/version.rb | 2 +- instrumentation/gruf/CHANGELOG.md | 4 ++++ .../gruf/lib/opentelemetry/instrumentation/gruf/version.rb | 2 +- 7 files changed, 18 insertions(+), 5 deletions(-) diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 530cc5a12..8af4c8996 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History: opentelemetry-instrumentation-all +### v0.60.0 / 2024-02-20 + +* ADDED: Add support gruf 2.19 +* ADDED: Faraday add support for internal spans + ### v0.59.0 / 2024-02-16 * BREAKING CHANGE: GraphQL Legacy Tracer perf improvements [#867](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/867). diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index f5a4717aa..fab22c84e 100644 --- a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb +++ b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module All - VERSION = '0.59.0' + VERSION = '0.60.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 9889edef5..ae05b4421 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -34,10 +34,10 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-delayed_job', '~> 0.22.0' 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.23.1' + spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.24.0' spec.add_dependency 'opentelemetry-instrumentation-grape', '~> 0.1.3' spec.add_dependency 'opentelemetry-instrumentation-graphql', '~> 0.28.0' - spec.add_dependency 'opentelemetry-instrumentation-gruf', '~> 0.1.0' + spec.add_dependency 'opentelemetry-instrumentation-gruf', '~> 0.2.0' spec.add_dependency 'opentelemetry-instrumentation-http', '~> 0.23.1' spec.add_dependency 'opentelemetry-instrumentation-http_client', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-koala', '~> 0.20.1' diff --git a/instrumentation/faraday/CHANGELOG.md b/instrumentation/faraday/CHANGELOG.md index 538cb4f69..0208a55cc 100644 --- a/instrumentation/faraday/CHANGELOG.md +++ b/instrumentation/faraday/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-faraday +### v0.24.0 / 2024-02-20 + +* ADDED: Faraday add support for internal spans + ### v0.23.4 / 2023-11-23 * CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727) diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb index 7eb5e99b1..5ba3ed9ae 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Faraday - VERSION = '0.23.4' + VERSION = '0.24.0' end end end diff --git a/instrumentation/gruf/CHANGELOG.md b/instrumentation/gruf/CHANGELOG.md index 43137ffc8..942d02b20 100644 --- a/instrumentation/gruf/CHANGELOG.md +++ b/instrumentation/gruf/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-gruf +### v0.2.0 / 2024-02-20 + +* ADDED: Add support gruf 2.19 + ### v0.1.1 / 2023-10-16 * FIXED: Remove activesupport dependency diff --git a/instrumentation/gruf/lib/opentelemetry/instrumentation/gruf/version.rb b/instrumentation/gruf/lib/opentelemetry/instrumentation/gruf/version.rb index 2b36b7e53..49b772fc0 100644 --- a/instrumentation/gruf/lib/opentelemetry/instrumentation/gruf/version.rb +++ b/instrumentation/gruf/lib/opentelemetry/instrumentation/gruf/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Gruf - VERSION = '0.1.1' + VERSION = '0.2.0' end end end From 1cdfe7607b70cbdcff32b74f9e8d2d84ae4a5b84 Mon Sep 17 00:00:00 2001 From: "Kayla Reopelle (she/her)" <87386821+kaylareopelle@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:41:17 -0800 Subject: [PATCH 10/13] chore: Update rubocop and rubocop-performance in helper gems (#878) --- helpers/mysql/opentelemetry-helpers-mysql.gemspec | 4 ++-- .../opentelemetry-helpers-sql-obfuscation.gemspec | 4 ++-- helpers/sql-obfuscation/test/helpers/sql_obfuscation_test.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/mysql/opentelemetry-helpers-mysql.gemspec b/helpers/mysql/opentelemetry-helpers-mysql.gemspec index 6b2882279..37cd18746 100644 --- a/helpers/mysql/opentelemetry-helpers-mysql.gemspec +++ b/helpers/mysql/opentelemetry-helpers-mysql.gemspec @@ -32,8 +32,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.57.2' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.60.2' + spec.add_development_dependency 'rubocop-performance', '~> 1.20.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' diff --git a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec index 6cf7cd965..e35142382 100644 --- a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec +++ b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec @@ -31,8 +31,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.57.2' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.60.2' + spec.add_development_dependency 'rubocop-performance', '~> 1.20.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/helpers/sql-obfuscation/test/helpers/sql_obfuscation_test.rb b/helpers/sql-obfuscation/test/helpers/sql_obfuscation_test.rb index 650ba63a7..e340cbdb5 100644 --- a/helpers/sql-obfuscation/test/helpers/sql_obfuscation_test.rb +++ b/helpers/sql-obfuscation/test/helpers/sql_obfuscation_test.rb @@ -96,7 +96,7 @@ def self.load_fixture acceptable_outputs << FAILED_TO_OBFUSCATE_MESSAGE if test_case['malformed'] dialects.each do |dialect| - define_method("test_sql_obfuscation_#{name}_#{dialect}") do + define_method(:"test_sql_obfuscation_#{name}_#{dialect}") do actual_obfuscated = OpenTelemetry::Helpers::SqlObfuscation.obfuscate_sql(query, adapter: dialect.to_sym) message = build_failure_message(query, dialect, acceptable_outputs, actual_obfuscated) From 435481e9476e13ec3b7df15063a949562eb2adb9 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 23 Feb 2024 20:58:53 +0100 Subject: [PATCH 11/13] chore: drop dependency on ruby2_keywords (#885) Now that Ruby below 2.7 is not supported anymore (#389, https://github.com/open-telemetry/opentelemetry-ruby-contrib/commit/38b083aa41b93bcc8f900cd65bc922c97fe26e5d) this is not needed anymore --- .../instrumentation/active_record/instrumentation.rb | 3 --- .../opentelemetry-instrumentation-active_record.gemspec | 1 - 2 files changed, 4 deletions(-) diff --git a/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/instrumentation.rb b/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/instrumentation.rb index fb8b2f19f..e0d319704 100644 --- a/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/instrumentation.rb +++ b/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/instrumentation.rb @@ -51,9 +51,6 @@ def patch end def require_dependencies - # Our patches depend on Ruby 2 Keyword Syntax compatability since it is decorating the existing AR API - # Once we migrate to ActiveSupport Notifications based instrumentation we can remove this require statement. - require 'ruby2_keywords' # rubocop:disable Lint/RedundantRequireStatement require_relative 'patches/querying' require_relative 'patches/persistence' require_relative 'patches/persistence_class_methods' diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index 2179dd1b9..bb89086e1 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -27,7 +27,6 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_dependency 'ruby2_keywords' spec.add_development_dependency 'activerecord', '>= 6.1' spec.add_development_dependency 'appraisal', '~> 2.5' From d0617c0794778860fef32e4f0ab87c97b5c2eb94 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 27 Feb 2024 13:14:35 -0600 Subject: [PATCH 12/13] chore: Update stalebot (#889) --- .github/workflows/stale.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 5357eb690..c85932c9c 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -23,4 +23,4 @@ jobs: stale-pr-label: "stale" exempt-pr-labels: "keep" days-before-pr-stale: 30 - days-before-pr-close: 15 + days-before-pr-close: 30 From 3d8fe6d18960c66c26850a8fec95638b8d8292e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:30:59 -0600 Subject: [PATCH 13/13] chore(deps): bump ruby/setup-ruby from 1.171.0 to 1.172.0 (#883) --- .github/workflows/installation-tests.yml | 2 +- .github/workflows/release-hook-on-closed.yml | 2 +- .github/workflows/release-hook-on-push.yml | 2 +- .github/workflows/release-perform.yml | 2 +- .github/workflows/release-please.yaml | 2 +- .github/workflows/release-request.yml | 2 +- .github/workflows/release-retry.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/installation-tests.yml b/.github/workflows/installation-tests.yml index 58175d229..c77303c3b 100644 --- a/.github/workflows/installation-tests.yml +++ b/.github/workflows/installation-tests.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1.171.0 + - uses: ruby/setup-ruby@v1.172.0 with: ruby-version: ${{ matrix.ruby-version }} - name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}" diff --git a/.github/workflows/release-hook-on-closed.yml b/.github/workflows/release-hook-on-closed.yml index 22f247458..dda09de22 100644 --- a/.github/workflows/release-hook-on-closed.yml +++ b/.github/workflows/release-hook-on-closed.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.171.0 + uses: ruby/setup-ruby@v1.172.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-hook-on-push.yml b/.github/workflows/release-hook-on-push.yml index 1872e7623..a34b0c6cb 100644 --- a/.github/workflows/release-hook-on-push.yml +++ b/.github/workflows/release-hook-on-push.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.171.0 + uses: ruby/setup-ruby@v1.172.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-perform.yml b/.github/workflows/release-perform.yml index 9ed4816e3..959e1d61b 100644 --- a/.github/workflows/release-perform.yml +++ b/.github/workflows/release-perform.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.171.0 + uses: ruby/setup-ruby@v1.172.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index a660b2d52..b5635d538 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -47,7 +47,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.171.0 + - uses: ruby/setup-ruby@v1.172.0 with: ruby-version: "3.0" bundler: latest diff --git a/.github/workflows/release-request.yml b/.github/workflows/release-request.yml index 947186203..ed322bd10 100644 --- a/.github/workflows/release-request.yml +++ b/.github/workflows/release-request.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.171.0 + uses: ruby/setup-ruby@v1.172.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-retry.yml b/.github/workflows/release-retry.yml index 94dc0d393..c8a3f9a93 100644 --- a/.github/workflows/release-retry.yml +++ b/.github/workflows/release-retry.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.171.0 + uses: ruby/setup-ruby@v1.172.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo