-
Notifications
You must be signed in to change notification settings - Fork 7
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
Decouple github.com/Comcast/webpa-common/tracing #8
Comments
@johnabass would we replace this dependence with candlelight? |
looks like we're leverage the following from wrp-go/wrpendpoint/requestResponse.go Lines 193 to 217 in 5acbd90
wrp-go/wrpendpoint/requestResponse_test.go Lines 307 to 313 in 3719b16
// NewSpanner constructs a new Spanner with the given options. By default, a Spanner
// will use time.Now() to get the current time and time.Since() to compute durations.
func NewSpanner(o ...SpannerOption) Spanner {
sp := &spanner{
now: time.Now,
since: time.Since,
}
for _, option := range o {
option(sp)
}
return sp
}
// Mergeable represents a Spanned which can be merged with other spans
type Mergeable interface {
Spanned
// WithSpans returns an instance of this object with the new Spans, possibly
// merged into those returned by Spans. This method should generally return
// a shallow copy of itself with the new spans, to preserve immutability.
WithSpans(...Span) interface{}
}
// Span represents the result of some arbitrary section of code. Clients create Span objects
// via a Spanner. A Span is immutable once it has been created via a Spanner closure.
type Span interface {
// Name is the name of the operation
Name() string
// Start is the time at which the operation started
Start() time.Time
// Duration is how long the operation took. This value is computed once, when the
// closure from Spanner.Start is called.
Duration() time.Duration
// Error is any error that occurred. This will be the error passed to the closure
// returned from Spanner.Start. This error can be nil.
Error() error
} |
assigning @renaz6 so she can let us know when candlelight is at a better state |
The wrp-go package shouldn't depend on the tracing solution from webpa-common.
The text was updated successfully, but these errors were encountered: