From f74cc7ef6a19d1745898c4bf5c325790268fad63 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 19 Jan 2023 09:22:27 -0800 Subject: [PATCH] Remove the unused produceKey and callbackKey Following #3584, this value and type are no longer used. --- sdk/metric/pipeline.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sdk/metric/pipeline.go b/sdk/metric/pipeline.go index 666e095c169..2be2bf7749f 100644 --- a/sdk/metric/pipeline.go +++ b/sdk/metric/pipeline.go @@ -119,20 +119,10 @@ func (p *pipeline) addMultiCallback(c multiCallback) (unregister func()) { } } -// callbackKey is a context key type used to identify context that came from the SDK. -type callbackKey int - -// produceKey is the context key to tell if a Observe is called within a callback. -// Its value of zero is arbitrary. If this package defined other context keys, -// they would have different integer values. -const produceKey callbackKey = 0 - // produce returns aggregated metrics from a single collection. // // This method is safe to call concurrently. func (p *pipeline) produce(ctx context.Context) (metricdata.ResourceMetrics, error) { - ctx = context.WithValue(ctx, produceKey, struct{}{}) - p.Lock() defer p.Unlock()