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

Allow users to specify a path prefix for OTLP HTTP receiver #7511

Closed
jpkrohling opened this issue Apr 6, 2023 · 2 comments · Fixed by #7570
Closed

Allow users to specify a path prefix for OTLP HTTP receiver #7511

jpkrohling opened this issue Apr 6, 2023 · 2 comments · Fixed by #7570
Assignees
Labels

Comments

@jpkrohling
Copy link
Member

When running the OTLP receiver behind a regular proxy or gateway, it's often easier to have consistent URLs between the proxy and the backend (OTLP receiver, in this case). Typically, those proxies would be used for multiple backends, each one under a specific path prefix. For instance, /otlp would be used by the proxy to pick the collector with the OTLP HTTP receiver at the backend. In practice this means URLs like https://proxy.example.com/otlp/v1/traces.

To make it easier to configure an environment like that, I would like to propose a new configuration option, allowing users to specify a path prefix for the OTLP HTTP receiver, likely in the following places:

r.httpMux.HandleFunc("/v1/traces", func(resp http.ResponseWriter, req *http.Request) {

r.httpMux.HandleFunc("/v1/metrics", func(resp http.ResponseWriter, req *http.Request) {

r.httpMux.HandleFunc("/v1/logs", func(resp http.ResponseWriter, req *http.Request) {

@jpkrohling jpkrohling added the good first issue Good for newcomers label Apr 6, 2023
@jpkrohling jpkrohling self-assigned this Apr 6, 2023
@fredthomsen
Copy link
Contributor

Interested in this due to issues with the current operator ingress implementation as mentioned here: open-telemetry/opentelemetry-operator#902 (comment). This is something we need, and could take it on now if no one is working on it yet.

fredthomsen added a commit to fredthomsen/opentelemetry-collector that referenced this issue Apr 25, 2023
Supports multiple receivers of the same kind running behind a reverse
proxy/ingress.

Fixes open-telemetry#7511
fredthomsen added a commit to fredthomsen/opentelemetry-collector that referenced this issue Apr 25, 2023
Supports multiple otlp recivers running behind a reverse
proxy/ingress by setting up different paths.

Fixes open-telemetry#7511
fredthomsen added a commit to fredthomsen/opentelemetry-collector that referenced this issue Apr 26, 2023
Supports multiple otlp recivers running behind a reverse
proxy/ingress by setting up different paths.

Fixes open-telemetry#7511
@bogdandrutu
Copy link
Member

I would like this to be somehow consistent with exporter options, see https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlphttpexporter/config.go#L26?

fredthomsen added a commit to fredthomsen/opentelemetry-collector that referenced this issue May 17, 2023
Supports multiple otlp recivers running behind a reverse
proxy/ingress by setting up different paths.

Fixes open-telemetry#7511
fredthomsen added a commit to fredthomsen/opentelemetry-collector that referenced this issue Jun 9, 2023
Supports multiple otlp recivers running behind a reverse
proxy/ingress by setting up different paths.

Fixes open-telemetry#7511
fredthomsen added a commit to fredthomsen/opentelemetry-collector that referenced this issue Jul 5, 2023
Supports multiple otlp recivers running behind a reverse
proxy/ingress by setting up different paths.

Fixes open-telemetry#7511
codeboten pushed a commit that referenced this issue Jul 21, 2023
Supports multiple otlp http receivers running behind a reverse
proxy/ingress.

Fixes #7511 

Updated existing tests to account for new parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants