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

LogAnalysis should not rely on cell execution being recorded by LogEvents #222

Merged
merged 10 commits into from
Sep 7, 2024
3 changes: 2 additions & 1 deletion app/pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ func (a *Agent) LogEvents(ctx context.Context, req *connect.Request[v1alpha1.Log
func() {
_, span := tp.Start(ctx, "LogEvent", trace.WithAttributes(attribute.String("eventType", event.Type.String()), attribute.String("contextId", event.ContextId), attribute.String("selectedCellId", event.SelectedId)))
defer span.End()
log.Info("LogEvent", "eventType", event.Type, "contextId", event.ContextId, "selectedCellId", event.SelectedId, "event", zap.Object("event", event))
// N.B we can't use zap.Object to log the event because it contains runme protos which don't have the zap marshaler bindings.
log.Info("LogEvent", "eventId", event.GetEventId(), "eventType", event.Type, "contextId", event.ContextId, "selectedCellId", event.SelectedId, logs.ZapProto("event", event))
}()
}
return connect.NewResponse(&v1alpha1.LogEventsResponse{}), nil
Expand Down
Loading
Loading