Module: Datadog::Core::Remote::Tie::Tracing
- Defined in:
- lib/datadog/core/remote/tie/tracing.rb
Overview
Extend Remote Configuration abilities with Tracing
Class Method Summary collapse
-
.tag(boot, span) ⇒ Object
Tag per-request Remote Configuration metadata using Tracing.
Class Method Details
.tag(boot, span) ⇒ Object
Tag per-request Remote Configuration metadata using Tracing
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/datadog/core/remote/tie/tracing.rb', line 12 def self.tag(boot, span) return if boot.nil? return if span.nil? return if Datadog::Core::Remote.active_remote.nil? # TODO: this is not thread-consistent ready = Datadog::Core::Remote.active_remote.healthy status = ready ? 'ready' : 'disconnected' span.set_tag('_dd.rc.client_id', Datadog::Core::Remote.active_remote.client.id) span.set_tag('_dd.rc.status', status) if boot. != :pass span.set_tag('_dd.rc.boot.time', boot.time) if boot. == :timeout span.set_tag('_dd.rc.boot.timeout', true) else span.set_tag('_dd.rc.boot.ready', ready) end end end |