diff --git a/.instrumentation_generator/templates/gemspec.tt b/.instrumentation_generator/templates/gemspec.tt index 7d5ee8de1..b9cc7e653 100644 --- a/.instrumentation_generator/templates/gemspec.tt +++ b/.instrumentation_generator/templates/gemspec.tt @@ -38,6 +38,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' + # TODO Add semantic version constraints + spec.add_development_dependency '<%= instrumentation_name %>' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-<%= instrumentation_name %>/v#{OpenTelemetry::Instrumentation::<%= pascal_cased_instrumentation_name %>::VERSION}/file.CHANGELOG.html" diff --git a/.instrumentation_generator/templates/lib/instrumentation/instrumentation_name/instrumentation.rb.tt b/.instrumentation_generator/templates/lib/instrumentation/instrumentation_name/instrumentation.rb.tt index 72c3ff815..e5cf596a8 100644 --- a/.instrumentation_generator/templates/lib/instrumentation/instrumentation_name/instrumentation.rb.tt +++ b/.instrumentation_generator/templates/lib/instrumentation/instrumentation_name/instrumentation.rb.tt @@ -9,6 +9,8 @@ module OpenTelemetry module <%= pascal_cased_instrumentation_name %> # The Instrumentation class contains logic to detect and install the <%= pascal_cased_instrumentation_name %> instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base + instrumented_library_name '<%= instrumentation_name %>' + install do |_config| require_dependencies end