Class: ElasticAPM::StacktraceBuilder Private
- Inherits:
-
Object
- Object
- ElasticAPM::StacktraceBuilder
- Defined in:
- lib/elastic_apm/stacktrace_builder.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- JAVA_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
/^(.+)\.([^\.]+)\(([^\:]+)\:(\d+)\)$/.freeze
- RUBY_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
/^(.+?):(\d+)(?::in `(.+?)')?$/.freeze
- RUBY_VERS_REGEX =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%r{ruby(/gems)?[-/](\d+\.)+\d}.freeze
- JRUBY_ORG_REGEX =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%r{org/jruby}.freeze
Instance Attribute Summary collapse
- #config ⇒ Object readonly private
Instance Method Summary collapse
- #build(backtrace, type:) ⇒ Object private
-
#initialize(config) ⇒ StacktraceBuilder
constructor
private
A new instance of StacktraceBuilder.
Constructor Details
#initialize(config) ⇒ StacktraceBuilder
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.
Returns a new instance of StacktraceBuilder.
15 16 17 18 |
# File 'lib/elastic_apm/stacktrace_builder.rb', line 15 def initialize(config) @config = config @cache = Util::LruCache.new(2048, &method(:build_frame)) end |
Instance Attribute Details
#config ⇒ Object (readonly)
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.
20 21 22 |
# File 'lib/elastic_apm/stacktrace_builder.rb', line 20 def config @config end |
Instance Method Details
#build(backtrace, type:) ⇒ 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.
22 23 24 25 26 27 28 |
# File 'lib/elastic_apm/stacktrace_builder.rb', line 22 def build(backtrace, type:) Stacktrace.new.tap do |s| s.frames = backtrace.map do |line| @cache[[line, type]] end end end |