[Proposal] otlploghttp: Add WithTransport option #6686
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards (for OTLP logs exporter):
Per https://github.com/open-telemetry/opentelemetry-go/pull/6362/files#r1978191352
Together with @dmathieu, we discussed whether we should accept
http.Clientorhttp.RoundTripperand we felt thathttp.RoundTripperis a better option. I think the reason is that mainly because it does not conflict with Timeout option and env vars. Maybe there were other reasons as well which I do not remember?On the other hand, users may want to use other fields of
http.Clientsuch asCheckRedirect(and others that may be added in future). It would also allow easier interoperability e.g. with https://pkg.go.dev/golang.org/x/oauth2/clientcredentials#Config.Client and also see #2632. It would be also similar to this: https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc#WithGRPCConnI am learning towards accepting
http.Client, but I would prefer first to hear what others think before I do anything.EDIT: I created #6688 if someone wants to check the differences.
CC @kevingentile