File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11#pragma once
22
3- // TODO: document
3+ // This component provides a `class`, `RuntimeID`, that is a wrapper around an
4+ // RFC 4122 UUIDv4. `RuntimeID` identifies the current run of the application in
5+ // which this tracing library is embedded.
6+ //
7+ // See `TracerConfig::runtime_id`, declared in `tracer_config.h`.
48
59#include < string>
610
@@ -12,11 +16,11 @@ class RuntimeID {
1216 RuntimeID ();
1317
1418 public:
15- // Return the canonical textual representation of this ID.
19+ // Return the canonical textual representation of this runtime ID.
1620 const std::string& string () const { return uuid_; }
1721
1822 // Return a pseudo-randomly generated runtime ID. The underlying generator is
19- // `random_uint64()` declared in `random.h`.
23+ // `random_uint64()`, declared in `random.h`.
2024 static RuntimeID generate ();
2125};
2226
Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ struct TracerConfig {
110110 // the `DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED` environment variable.
111111 bool trace_id_128_bit = false ;
112112
113- // TODO: document
113+ // `runtime_id` denotes the current run of the application in which the tracer
114+ // is embedded. If `runtime_id` is not specified, then it defaults to a
115+ // pseudo-randomly generated value. A server that contains multiple tracers,
116+ // such as those in the worker threads/processes of a reverse proxy, might
117+ // specify the same `runtime_id` for all tracer instances in the same run.
114118 Optional<RuntimeID> runtime_id;
115119};
116120
You can’t perform that action at this time.
0 commit comments