Skip to content

Commit 26a5eac

Browse files
committed
doc 'till you drop
1 parent 879cfe3 commit 26a5eac

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/datadog/runtime_id.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
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

src/datadog/tracer_config.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)