Skip to content
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

Expose custom round tripper in confighttp.ClientSettings as an extension #4438

Closed
pavankrish123 opened this issue Nov 16, 2021 · 9 comments
Closed

Comments

@pavankrish123
Copy link
Contributor

pavankrish123 commented Nov 16, 2021

Is your feature request related to a problem? Please describe.

We already have defined custom round tripper as a part of HTTPClientSettings in confighttp.go. This has been done to provide some help with testing. However, It is not exposed as a configuration/plugin.

We are running into variety of use cases where we are ending up with requirement to "plug in" a custom round tripper/interceptor of export requests/responses around 1) auditing 2) logging 3) capturing some business specific metrics.

If the custom round tripper is exposed as an extension (akin to how we are doing auth class extensions) - Users can plugin their own custom interceptors extensions on http exporters without need to modifying new exporters/modifying core similar to how we plug in auth.

Describe the solution you'd like
something like

extensions:
  mycustomroundtripper:

exporters:
  otlphttp/withroundtripper:
    endpoint: http://localhost:9000
    inteceptors:
      roundtrippers:  [mycustomroundtripper, ....]

cc: @pureklkl @svrnm

@Sprakhar97
Copy link
Contributor

Hey @pavankrish123, if this feature request is still valid I would like to work on it.

@pavankrish123
Copy link
Contributor Author

Thanks @Sprakhar97 - Can you please check with @jpkrohling before starting on this feature.

@jpkrohling
Copy link
Member

@jpkrohling
Copy link
Member

@open-telemetry/collector-approvers, what's your opinion on this? I think it's a good idea to have this, as it would also help with the "authorization" use case.

I would design it a bit differently, though: I would attempt to make this generic so that this can be applied to both gRPC and HTTP transports. And use the word "interceptor" instead of "roundtripper".

@tigrannajaryan
Copy link
Member

@jpkrohling The idea sounds interesting but I am not sure we want to work on it right now. Given that we want to stabilize our API asap I think we want to direct our efforts towards that.

@jpkrohling
Copy link
Member

Agree, I'll label it accordingly

@milas
Copy link

milas commented Jan 19, 2024

Is this something a PR would be welcome for at this time? I can possibly contribute this.

[disclaimer: employee of Docker Inc]

@jpkrohling
Copy link
Member

Yes, we wanted to prepare support for generic interceptors first though:

#7441
open-telemetry/opentelemetry-collector-contrib#6908

Would you like to help with that as well?

@atoulme
Copy link
Contributor

atoulme commented Jul 20, 2024

I am going to close this issue as not planned at this time. Please reopen if this is till being worked on.

@atoulme atoulme closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants