Skip to content

Commit

Permalink
Add SSI entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Sep 20, 2024
1 parent 9b198f9 commit f96071d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib-injection/host_inject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def bundler_supported?

bundle_add_cmd = "bundle add #{gem} --skip-install --version #{gem_version_mapping[gem]} "
bundle_add_cmd << ' --verbose ' if ENV['DD_TRACE_DEBUG'] == 'true'
bundle_add_cmd << '--require datadog/auto_instrument' if gem == 'datadog'
bundle_add_cmd << '--require datadog/single_step_instrument' if gem == 'datadog'

utils.debug "Injection with `#{bundle_add_cmd}`"

Expand Down
18 changes: 18 additions & 0 deletions lib/datadog/single_step_instrument.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true

#
# Entrypoint file for single step instrumentation.
#
# This file's path is private. Do not reference this file.
#
begin
require_relative 'auto_instrument'

module Datadog
module SingleStepInstrument
LOADED = true
end
end
rescue StandardError, LoadError => e
$stderr.warn "Single step instrumentation failed: #{e.class}, #{e.message}"
end

0 comments on commit f96071d

Please sign in to comment.