File tree Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -175,25 +175,26 @@ std::vector<OutputEvent> AsioEventProcessor::Process(InputEvent input_event) {
175
175
if (!event.eval_result .track_events ()) {
176
176
return ;
177
177
}
178
- std::optional<Reason> reason;
179
178
180
179
// TODO(cwaldren): should also add the reason if the
181
180
// variation method was VariationDetail().
181
+ std::optional<Reason> reason;
182
182
if (event.eval_result .track_reason ()) {
183
183
reason = event.eval_result .detail ().reason ();
184
184
}
185
185
186
186
client::FeatureEventBase base = {
187
- event.creation_date , std::move (event.key ),
187
+ event.creation_date ,
188
+ std::move (event.key ),
188
189
event.eval_result .version (),
189
190
event.eval_result .detail ().variation_index (),
190
- event.eval_result .detail ().value (), reason,
191
- // TODO(cwaldren): change to actual default; figure
192
- // out where this should be plumbed through.
193
- Value::null ()};
191
+ event.eval_result .detail ().value (),
192
+ reason,
193
+ std::move (event.default_ )};
194
194
195
195
auto debug_until_date =
196
196
event.eval_result .debug_events_until_date ();
197
+
197
198
bool emit_debug_event =
198
199
debug_until_date &&
199
200
debug_until_date.value () >
Original file line number Diff line number Diff line change @@ -89,24 +89,11 @@ void tag_invoke(boost::json::value_from_tag const& tag,
89
89
namespace launchdarkly ::events::detail {
90
90
void tag_invoke (boost::json::value_from_tag const &,
91
91
boost::json::value& json_value,
92
- Summarizer::VariationSummary const & state) {}
93
-
94
- /*
95
- * version (number, optional): the value of version for the counter; if version
96
- has no value, this property should be omitted entirely rather than writing a
97
- null value.
98
-
99
- variation (number, optional): the value of variation for the counter; if
100
- variation has no value, this property should be omitted entirely rather than
101
- writing a null value.
102
-
103
- value (any JSON type): the value of value for the counter.
104
-
105
- count (number, required): the value of count for the counter.
92
+ Summarizer::VariationSummary const & state) {
93
+ // todo(cwaldren): refactor the serialization out of the Summarizer:State
94
+ // into here.
95
+ }
106
96
107
- unknown (boolean, optional): this should be true if version has no value;
108
- otherwise it should be omitted (do not write an explicit false).
109
- */
110
97
void tag_invoke (boost::json::value_from_tag const &,
111
98
boost::json::value& json_value,
112
99
Summarizer::State const & state) {
You can’t perform that action at this time.
0 commit comments