cloudflared-mirror/vendor/github.com/getsentry/sentry-go/internal/otel/baggage
Zephyr Lykos d8fb43afe9
chore(deps): bump go to 1.20
- update all dependencies
- switch to devincarr/quic-go
- drop go 1.18 as quic-go no longer supports it
2023-05-11 11:13:16 +08:00
..
internal/baggage chore(deps): bump go to 1.20 2023-05-11 11:13:16 +08:00
README.md chore(deps): bump go to 1.20 2023-05-11 11:13:16 +08:00
baggage.go chore(deps): bump go to 1.20 2023-05-11 11:13:16 +08:00

README.md

Why do we have this "otel/baggage" folder?

The root sentry-go SDK (namely, the Dynamic Sampling functionality) needs an implementation of the baggage spec. For that reason, we've taken the existing baggage implementation from the opentelemetry-go repository, and fixed a few things that in our opinion were violating the specification.

These issues are:

  1. Baggage string value one%20two should be properly parsed as "one two"
  2. Baggage string value one+two should be parsed as "one+two"
  3. Go string value "one two" should be encoded as one%20two (percent encoding), and NOT as one+two (URL query encoding).
  4. Go string value "1=1" might be encoded as 1=1, because the spec says: "Note, value MAY contain any number of the equal sign (=) characters. Parsers MUST NOT assume that the equal sign is only used to separate key and value.". 1%3D1 is also valid, but to simplify the implementation we're not doing it.

Changes were made in this PR: https://github.com/getsentry/sentry-go/pull/568