Skip to content

Commit

Permalink
Remove the unused produceKey and callbackKey
Browse files Browse the repository at this point in the history
Following open-telemetry#3584, this value and type are no longer used.
  • Loading branch information
MrAlias committed Jan 19, 2023
1 parent 69b18e6 commit f74cc7e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions sdk/metric/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit f74cc7e

Please sign in to comment.