MCPcopy
hub / github.com/grafana/tempo / Spanset

Struct Spanset

pkg/traceql/storage.go:206–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206type 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
226func (s *Spanset) AddAttribute(key string, value Static) {
227 s.Attributes = append(s.Attributes, &SpansetAttribute{Name: key, Val: value})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected