Skip to content

Commit 7948de0

Browse files
committed
document span_data.h
1 parent 4551f63 commit 7948de0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/datadog/span_data.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pragma once
22

3+
// This component provides a `struct`, `SpanData`, that contains all data fields
4+
// relevant to `Span`. `SpanData` is what is consumed by `Collector`.
5+
36
#include <cstddef>
47
#include <memory>
58
#include <optional>
@@ -33,10 +36,16 @@ struct SpanData {
3336
std::optional<std::string_view> environment() const;
3437
std::optional<std::string_view> version() const;
3538

39+
// Modify the properties of this object to honor the specified `config` and
40+
// `defaults`. The properties of `config`, if set, override the properties of
41+
// `defaults`. Use the specified `clock` to provide a start none of none is
42+
// specified in `config`.
3643
void apply_config(const SpanDefaults& defaults, const SpanConfig& config,
3744
const Clock& clock);
3845
};
3946

47+
// Append to the specified `destination` the MessagePack representation of the
48+
// specified `span`.
4049
Expected<void> msgpack_encode(std::string& destination, const SpanData& span);
4150

4251
} // namespace tracing

0 commit comments

Comments
 (0)