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

Method shutdown

modules/generator/instance.go:457–473  ·  view source on GitHub ↗

shutdown stops the instance and flushes any remaining data. After shutdown is called pushSpans should not be called anymore.

()

Source from the content-addressed store, hash-verified

455// shutdown stops the instance and flushes any remaining data. After shutdown
456// is called pushSpans should not be called anymore.
457func (i *instance) shutdown() {
458 close(i.shutdownCh)
459
460 i.processorsMtx.Lock()
461 defer i.processorsMtx.Unlock()
462
463 for processorName := range i.processors {
464 i.removeProcessor(processorName)
465 }
466
467 i.registry.Close()
468
469 err := i.wal.Close()
470 if err != nil {
471 level.Error(i.logger).Log("msg", "closing wal failed", "tenant", i.instanceID, "err", err)
472 }
473}

Callers 5

stoppingMethod · 0.45
createInstanceMethod · 0.45
BenchmarkPushSpansFunction · 0.45
BenchmarkCollectFunction · 0.45

Calls 4

removeProcessorMethod · 0.95
CloseMethod · 0.65
LogMethod · 0.65
ErrorMethod · 0.65

Tested by 3

BenchmarkPushSpansFunction · 0.36
BenchmarkCollectFunction · 0.36