Optimize `baggage` header parsing logic
Current implementation works, but could be updated to be more performant/efficient.
Originally posted by @bobstrecansky in https://github.com/open-telemetry/opentelemetry-php/pull/437#discussion_r721869389
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @bobstrecansky, I would like to work on this one incase you have less bandwidth
hi @amber0612 do you still want this one?
hi @amber0612 do you still want this one?
Sure @brettmc
I ran some benchmarks against baggage parsing, it's very fast (~2us per execution when run 10k times) and I couldn't see much room for improvement. It looks like the original implementation was based on Java's, and I think our code is easier to read: https://github.com/open-telemetry/opentelemetry-java/blob/main/api/all/src/main/java/io/opentelemetry/api/baggage/propagation/Parser.java#L45