Sha256: 51c91dda7fb4e5f2cc6c66f975f0feb71a7f83bac3a6b4f6a69bf2b72547eb79
Contents?: true
Size: 788 Bytes
Versions: 12
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 module OpenTelemetry module Instrumentation module HTTP module Patches # Module to prepend to HTTP::Connection for instrumentation module Connection def initialize(req, options) attributes = { 'net.peer.name' => req.uri.host, 'net.peer.port' => req.uri.port }.merge!(OpenTelemetry::Common::HTTP::ClientContext.attributes) tracer.in_span('HTTP CONNECT', attributes: attributes) do super end end private def tracer HTTP::Instrumentation.instance.tracer end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems