lib/elastic_apm/error_builder.rb in elastic-apm-2.8.1 vs lib/elastic_apm/error_builder.rb in elastic-apm-2.9.0

- old
+ new

@@ -50,22 +50,25 @@ end error.culprit = stacktrace.frames.first.function end - # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength, Metrics/AbcSize def add_current_transaction_fields(error, transaction) return unless transaction error.transaction_id = transaction.id - error.transaction = { sampled: transaction.sampled? } + error.transaction = { + sampled: transaction.sampled?, + type: transaction.type + } error.trace_id = transaction.trace_id error.parent_id = ElasticAPM.current_span&.id || transaction.id return unless transaction.context Util.reverse_merge!(error.context.tags, transaction.context.tags) Util.reverse_merge!(error.context.custom, transaction.context.custom) end - # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength, Metrics/AbcSize end end