func (c loggingCollector) Collect(s *zipkin.Span) error { annotations := s.Encode().GetAnnotations() values := make([]string, len(annotations)) for i, a := range annotations { values[i] = a.Value } c.Logger.Log( "trace_id", s.TraceID(), "span_id", s.SpanID(), "parent_span_id", s.ParentSpanID(), "annotations", strings.Join(values, " "), ) return nil }
func (c *countingCollector) Collect(s *zipkin.Span) error { for _, annotation := range s.Encode().GetAnnotations() { c.annotations = append(c.annotations, annotation.GetValue()) } return nil }