Skip to content

parseKeyPairsIntoRecord() filters out pairs with an empty value, and perhaps should not #6138

@trentm

Description

@trentm

I think the behaviour of function parseKeyPairsIntoRecord excluding entries were the value is an empty string may be a longstanding bug. The Baggage spec (https://www.w3.org/TR/baggage/#definition) defines the value to be:

value                  =  *baggage-octet

which, IIUC, allows the value to be empty.

Originally posted by @trentm in #5885 (comment)


parseKeyPairsIntoRecord() from the @opentelemetry/core module is a utility from the baggage support, originally for parsing strings in the baggage header, as defined by https://www.w3.org/TR/baggage

> core.parseKeyPairsIntoRecord('foo=bar,nada=')
{ foo: 'bar' }

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