-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: require csv for ruby-3.4 compatibility #1560
fix: require csv for ruby-3.4 compatibility #1560
Conversation
Hi @romuloceccon! Thanks for submitting this fix! Getting rid of the deprecation warning sounds great to me. I was looking at the uses of CSV in this library, and I think it may not be used outside the require statement in exporter/ot|p/lib/opentelemetry/exporter/ot|p/ exporter.rb line 10. Could you try removing the require statement and see if the tests pass and the deprecation warning goes away? |
@kaylareopelle we use the CSV library to parse configuration values from environment variables in at least the zipkin exporter:
I could have sworn it was used in the OTLP Exporters but looks like it now uses custom parsing? opentelemetry-ruby/exporter/otlp-http/lib/opentelemetry/exporter/otlp/http/trace_exporter.rb Line 269 in ff9a7d3
|
a0e8f10
to
cf67c06
Compare
Thanks for the heads-up, @kaylareopelle and @arielvalentin! I have adjusted the commit accordingly, and also fixed otlp/http exporter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @romuloceccon! This looks good to me. I think the job failures are due to an unrelated problem on main
causing TruffleRuby installs to fail, that will hopefully be fixed with #1559 🤞
Loading exporter/otlp, exporter/otlp/http or exporter/zipkin on ruby-3.3 now prints a warning: .../lib/opentelemetry/exporter/otlp/exporter.rb:10: warning: csv was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec. Also contact author of opentelemetry-exporter-otlp-0.26.1 to add csv into its gemspec. exporter/otlp and exporter/otlp/http do not actually depend on csv, though. Therefore this was fixed by removing the require statement. exporter/zipkin, on the other hand, does depend on csv. So an explicit dependency was added to the csv gem at version '~> 3.1' (ruby-3.0 bundles csv at 3.1.9).
cf67c06
to
35b28d1
Compare
Loading opentelemetry-exporter-otlp on ruby-3.3 now prints a warning:
This commit fixes that by adding an explicit dependency from opentelemetry-exporter-otlp to the csv gem at version '~> 3.1' (ruby-3.0 bundles csv at 3.1.9).