From cfda55716db9c7e9678f8c56b69cb46ffe3bf57d Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sat, 27 Sep 2025 11:55:06 -0500 Subject: [PATCH 1/7] ci: Add anthropic tests Don't know how the generator missed these --- .github/workflows/ci-instrumentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index 69ad810fcc..90b1f1ff9f 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -33,6 +33,7 @@ jobs: - active_storage - active_support - all + - anthropic - aws_sdk - aws_lambda - base From d8636c6dd0dc0ea3e843a75fdc919c2fb722d4b3 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sat, 27 Sep 2025 11:51:43 -0500 Subject: [PATCH 2/7] squash: add dependency --- releases/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/Gemfile b/releases/Gemfile index 7473b143c2..26cd0592a0 100644 --- a/releases/Gemfile +++ b/releases/Gemfile @@ -4,6 +4,7 @@ source 'https://rubygems.org' gem 'mutex_m' if Gem::Requirement.new('>= 3.4').satisfied_by?(Gem::Version.new(RUBY_VERSION)) +gem 'anthropic' gem 'aws_sdk' gem 'bunny' gem 'concurrent-ruby' From 8961153666e6a7f5f0a1fa0e2d52c8abeca4ef73 Mon Sep 17 00:00:00 2001 From: Robert Laurin Date: Tue, 14 Oct 2025 10:26:10 -0500 Subject: [PATCH 3/7] chore: only appraise anthropic on ruby >= 3.2 --- instrumentation/anthropic/Appraisals | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/instrumentation/anthropic/Appraisals b/instrumentation/anthropic/Appraisals index 455df1f70e..988cb6e29b 100644 --- a/instrumentation/anthropic/Appraisals +++ b/instrumentation/anthropic/Appraisals @@ -4,10 +4,13 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'anthropic-latest' do - gem 'anthropic' -end +# Anthropic gem requires Ruby 3.2 +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2.0') + appraise 'anthropic-latest' do + gem 'anthropic' + end -appraise 'anthropic-1.9.0' do - gem 'anthropic', '~> 1.9.0' -end + appraise 'anthropic-1.9.0' do + gem 'anthropic', '~> 1.9.0' + end +end \ No newline at end of file From b8d0ca398f7e11d732587c5d239fccc3fa86f6d9 Mon Sep 17 00:00:00 2001 From: Robert Laurin Date: Tue, 14 Oct 2025 10:27:19 -0500 Subject: [PATCH 4/7] chore: fix missing trailing newline --- instrumentation/anthropic/Appraisals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/anthropic/Appraisals b/instrumentation/anthropic/Appraisals index 988cb6e29b..ea4b6271c8 100644 --- a/instrumentation/anthropic/Appraisals +++ b/instrumentation/anthropic/Appraisals @@ -13,4 +13,4 @@ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2.0') appraise 'anthropic-1.9.0' do gem 'anthropic', '~> 1.9.0' end -end \ No newline at end of file +end From 8c94bda695bad02d1599658ab5b28ff46741c415 Mon Sep 17 00:00:00 2001 From: Robert Laurin Date: Wed, 3 Dec 2025 12:59:00 -0600 Subject: [PATCH 5/7] chore: remove debug, it makes jruby angry --- instrumentation/anthropic/Gemfile | 1 - instrumentation/anthropic/test/test_helper.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/instrumentation/anthropic/Gemfile b/instrumentation/anthropic/Gemfile index 328c9497a4..e04a52a1c1 100644 --- a/instrumentation/anthropic/Gemfile +++ b/instrumentation/anthropic/Gemfile @@ -10,7 +10,6 @@ gemspec group :test do gem 'appraisal', '~> 2.5' - gem 'debug' gem 'bundler', '~> 2.4' gem 'minitest', '~> 5.0' gem 'opentelemetry-instrumentation-net_http', path: '../net_http' diff --git a/instrumentation/anthropic/test/test_helper.rb b/instrumentation/anthropic/test/test_helper.rb index 6ab0dbbbbc..02fc552bfd 100644 --- a/instrumentation/anthropic/test/test_helper.rb +++ b/instrumentation/anthropic/test/test_helper.rb @@ -10,7 +10,6 @@ require 'minitest/autorun' require 'webmock/minitest' require 'anthropic' -require 'debug/prelude' require 'opentelemetry-instrumentation-net_http' # global opentelemetry-sdk setup: From 5f427c8f055be7de3eba131066039d70b1706172 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Wed, 3 Dec 2025 14:19:42 -0600 Subject: [PATCH 6/7] squash: fix bad merge --- .github/component_owners.yml | 2 ++ .github/workflows/ci-instrumentation-full.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 347224bafc..739960cbc1 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -2,6 +2,8 @@ components: instrumentation/active_storage: - ymtdzzz + instrumentation/anthropic: + - robertlaurin instrumentation/aws_sdk: - jterapin - alextwoods diff --git a/.github/workflows/ci-instrumentation-full.yml b/.github/workflows/ci-instrumentation-full.yml index 20a6976f3a..2e2f8f672f 100644 --- a/.github/workflows/ci-instrumentation-full.yml +++ b/.github/workflows/ci-instrumentation-full.yml @@ -15,6 +15,7 @@ on: - 'instrumentation/active_record/**' - 'instrumentation/active_storage/**' - 'instrumentation/active_support/**' + - 'instrumentation/anthropic/**' - 'instrumentation/aws_sdk/**' - 'instrumentation/aws_lambda/**' - 'instrumentation/base/**' @@ -74,6 +75,7 @@ jobs: - active_record - active_storage - active_support + - anthropic - aws_sdk - aws_lambda - base From e63b44d843e31d7788964364cd4ba1272993cf7f Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sat, 13 Dec 2025 15:34:40 -0600 Subject: [PATCH 7/7] squash: fix tests --- instrumentation/anthropic/Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instrumentation/anthropic/Gemfile b/instrumentation/anthropic/Gemfile index e04a52a1c1..366ba6f4ab 100644 --- a/instrumentation/anthropic/Gemfile +++ b/instrumentation/anthropic/Gemfile @@ -24,4 +24,6 @@ group :test do gem 'yard', '~> 0.9' gem 'rspec-mocks' gem 'opentelemetry-instrumentation-base', path: '../base' + + gem 'base64' if RUBY_VERSION >= '3.4' end