// SetLabel sets the label for the given key to the given value.
// If the value is empty, the label for that key is deleted.
// If a label is given a value automatically and by SetLabel, the
// automatically-set value is used.
// If s is nil, does nothing.
SetLabel sets the label for the given key to the given value.
If the value is empty, the label for that key is deleted.
If a label is given a value automatically and by SetLabel, the
automatically-set value is used.
If s is nil, does nothing.
// SetLabel sets the label for the given key to the given value . // If the value is empty the label for that key is deleted . // If a label is given a value automatically and by SetLabel the // automatically - set value is used . // If s is nil does nothing .
func (s *Span) SetLabel(key, value string) {
	if s == nil {
		return
	}
	if !s.tracing() {
		return
	}
	if value == "" {
		if s.span.Labels != nil {
			delete(s.span.Labels, key)
		}
		return
	}
	if s.span.Labels == nil {
		s.span.Labels = make(map[string]string)
	}
	s.span.Labels[key] = value
}
func ( s * Span ) SetLabel ( key , value string ) { if s == nil { return } if ! s . tracing ( ) { return } if value == " " { if s . span . Labels != nil { delete ( s . span . Labels , key ) } return } if s . span . Labels == nil { s . span . Labels = make ( map [ string ] string ) } s . span . Labels [ key ] = value }
SetLabel sets the label for the given key to the given value.
SetLabel sets the label for the given key to the given value .