Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic new streaming tail worker types #3154

Merged
merged 8 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/workerd/api/trace.c++
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ kj::Maybe<TraceItem::EventInfo> getTraceEvent(jsg::Lock& js, const Trace& trace)
}
KJ_UNREACHABLE;
}
KJ_CASE_ONEOF(resume, tracing::Resume) {
// Resume events are not used with legacy trace
KJ_UNREACHABLE;
}
KJ_CASE_ONEOF(custom, tracing::CustomEventInfo) {
return kj::Maybe(jsg::alloc<TraceItem::CustomEventInfo>(trace, custom));
}
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/io/io-context.c++
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ IoContext::IncomingRequest::IoContext_IncomingRequest(kj::Own<IoContext> context
kj::Own<IoChannelFactory> ioChannelFactoryParam,
kj::Own<RequestObserver> metricsParam,
kj::Maybe<kj::Own<WorkerTracer>> workerTracer,
kj::Rc<tracing::InvocationSpanContext> invocationSpanContext)
tracing::InvocationSpanContext invocationSpanContext)
: context(kj::mv(contextParam)),
metrics(kj::mv(metricsParam)),
workerTracer(kj::mv(workerTracer)),
Expand Down
6 changes: 3 additions & 3 deletions src/workerd/io/io-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class IoContext_IncomingRequest final {
kj::Own<IoChannelFactory> ioChannelFactory,
kj::Own<RequestObserver> metrics,
kj::Maybe<kj::Own<WorkerTracer>> workerTracer,
kj::Rc<tracing::InvocationSpanContext> invocationSpanContext);
tracing::InvocationSpanContext invocationSpanContext);
KJ_DISALLOW_COPY_AND_MOVE(IoContext_IncomingRequest);
~IoContext_IncomingRequest() noexcept(false);

Expand Down Expand Up @@ -163,7 +163,7 @@ class IoContext_IncomingRequest final {

// The invocation span context is a unique identifier for a specific
// worker invocation.
kj::Rc<tracing::InvocationSpanContext>& getInvocationSpanContext() {
tracing::InvocationSpanContext& getInvocationSpanContext() {
return invocationSpanContext;
}

Expand All @@ -176,7 +176,7 @@ class IoContext_IncomingRequest final {
// The invocation span context identifies the trace id, invocation id, and root
// span for the current request. Every invocation of a worker function always
// has a root span, even if it is not explicitly traced.
kj::Rc<tracing::InvocationSpanContext> invocationSpanContext;
tracing::InvocationSpanContext invocationSpanContext;

bool wasDelivered = false;

Expand Down
Loading
Loading