-
Notifications
You must be signed in to change notification settings - Fork 588
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
config: add support for Insecure #6658
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6658 +/- ##
=======================================
- Coverage 73.0% 73.0% -0.1%
=======================================
Files 189 189
Lines 15773 15773
=======================================
- Hits 11525 11519 -6
- Misses 3916 3920 +4
- Partials 332 334 +2
|
@@ -183,7 +183,7 @@ func otlpGRPCLogExporter(ctx context.Context, otlpConfig *OTLP) (sdklog.Exporter | |||
} else { | |||
opts = append(opts, otlploggrpc.WithEndpoint(*otlpConfig.Endpoint)) | |||
} | |||
if u.Scheme == "http" { | |||
if u.Scheme == "http" || (u.Scheme != "https" && otlpConfig.Insecure != nil && *otlpConfig.Insecure) { |
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.
Should we add tests?
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 would like to and spent some time on it already, but these options get double wrapped in structs with only private members so I was at a loss as to how to inspect the output of this method. Happy to take suggestions
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.
@dmathieu did you have any suggestions here?
@codeboten, PTAL as a codeowner |
fixes #6351
Based on spec here: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options (search "Insecure")