File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 32
32
// BDE
33
33
#include < bsl_memory.h>
34
34
#include < bsl_string_view.h>
35
+ #include < bsl_vector.h>
35
36
36
37
namespace BloombergLP {
37
38
namespace bmqpi {
@@ -56,6 +57,23 @@ class DTTracer {
56
57
const bsl::shared_ptr<DTSpan>& parent,
57
58
const bsl::string_view& operation,
58
59
const DTSpan::Baggage& baggage = DTSpan::Baggage()) const = 0;
60
+
61
+ // / Serialize the underlying context for a specified `DTSpan` and return
62
+ // / the bit stream as `out`. Return 0 on success, or a non-zero error code
63
+ // / on error.
64
+ virtual int serializeSpan (bsl::vector<unsigned char >* out,
65
+ const bsl::shared_ptr<DTSpan>& dtSpan) = 0;
66
+
67
+ // / Deserialize the specified bit stream `in` into a span context.
68
+ // / Create a child span and pass into `out` based on the deserialized
69
+ // / parent span context, the given `operation`, and an optional key-value
70
+ // / tags `baggage`. Return 0 on success, or a non-zero error code on
71
+ // / error.
72
+ virtual int deserializeAndCreateChildSpan (
73
+ bsl::shared_ptr<DTSpan>* out,
74
+ const bsl::vector<unsigned char >& in,
75
+ const bsl::string_view& operation,
76
+ const DTSpan::Baggage& baggage = DTSpan::Baggage()) = 0;
59
77
};
60
78
61
79
} // close package namespace
You can’t perform that action at this time.
0 commit comments