Sha256: c3ed206e03c1f02abc0e0ae1d04dd8520963912eda11bc9990f7eb8a85438fbf
Contents?: true
Size: 837 Bytes
Versions: 14
Compression:
Stored size: 837 Bytes
Contents
# frozen_string_literal: true # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 require 'opentelemetry' module OpenTelemetry module Instrumentation module LMDB module Patches # Module to prepend to LMDB::Environment for instrumentation module Environment def transaction(*args) attributes = { 'db.system' => 'lmdb' } attributes['peer.service'] = config[:peer_service] if config[:peer_service] tracer.in_span('TRANSACTION', attributes: attributes) do super end end private def config LMDB::Instrumentation.instance.config end def tracer LMDB::Instrumentation.instance.tracer end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems