-
Notifications
You must be signed in to change notification settings - Fork 8
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
Emitter: Try an event logger-style interface #11
Comments
Quick update on this: type EventLogger interface {
LogEvent(context.Context, Event)
}
type Event interface{ event() } With the following events, type FlowStopEvent struct {
Name string
Runtime time.Duration
Err error // if any
}
type ParallelStopEvent struct {
Name string
Runtime time.Duration
Err error // if any
}
type TaskStopEvent struct {
Name string
Runtime time.Duration // zero if skipped
ParentType string
ParentName string
Err error // if any
PanicValue any // if any
Recovered bool // recovered from panic/err
Skipped bool
}
type SchedulerStateEvent struct {
DirectiveType string
DirectiveName string
State scheduler.State
} And still implement the metrics and log emitters we need with similar efficiency. So I'm going to opt to delete the current emitter implementations (#2) for now, |
Is this still being worked on? |
Instead of these several scoped objects,
we should maybe consider something like fxevent.Logger
where we have a single interface that accepts event objects,
and we have several kinds of event objects.
I'm not certain that this is desirable, but it's worth exploring.
The text was updated successfully, but these errors were encountered: