func (s *MemoryStore) StoreAnnotation(a *Annotation) error {
	s.Lock()
	defer s.Unlock()
	if s == nil {
		return ErrStoreNotInitialised
	}
	if a == nil {
		return ErrInvalidAnnotation
	}
	if a.TraceId == "" {
		return ErrInvalidTraceId
	}
	t := s.traces[a.TraceId]
	if t == nil {
		t = NewTrace()
	}
	t.AppendAnnotation(a)
	s.traces[a.TraceId] = t
	return nil
}
StoreAnnotation into the store, if the trace doesn't not already exist
this will be created for the global trace ID
package phosphor
import (
	"sync"
	"time"
	log "github.com/cihub/seelog"
)
type MemoryStore struct {
	sync.RWMutex
	traces map[string]*Trace
}
func NewMemoryStore() *MemoryStore {
	s := &MemoryStore{
		traces: make(map[string]*Trace),
	}
	go s.statsLoop()
	return s
}
func (s *MemoryStore) ReadTrace(id string) (*Trace, error) {
	if s == nil {
		return nil, ErrStoreNotInitialised
	}
	s.RLock()
	defer s.RUnlock()
	return s.traces[id], nil
}