Class: Karafka::Web::Tracking::Sampler
- Inherits:
-
Object
- Object
- Karafka::Web::Tracking::Sampler
- Defined in:
- lib/karafka/web/tracking/sampler.rb
Overview
Base sampler with some basic info collectors This sampler should store only collectors that can be used for producers, consumers and the Web-UI itself. All specific to a given aspect of operations should be moved out.
Direct Known Subclasses
Instance Method Summary collapse
-
#karafka_core_version ⇒ String
Karafka::Core version.
-
#karafka_version ⇒ String
Karafka version.
-
#karafka_web_version ⇒ String
Karafka Web UI version.
-
#librdkafka_version ⇒ String
Librdkafka version.
-
#process_id ⇒ String
Unique process identifier.
-
#rdkafka_version ⇒ String
Rdkafka version.
-
#ruby_version ⇒ String
Currently used ruby version with details.
-
#waterdrop_version ⇒ String
WaterDrop version.
Instance Method Details
#karafka_core_version ⇒ String
Returns Karafka::Core version.
41 42 43 |
# File 'lib/karafka/web/tracking/sampler.rb', line 41 def karafka_core_version ::Karafka::Core::VERSION end |
#karafka_version ⇒ String
Returns Karafka version.
31 32 33 |
# File 'lib/karafka/web/tracking/sampler.rb', line 31 def karafka_version ::Karafka::VERSION end |
#karafka_web_version ⇒ String
Returns Karafka Web UI version.
36 37 38 |
# File 'lib/karafka/web/tracking/sampler.rb', line 36 def karafka_web_version ::Karafka::Web::VERSION end |
#librdkafka_version ⇒ String
Returns librdkafka version.
51 52 53 |
# File 'lib/karafka/web/tracking/sampler.rb', line 51 def librdkafka_version ::Rdkafka::LIBRDKAFKA_VERSION end |
#process_id ⇒ String
Returns Unique process identifier.
11 12 13 |
# File 'lib/karafka/web/tracking/sampler.rb', line 11 def process_id @process_id ||= "#{Socket.gethostname}:#{::Process.pid}:#{SecureRandom.hex(6)}" end |
#rdkafka_version ⇒ String
Returns rdkafka version.
46 47 48 |
# File 'lib/karafka/web/tracking/sampler.rb', line 46 def rdkafka_version ::Rdkafka::VERSION end |
#ruby_version ⇒ String
Returns currently used ruby version with details.
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/karafka/web/tracking/sampler.rb', line 16 def ruby_version return @ruby_version if @ruby_version if defined?(JRUBY_VERSION) revision = JRUBY_REVISION.to_s version = JRUBY_VERSION else revision = RUBY_REVISION.to_s version = RUBY_ENGINE_VERSION end @ruby_version = "#{RUBY_ENGINE} #{version}-#{RUBY_PATCHLEVEL} #{revision[0..5]}" end |
#waterdrop_version ⇒ String
Returns WaterDrop version.
56 57 58 |
# File 'lib/karafka/web/tracking/sampler.rb', line 56 def waterdrop_version ::WaterDrop::VERSION end |