Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baggage calls validate() on Member too often #2498

Closed
puckpuck opened this issue Jan 7, 2022 · 0 comments · Fixed by #2522
Closed

Baggage calls validate() on Member too often #2498

puckpuck opened this issue Jan 7, 2022 · 0 comments · Fixed by #2522
Labels
bug Something isn't working

Comments

@puckpuck
Copy link

puckpuck commented Jan 7, 2022

Description

validate() is called on a Member when it is created, and when the Member is added to Baggage.

Environment

  • OS: linux
  • Architecture: amd64
  • Go Version: 1.17
  • opentelemetry-go version: 1.3.0

Steps To Reproduce

b := baggage.FromContext(ctx)
m, _ := baggage.NewMember("foo", "bar") // validate() is called on Member
b.SetMember(m) // validate() is called on Member

Expected behavior

validate() is only called at Member creation or when Member is added to a Baggage. Since Tracing is adding overhead to an application, this is to minimize all overhead as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant