Skip to content

Commit

Permalink
Add missing argument names to the Span interface (#1135)
Browse files Browse the repository at this point in the history
Even though arbitrary-looking, new developers need to rely on docs
to figure out the arguments. Self document them by naming.
  • Loading branch information
rakyll committed Sep 8, 2020
1 parent d143b8f commit 7435710
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/trace/api.go
Expand Up @@ -125,16 +125,16 @@ type Span interface {
// The default span status is OK, so it is not necessary to
// explicitly set an OK status on successful Spans unless it
// is to add an OK message or to override a previous status on the Span.
SetStatus(codes.Code, string)
SetStatus(code codes.Code, msg string)

// SetName sets the name of the span.
SetName(name string)

// Set span attributes
SetAttributes(...label.KeyValue)
SetAttributes(kv ...label.KeyValue)

// Set singular span attribute, with type inference.
SetAttribute(string, interface{})
SetAttribute(k string, v interface{})
}

// SpanConfig is a group of options for a Span.
Expand Down

0 comments on commit 7435710

Please sign in to comment.