Skip to content

Commit

Permalink
Remove unnecessary kj::Date argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Oct 16, 2024
1 parent cc46604 commit 3d7994a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/workerd/io/trace-streaming-test.c++
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ KJ_TEST("We can create a simple, streaming trace session with a single explicitl

streamingTrace->setEventInfo(trace::FetchEventInfo(
kj::HttpMethod::GET, kj::str("http://example.com"), kj::String(), {}));
auto span =
KJ_ASSERT_NONNULL(streamingTrace->newChildSpan(0 * kj::MILLISECONDS + kj::UNIX_EPOCH));
auto span = KJ_ASSERT_NONNULL(streamingTrace->newChildSpan());
span->addMark("bar");
// Intentionally not calling setOutcome on the span.
streamingTrace->setOutcome(trace::Outcome(EventOutcome::CANCELED));
Expand Down
4 changes: 2 additions & 2 deletions src/workerd/io/trace-streaming.c++
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void StreamingTrace::addDropped(uint32_t start, uint32_t end) {
}

kj::Maybe<kj::Own<StreamingTrace::Span>> StreamingTrace::newChildSpan(
kj::Date timestamp, trace::Tags tags, Options options) {
trace::Tags tags, Options options) {
KJ_IF_SOME(i, impl) {
KJ_REQUIRE_NONNULL(i->onsetInfo.info, "the event info must be set before other events");
return kj::heap<StreamingTrace::Span>(spans, *this, 0, kj::mv(tags), options);
Expand Down Expand Up @@ -395,7 +395,7 @@ void StreamingTrace::Span::addCustom(trace::Tags&& tags) {
}

kj::Maybe<kj::Own<StreamingTrace::Span>> StreamingTrace::Span::newChildSpan(
kj::Date timestamp, trace::Tags tags, Options options) {
trace::Tags tags, Options options) {
KJ_IF_SOME(i, impl) {
return kj::heap<Span>(spans, i->trace, i->id, kj::mv(tags), options);
}
Expand Down
4 changes: 2 additions & 2 deletions src/workerd/io/trace-streaming.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class StreamingTrace final: public SpanBase {
void addSubrequestOutcome(trace::SubrequestOutcome&& outcome) override;
void addCustom(trace::Tags&& tags) override;
kj::Maybe<kj::Own<Span>> newChildSpan(
kj::Date timestamp, trace::Tags tags = nullptr, Options options = Options::NONE);
trace::Tags tags = nullptr, Options options = Options::NONE);

// Setting the outcome of the span explicitly closes the span, after which
// no further events can be emitted.
Expand Down Expand Up @@ -234,7 +234,7 @@ class StreamingTrace final: public SpanBase {
void addSubrequestOutcome(trace::SubrequestOutcome&& outcome) override;
void addCustom(trace::Tags&& tags) override;
kj::Maybe<kj::Own<Span>> newChildSpan(
kj::Date timestamp, trace::Tags tags = nullptr, Options options = Options::NONE);
trace::Tags tags = nullptr, Options options = Options::NONE);

private:
struct Impl;
Expand Down

0 comments on commit 3d7994a

Please sign in to comment.