From 74357106b0fd67b902a2f4de2a76a70d0749e625 Mon Sep 17 00:00:00 2001 From: JBD Date: Tue, 8 Sep 2020 08:07:53 -0700 Subject: [PATCH] Add missing argument names to the Span interface (#1135) Even though arbitrary-looking, new developers need to rely on docs to figure out the arguments. Self document them by naming. --- api/trace/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/trace/api.go b/api/trace/api.go index 731fe6479a7..b07067d1907 100644 --- a/api/trace/api.go +++ b/api/trace/api.go @@ -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.