-
Notifications
You must be signed in to change notification settings - Fork 1k
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
otlp.ExporterOption WithInsecure should take a boolean parameter. #1344
Comments
I realize that this option just mirrors the |
I'm definitely on board with ensuring options are easily managed through configuration and niladic options to set flags don't really fit well in that model. I wonder whether the consonance with the func WithTLSVerify(verify bool) ExporterOption {
return func(cfg *config) {
cfg.canDialInsecure = !verify
}
}
func WithInsecure() ExporterOption {
return WithTLSVerify(false)
} |
The OTLP exporters are already stable. I am against adding more exported options until it is necessary. This can be solved by something like var opts []otlp.ExporterOption
if insecure {
opts = append(opts, grpc.WithInsecure())
} |
opentelemetry-go/exporters/otlp/options.go
Line 104 in bbc9465
The current design makes it harder to map this option to configuration. You need to check if the value was set, and then add the
WithInsecure
option. All of the other options take a parameter for the value. This is nice because you can just pass the value into the option.https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/exporter.md#configuration-options
If I define the configuration parameter using the default outlined in specification then I can't easily map this value to an
ExporterOption
.Current:
Proposed:
The code change is minor, but it would be a breaking change.
The text was updated successfully, but these errors were encountered: