File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
include/opentelemetry/sdk/trace Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -254,8 +254,10 @@ class SpanData final : public Recordable
254
254
}
255
255
256
256
void AddEvent (nostd::string_view name,
257
- opentelemetry::common::SystemTimestamp timestamp,
258
- const opentelemetry::common::KeyValueIterable &attributes) noexcept override
257
+ opentelemetry::common::SystemTimestamp timestamp =
258
+ opentelemetry::common::SystemTimestamp (std::chrono::system_clock::now()),
259
+ const opentelemetry::common::KeyValueIterable &attributes =
260
+ opentelemetry::common::KeyValueIterableView<std::map<std::string, int32_t>>) noexcept override
259
261
{
260
262
SpanDataEvent event (std::string (name), timestamp, attributes);
261
263
events_.push_back (event);
Original file line number Diff line number Diff line change @@ -69,8 +69,7 @@ TEST(SpanData, Set)
69
69
data.SetStartTime (now);
70
70
data.SetDuration (std::chrono::nanoseconds (1000000 ));
71
71
data.SetAttribute (" attr1" , static_cast <int64_t >(314159 ));
72
- data.AddEvent (" event1" , now,
73
- opentelemetry::common::KeyValueIterableView<std::map<std::string, int32_t >>({}));
72
+ data.AddEvent (" event1" , now);
74
73
75
74
ASSERT_EQ (data.GetTraceId (), trace_id);
76
75
ASSERT_EQ (data.GetSpanId (), span_id);
You can’t perform that action at this time.
0 commit comments