MCPcopy Create free account
hub / github.com/cortexproject/cortex / Query

Method Query

pkg/ring/kv/dynamodb/metrics.go:69–79  ·  view source on GitHub ↗
(ctx context.Context, key dynamodbKey, isPrefix bool)

Source from the content-addressed store, hash-verified

67}
68
69func (d dynamodbInstrumentation) Query(ctx context.Context, key dynamodbKey, isPrefix bool) (map[string]dynamodbItem, float64, error) {
70 var resp map[string]dynamodbItem
71 var totalCapacity float64
72 err := instrument.CollectedRequest(ctx, "Query", d.ddbMetrics.dynamodbRequestDuration, errorCode, func(ctx context.Context) error {
73 var err error
74 resp, totalCapacity, err = d.kv.Query(ctx, key, isPrefix)
75 return err
76 })
77 d.ddbMetrics.dynamodbUsageMetrics.WithLabelValues("Query").Add(totalCapacity)
78 return resp, totalCapacity, err
79}
80
81func (d dynamodbInstrumentation) Delete(ctx context.Context, key dynamodbKey) error {
82 return instrument.CollectedRequest(ctx, "Delete", d.ddbMetrics.dynamodbRequestDuration, errorCode, func(ctx context.Context) error {

Callers

nothing calls this directly

Calls 2

QueryMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected