Skip to content

better API for interacting with BaggageEntryMetadata #6729

@stevesea

Description

@stevesea

Is your feature request related to a problem? Please describe.
if I have a baggage header like:

corp.key1=val1;tag2;tag3

String result = Baggage.current().getEntryValue("corp.key1");
// result is "val1"

If I want the additional data, I have to write code like:

String result = Baggage.current().asMap().get("corp.key1").getMetadata().getValue()
// result is "tag2;tag3"

Describe the solution you'd like
I'd like an additional API:
Baggage.current().getEntry() that returns the BaggageEntry

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestSuggest an idea for this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions