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

RFC: Trace Infrastructure #144

Open
schmichael opened this issue Sep 4, 2015 · 0 comments
Open

RFC: Trace Infrastructure #144

schmichael opened this issue Sep 4, 2015 · 0 comments

Comments

@schmichael
Copy link
Contributor

I've been toying with verifying Metafora's correctness via etcd (in part using https://github.com/lytics/etcdlog), but in order to analyze the correctness of Metafora's behavior I need to be able to compare etcd's view-of-the-world with Metafora's.

To this end I'd like to add machine readable Trace events similar to the responses returned from an etcd watch. This should allow us to construct a Call-Me-Maybe-esque history to verify such constraints as:

  • Tasks are run on exactly one node at a time
    • During normal operation
    • During partitioning from broker, tasks are released before claim expires
  • Tasks are started in a timely fashion (any latency over 1s from task submission to claim seems fishy)

Types

type Trace struct {
  Timestamp time.Time
  Host string
  Namespace string
  TaskID string
  Description string
  State statemachine.State `json:"state,omitempty"`
  Progress interface{} //TODO what type?
}

type Tracer interface {
  // return an error for testing/debugging, but don't expect people to check it.
  // nothing for callers to do about failures
  Emit(t Trace) error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant