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

Method stopping

modules/distributor/receiver/shim.go:324–342  ·  view source on GitHub ↗

Called after distributor is asked to stop via StopAsync.

(_ error)

Source from the content-addressed store, hash-verified

322
323// Called after distributor is asked to stop via StopAsync.
324func (r *receiversShim) stopping(_ error) error {
325 ctx, cancelFn := context.WithTimeout(context.Background(), 30*time.Second)
326 defer cancelFn()
327
328 errs := make([]error, 0)
329
330 for _, receiver := range r.receivers {
331 err := receiver.Shutdown(ctx)
332 if err != nil {
333 errs = append(errs, err)
334 }
335 }
336
337 if len(errs) > 0 {
338 return multierr.Combine(errs...)
339 }
340
341 return nil
342}
343
344// ConsumeTraces implements consumer.Traces
345func (r *receiversShim) ConsumeTraces(ctx context.Context, td ptrace.Traces) error {

Callers

nothing calls this directly

Calls 2

ShutdownMethod · 0.65
CombineMethod · 0.65

Tested by

no test coverage detected