[Proposal] otlploghttp: Add WithTransport option#6686
Closed
pellared wants to merge 5 commits intoopen-telemetry:mainfrom
Closed
[Proposal] otlploghttp: Add WithTransport option#6686pellared wants to merge 5 commits intoopen-telemetry:mainfrom
pellared wants to merge 5 commits intoopen-telemetry:mainfrom
Conversation
Member
Author
|
I created #6688 if someone wants to check the differences. |
pellared
added a commit
that referenced
this pull request
May 7, 2025
Towards (for OTLP logs exporter): - #4536 - #5129 - #2632 Per https://github.com/open-telemetry/opentelemetry-go/pull/6362/files#r1978191352 Providing `WithHTTPClient` option allows easy interoperability e.g. with https://pkg.go.dev/golang.org/x/oauth2/clientcredentials#Config.Client and also see #2632. The options is also similar to: https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc#WithGRPCConn I favor this over #6686 The option for OTLP span and metrics exporters will be added in separate PRs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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