-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[exporter/otlp] port is not recognized correctly #12536
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
Comments
Are you sure you want to use the OTLP over gRPC exporter ( I don't think gRPC supports a path on the endpoint.
We [strip out](https://github.com/open-telemetry/opentelemetry-collector/blob/72a8471b96ad5df66c7a0671fcde7217b263acaa/config/configgrpc/configgrpc.go#L212) any `http://` or `https://` prefix, then feed it to gRPC. Looking at [this doc](https://github.com/grpc/grpc/blob/master/doc/naming.md), it looks like without a prefix, the endpoint is interpreted as a DNS URI, which I don't think has a concept of a path, and no example in that doc contains a path. Another piece of evidence to that effect is [this (admittedly quite old) thread](https://groups.google.com/g/grpc-io/c/e1041Rw2mQI), where it is said that it's not planned to be supported either.
So if you are given an OTLP URL with a path to send data to, I suspect it may be for OTLP over HTTP, not OTLP over gRPC. In that regard, I think it is correct to reject these endpoints, but we should probably be emitting a clearer error message ("paths are not supported for OTLP over gRPC" for example). |
I am also facing the same issue when using otlp/http with port. Trying out using OCI APM and the endpoint provided does not come with a port. exporters: Error message: invalid configuration: exporters::otlp/http: address xxxx.oci.oraclecloud.com: missing port in address |
@wilsc-tech Writing |
@JPeer264 I'm not very familiar with Grafana, but checking the docs quickly, I found this page which mentions |
@jade-guiton-dd you are totally right
Regarding the error improvement, I think this is a better fit in #10488 |
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
exporter/otlp
What happened?
Describe the bug
When using the config from below it wouldn't see the port in the correct place. Adding or removing the port would result in either
port is missing
orinvalid port
. The collector can't start since the port is expected to be at the very end of the URL.Steps to reproduce
config.yaml
in any directorydocker run --rm -v $(pwd)/config.yaml:/etc/otel/config.yaml otel/opentelemetry-collector:0.120.0 --config /etc/otel/config.yaml
What did you expect to see?
I actually expected that it would recognize the port correctly (without the pathname). The example with
otel/tempo
is actually working, since there is no pathname needed.What did you see instead?
Following error was seen instead:
invalid port "443/api/prom/push"
(maybe related #10488)
Collector version
v0.120.0 (asuming docker has the same version)
Environment information
Environment
OS: MacOS 15.3.1 (not sure if needed if it is running within Docker)
OpenTelemetry Collector configuration
Log output
Explicit log output:
Additional context
No response
The text was updated successfully, but these errors were encountered: