| 204 | } |
| 205 | |
| 206 | type Spanset struct { |
| 207 | // these fields are actually used by the engine to evaluate queries |
| 208 | Scalar Static |
| 209 | Spans []Span |
| 210 | |
| 211 | TraceID []byte |
| 212 | RootSpanName string |
| 213 | RootServiceName string |
| 214 | StartTimeUnixNanos uint64 |
| 215 | DurationNanos uint64 |
| 216 | ServiceStats map[string]ServiceStats |
| 217 | Attributes []*SpansetAttribute |
| 218 | |
| 219 | // Set this function to provide upstream callers with a method to |
| 220 | // release this spanset and all its spans when finished. This method will be |
| 221 | // called with the spanset itself as the argument. This is done for a worthwhile |
| 222 | // memory savings as the same function pointer can then be reused across spansets. |
| 223 | ReleaseFn func(*Spanset) |
| 224 | } |
| 225 | |
| 226 | func (s *Spanset) AddAttribute(key string, value Static) { |
| 227 | s.Attributes = append(s.Attributes, &SpansetAttribute{Name: key, Val: value}) |
nothing calls this directly
no outgoing calls
no test coverage detected