diff --git a/lib/honeycomb-beeline.rb b/lib/honeycomb-beeline.rb index 18e876f3..b365e91c 100644 --- a/lib/honeycomb-beeline.rb +++ b/lib/honeycomb-beeline.rb @@ -25,7 +25,8 @@ class << self extend Forwardable attr_reader :client - def_delegators :@client, :start_span, :add_field, :add_field_to_trace + def_delegators :@client, :start_span, :add_field, :add_field_to_trace, + :current_span, :current_trace def configure Configuration.new.tap do |config| diff --git a/lib/honeycomb/client.rb b/lib/honeycomb/client.rb index 5fbee50a..559fc9fd 100644 --- a/lib/honeycomb/client.rb +++ b/lib/honeycomb/client.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "forwardable" require "honeycomb/beeline/version" require "honeycomb/configuration" require "honeycomb/context" @@ -7,6 +8,10 @@ module Honeycomb # The Honeycomb Beeline client class Client + extend Forwardable + + def_delegators :@context, :current_span, :current_trace + def initialize(configuration:) @client = configuration.client # attempt to set the user_agent_addition, this will only work if the