Skip to content

client: add support for iterating client metadata keys #12804

Closed
@axw

Description

@axw

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 obtain request.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions