class DetailedTrace
{ “version”: 1, “identity”: {
"transaction_id": "req-....", "revision": "abcdef", "start_instant": "01-01-01T00:00:00.0000Z", "stop_instant": "01-01-01T00:00:01.0000Z", "type": "Web", "naming": { "path": "/users", "code": "UsersController#index", }, "score": { "total": 10.5, "percentile": 4.5, "age": 2.0, "memory_delta": 3, "allocations": 1 }
},
“tags”: {
"allocations": 1000
},
“spans”: [
...
]
Constants
- VERSION
Attributes
Public Class Methods
Source
# File lib/scout_apm/detailed_trace.rb, line 56 def initialize(transaction_id, revision, host, start_instant, stop_instant, type, path, code, spans, tags) @spans = spans @tags = DetailedTraceTags(tags) @transaction_id = transaction_id @revision = revision @host = host @start_instant = start_instant @stop_instant = stop_instant @type = type @path = path @code = code @total_score = 0 @percentile_score = 0 @age_score = 0 @memory_delta_score = 0 @memory_allocations_score = 0 end
Public Instance Methods
Source
# File lib/scout_apm/detailed_trace.rb, line 78 def as_json(*) { :version => VERSION, :identity => { :transaction_id => transaction_id, :revision => revision, :host => host, :start_instant => start_instant.iso8601(6), :stop_instant => stop_instant.iso8601(6), :type => type, :naming => { :path => path, :code => code, }, :score => { :total => total_score, :percentile => percentile_score, :age => age_score, :memory_delta => memory_delta_score, :allocations => memory_allocations_score, } }, :tags => tags.as_json, :spans => spans.map{|span| span.as_json}, } end
Source
# File lib/scout_apm/detailed_trace.rb, line 109 def call self end
Scorable interface
Needed so we can merge ScoredItemSet instances