Skip to content

Conversation

@ymtdzzz
Copy link
Contributor

@ymtdzzz ymtdzzz commented Feb 5, 2025

related: #1307

Test

Gemfile in your application

gem "opentelemetry-sdk"
gem "opentelemetry-exporter-otlp"
gem "opentelemetry-instrumentation-all", path: "../../development/github.com/ymtdzzz/opentelemetry-ruby-contrib/instrumentation/all" # path to this branch
bundle install

config/initializers/opentelemetry.rb

require "opentelemetry/sdk"

# install all compatible instrumentation with default configuration
OpenTelemetry::SDK.configure do |c|
  c.service_name = "otel-ruby-development"
  c.use_all
end

Startup log

I, [2025-02-05T09:55:29.637726 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActiveSupport was successfully installed with the following options {}
I, [2025-02-05T09:55:29.639000 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::Rack was successfully installed with the following options {:allowed_request_headers=>[], :allowed_response_headers=>[], :application=>nil, :record_frontend_span=>false, :untraced_endpoints=>[], :url_quantization=>nil, :untraced_requests=>nil, :response_propagators=>[], :use_rack_events=>true, :allowed_rack_request_headers=>{}, :allowed_rack_response_headers=>{}}
I, [2025-02-05T09:55:29.639475 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActionPack was successfully installed with the following options {:span_naming=>:semconv}
I, [2025-02-05T09:55:29.640459 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActiveJob was successfully installed with the following options {:propagation_style=>:link, :force_flush=>false, :span_naming=>:queue}
I, [2025-02-05T09:55:29.641588 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActiveRecord was successfully installed with the following options {}
I, [2025-02-05T09:55:29.641883 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActionView was successfully installed with the following options {:disallowed_notification_payload_keys=>[], :notification_payload_transform=>nil, :legacy_span_names=>false}
I, [2025-02-05T09:55:29.642181 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActionMailer was successfully installed with the following options {:disallowed_notification_payload_keys=>["email.to.address", "email.from.address", "email.cc.address", "email.bcc.address"], :disallowed_process_payload_keys=>[], :notification_payload_transform=>#<Proc:0x000000010d35a6c0 /Users/yosuke.matsuda/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/opentelemetry-instrumentation-action_mailer-0.4.0/lib/opentelemetry/instrumentation/action_mailer/instrumentation.rb:95 (lambda)>, :process_payload_transform=>nil, :email_address=>:omit}
I, [2025-02-05T09:55:29.642375 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ActiveStorage was successfully installed with the following options {:disallowed_notification_payload_keys=>["active_storage.key", "active_storage.url"], :notification_payload_transform=>#<Proc:0x000000010d3591a8 /Users/yosuke.matsuda/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/opentelemetry-instrumentation-active_storage-0.1.0/lib/opentelemetry/instrumentation/active_storage/instrumentation.rb:98 (lambda)>, :key=>:omit, :url=>:omit}
I, [2025-02-05T09:55:29.691020 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::AwsSdk was successfully installed with the following options {:inject_messaging_context=>false, :suppress_internal_instrumentation=>false}
I, [2025-02-05T09:55:29.691416 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::ConcurrentRuby was successfully installed with the following options {}
I, [2025-02-05T09:55:29.691704 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::Net::HTTP was successfully installed with the following options {:untraced_hosts=>[]}
I, [2025-02-05T09:55:29.691739 #66012]  INFO -- : Instrumentation: OpenTelemetry::Instrumentation::Rails was successfully installed with the following options {}

Generated traces

image

@ymtdzzz ymtdzzz marked this pull request as ready for review February 5, 2025 02:27
@arielvalentin arielvalentin changed the title feat: add require active_storage instrumentation to all fix: add require active_storage instrumentation to all Feb 5, 2025
@arielvalentin arielvalentin merged commit 711be26 into open-telemetry:main Feb 5, 2025
60 checks passed
@github-actions github-actions bot mentioned this pull request Feb 4, 2025
@ymtdzzz ymtdzzz deleted the feature/add_require_active-storage_to_all branch February 5, 2025 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants