Class: Buildkite::TestCollector::Trace

Inherits:
Object
  • Object
show all
Defined in:
lib/buildkite/test_collector/trace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#external_idObject

Returns the value of attribute external_id.



6
7
8
# File 'lib/buildkite/test_collector/trace.rb', line 6

def external_id
  @external_id
end

#trace_idObject

Returns the value of attribute trace_id.



7
8
9
# File 'lib/buildkite/test_collector/trace.rb', line 7

def trace_id
  @trace_id
end

Instance Method Details

#as_hashObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/buildkite/test_collector/trace.rb', line 9

def as_hash
  strip_invalid_utf8_chars(
    external_id: external_id,
    trace_id: trace_id,
    scope: scope,
    name: name,
    location: prepend_location_prefix(location),
    file_name: prepend_location_prefix(file_name),
    result: result,
    failure_reason: failure_reason,
    failure_expanded: failure_expanded,
    history: history,
    tags: tags,
  ).select { |_, value| !value.nil? }
end