Sha256: 1c1edfbd3acddc056e7fe1984d168c49db6a5de347028ebc0fad74260ce21dd6
Contents?: true
Size: 877 Bytes
Versions: 11
Compression:
Stored size: 877 Bytes
Contents
# frozen_string_literal: true # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 module OpenTelemetry module Instrumentation module ActiveRecord module Patches # Module to prepend to ActiveRecord::Base for instrumentation module TransactionsClassMethods def self.prepended(base) class << base prepend ClassMethods end end # Contains ActiveRecord::Transactions::ClassMethods to be patched module ClassMethods def transaction(**options, &block) tracer.in_span("#{self}.transaction") do super end end private def tracer ActiveRecord::Instrumentation.instance.tracer end end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems