You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Description
Add support for iterating over the client metadata keys.
At the moment it is only possible to get the values for a known key,
which makes it impossible to inspect metadata keys without prior
knowledge of all possible keys, e.g. as described in
open-telemetry/opentelemetry-collector-contrib#39157.
#### Link to tracking issue
Closes#12804
#### Testing
Trivial addition, added unit tests.
#### Documentation
N/A
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
No response
Describe the issue you're reporting
The https://pkg.go.dev/go.opentelemetry.io/collector/client#Metadata type provides no means of iterating over the metadata keys -- you can only call
Get
with a known key. Being able to iterate the keys would be necessary to implement open-telemetry/opentelemetry-collector-contrib#39157, i.e. in order to obtainrequest.metadata
, the full map of client metadata.I propose adding a
func (Metadata) Keys() iter.Seq[string]
method that iterates over the metadata keys. See #12805.The text was updated successfully, but these errors were encountered: