-
Notifications
You must be signed in to change notification settings - Fork 440
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
Add sampler configuration to instrumentation kind #514
Conversation
@anuraaga would you like to review this one? |
// configure sampler only if it is configured in the CR | ||
if idx == -1 && otelinst.Spec.Sampler.Type != "" { | ||
idxSamplerArg := getIndexOfEnv(container.Env, envOTELTracesSamplerArg) | ||
if idxSamplerArg == -1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - given we know that there is no arg for the default sampler, parent_based_always_on, I think we can be a bit more agressive here and ignore the user's SAMPLER_ARG even if it's set. Or either way, it's probably worth to log a message as it seems like a user error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's worth handling this case. If a user accidentally adds an argument for the always_on it's gonna by ignored by the SDK anyways.
This needs a rebase. |
rebased |
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Add sampler configuration to instrumentation kind Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * Fix Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Add sampler configuration to instrumentation kind Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * Fix Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay p.loffay@gmail.com
Related to https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration