| 759 | } |
| 760 | |
| 761 | func (s resultsCache) put(ctx context.Context, key string, extents []tripperware.Extent) { |
| 762 | buf, err := proto.Marshal(&tripperware.CachedResponse{ |
| 763 | Key: key, |
| 764 | Extents: extents, |
| 765 | }) |
| 766 | if err != nil { |
| 767 | level.Error(util_log.WithContext(ctx, s.logger)).Log("msg", "error marshalling cached value", "err", err) |
| 768 | return |
| 769 | } |
| 770 | |
| 771 | s.cache.Store(ctx, []string{cache.HashKey(key)}, [][]byte{buf}) |
| 772 | } |
| 773 | |
| 774 | func jaegerSpanID(ctx context.Context) string { |
| 775 | spanContext, ok := getSpanContext(ctx) |