@@ -4,7 +4,7 @@ module Pyroscope
44 module Rust
55 extend FFI ::Library
66 ffi_lib File . expand_path ( File . dirname ( __FILE__ ) ) + "/rbspy/rbspy.#{ RbConfig ::CONFIG [ "DLEXT" ] } "
7- attach_function :initialize_agent , [ :string , :string , :string , :int , :bool , :bool , :bool , :bool , :string ] , :bool
7+ attach_function :initialize_agent , [ :string , :string , :string , :string , : int, :bool , :bool , :bool , :bool , :string ] , :bool
88 attach_function :add_thread_tag , [ :uint64 , :string , :string ] , :bool
99 attach_function :remove_thread_tag , [ :uint64 , :string , :string ] , :bool
1010 attach_function :add_global_tag , [ :string , :string ] , :bool
@@ -18,11 +18,12 @@ module Utils
1818 attach_function :thread_id , [ ] , :uint64
1919 end
2020
21- Config = Struct . new ( :application_name , :app_name , :server_address , :auth_token , :sample_rate , :detect_subprocesses , :on_cpu , :report_pid , :report_thread_id , :log_level , :tags ) do
21+ Config = Struct . new ( :application_name , :app_name , :server_address , :auth_token , :directory_name , : sample_rate, :detect_subprocesses , :on_cpu , :report_pid , :report_thread_id , :log_level , :tags ) do
2222 def initialize ( *)
2323 self . application_name = ''
2424 self . server_address = 'http://localhost:4040'
2525 self . auth_token = ''
26+ self . directory_name = __dir__
2627 self . sample_rate = 100
2728 self . detect_subprocesses = false
2829 self . on_cpu = true
@@ -45,6 +46,7 @@ def configure
4546 @config . app_name || @config . application_name || "" ,
4647 @config . server_address || "" ,
4748 @config . auth_token || "" ,
49+ @config . directory_name || __dir__ ,
4850 @config . sample_rate || 100 ,
4951 @config . detect_subprocesses || false ,
5052 @config . on_cpu || false ,
0 commit comments