Module: Appsignal::Extension::Jruby Private
- Extended by:
- FFI::Library
- Includes:
- StringHelpers
- Included in:
- Appsignal::Extension
- Defined in:
- lib/appsignal/extension/jruby.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
JRuby extension wrapper
Only loaded if the system is detected as JRuby.
Defined Under Namespace
Modules: StringHelpers Classes: Data, Span, Transaction
Class Method Summary collapse
- .lib_extension ⇒ Object private
Instance Method Summary collapse
- #add_distribution_value(key, value, tags) ⇒ Object private
- #data_array_new ⇒ Object private
- #data_map_new ⇒ Object private
- #diagnose ⇒ Object private
- #get_server_state(key) ⇒ Object private
- #increment_counter(key, value, tags) ⇒ Object private
- #log(group, level, message, attributes) ⇒ Object private
- #running_in_container? ⇒ Boolean private
- #set_environment_metadata(key, value) ⇒ Object private
- #set_gauge(key, value, tags) ⇒ Object private
- #start ⇒ Object private
- #start_transaction(transaction_id, namespace, gc_duration_ms) ⇒ Object private
- #stop ⇒ Object private
Methods included from StringHelpers
#make_appsignal_string, #make_ruby_string
Class Method Details
.lib_extension ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 45 46 47 48 |
# File 'lib/appsignal/extension/jruby.rb', line 42 def self.lib_extension if Appsignal::System.agent_platform.include?("darwin") "dylib" else "so" end end |
Instance Method Details
#add_distribution_value(key, value, tags) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
321 322 323 |
# File 'lib/appsignal/extension/jruby.rb', line 321 def add_distribution_value(key, value, ) appsignal_add_distribution_value(make_appsignal_string(key), value, .pointer) end |
#data_array_new ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
298 299 300 |
# File 'lib/appsignal/extension/jruby.rb', line 298 def data_array_new Data.new(appsignal_data_array_new) end |
#data_map_new ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
294 295 296 |
# File 'lib/appsignal/extension/jruby.rb', line 294 def data_map_new Data.new(appsignal_data_map_new) end |
#diagnose ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
264 265 266 |
# File 'lib/appsignal/extension/jruby.rb', line 264 def diagnose make_ruby_string(appsignal_diagnose) end |
#get_server_state(key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
268 269 270 271 |
# File 'lib/appsignal/extension/jruby.rb', line 268 def get_server_state(key) state = appsignal_get_server_state(make_appsignal_string(key)) make_ruby_string state if state[:len] > 0 end |
#increment_counter(key, value, tags) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
317 318 319 |
# File 'lib/appsignal/extension/jruby.rb', line 317 def increment_counter(key, value, ) appsignal_increment_counter(make_appsignal_string(key), value, .pointer) end |
#log(group, level, message, attributes) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
273 274 275 276 277 278 279 280 |
# File 'lib/appsignal/extension/jruby.rb', line 273 def log(group, level, , attributes) appsignal_log( make_appsignal_string(group), level, make_appsignal_string(), attributes.pointer ) end |
#running_in_container? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
302 303 304 |
# File 'lib/appsignal/extension/jruby.rb', line 302 def running_in_container? appsignal_running_in_container end |
#set_environment_metadata(key, value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
306 307 308 309 310 311 |
# File 'lib/appsignal/extension/jruby.rb', line 306 def (key, value) ( make_appsignal_string(key), make_appsignal_string(value) ) end |
#set_gauge(key, value, tags) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
313 314 315 |
# File 'lib/appsignal/extension/jruby.rb', line 313 def set_gauge(key, value, ) appsignal_set_gauge(make_appsignal_string(key), value, .pointer) end |
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
256 257 258 |
# File 'lib/appsignal/extension/jruby.rb', line 256 def start appsignal_start end |
#start_transaction(transaction_id, namespace, gc_duration_ms) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/appsignal/extension/jruby.rb', line 282 def start_transaction(transaction_id, namespace, gc_duration_ms) transaction = appsignal_start_transaction( make_appsignal_string(transaction_id), make_appsignal_string(namespace), gc_duration_ms ) return if !transaction || transaction.null? Transaction.new(transaction) end |
#stop ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
260 261 262 |
# File 'lib/appsignal/extension/jruby.rb', line 260 def stop appsignal_stop end |