You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
endpoint (no default): host:port to which the exporter is going to send OTLP trace data, using the gRPC protocol. The valid syntax is described here.
One might say—I acknowledge, with justification—it says it right there: host:port. Not host:port/path. End of discussion.
Still, "here" is the gRPC docs topic "gRPC Name Resolution", which states:
A fully qualified, self contained name used for gRPC channel construction uses URI syntax as defined in RFC 3986.
RFC 3986 defines syntax that includes path components.
Also:
The endpoint parameter name is used for other protocols, such as OTLP/HTTP, which do allow a path component. Users who have configured the exporter for OTLP/HTTP might bring incorrect expectations when setting endpoint for OTLP/gRPC. ("User beware"?)
According to the OTLP spec, "The default network port for OTLP/gRPC is 4317". I don't see anything in the exporter source code that would append :4317 to an endpoint value that only specifies a hostname.
Suggestion
I'm not seriously proposing the following change, just performing a thought experiment to illustrate a point: if, instead of the single parameter endpoint, the OTLP/gRPC exporter config exposed the separate parameters host (or hostname) and port:
port could be optional, defaulting to 4317, as per the OTLP spec. The user would only have to specify host.
There'd be less scope for confusion about whether the endpoint URL could contain a path component.
More pragmatically, the description of endpoint for OTLP/gRPC could be changed to:
Explicitly mention that a path component is not supported.
Remove, adjust, or otherwise qualify the reference to the gRPC docs topic that refers to RFC 3986, which (misleadingly, in the context of OTLP/gRPC) allows path components.
Reference
gRPC docs issue #1345, "Suggestion: Clarify that, in practice, user-configurable values for gRPC endpoint URLs do not support a path component, and why"
The text was updated successfully, but these errors were encountered:
ghannington-Rocket
changed the title
One-name-fits-all-protocols endpoint parameter is potentially misleading for OTLP/gPRC
One-name-fits-all-protocols endpoint parameter is potentially misleading for OTLP/gRPC
Aug 15, 2024
This is a follow-on to issue #5319.
Problem
Googling for:
grpc url path
reveals some confusion about whether gRPC supports endpoint URLs with a path component.
From the OTLP gRPC Exporter README.md:
One might say—I acknowledge, with justification—it says it right there: host:port. Not host:port/path. End of discussion.
Still, "here" is the gRPC docs topic "gRPC Name Resolution", which states:
RFC 3986 defines syntax that includes path components.
Also:
endpoint
parameter name is used for other protocols, such as OTLP/HTTP, which do allow a path component. Users who have configured the exporter for OTLP/HTTP might bring incorrect expectations when settingendpoint
for OTLP/gRPC. ("User beware"?):4317
to anendpoint
value that only specifies a hostname.Suggestion
I'm not seriously proposing the following change, just performing a thought experiment to illustrate a point: if, instead of the single parameter
endpoint
, the OTLP/gRPC exporter config exposed the separate parametershost
(orhostname
) andport
:port
could be optional, defaulting to 4317, as per the OTLP spec. The user would only have to specifyhost
.More pragmatically, the description of
endpoint
for OTLP/gRPC could be changed to:Reference
The text was updated successfully, but these errors were encountered: