OTEL-047: OTLP HTTP exporter using gRPC port 4317 (HTTP is 4318)
Severity: warn (advisory)
Rule Details
By convention (and per the OTLP spec) port 4317 is OTLP/gRPC and port 4318 is OTLP/HTTP. Pointing otlphttp at :4317 almost always means the author mixed up the two exporters — the TCP connection will succeed, but the HTTP request will return protocol errors from the gRPC server on the other side.
This rule fires when an otlphttp exporter's endpoint ends with :4317 or contains :4317/.
Options
This rule has no options.
Examples
Avoid
exporters:
otlphttp/backend:
endpoint: https://backend.example.com:4317 # gRPC port
Prefer
exporters:
otlphttp/backend:
endpoint: https://backend.example.com:4318
When Not To Use It
A backend that genuinely serves OTLP/HTTP on port 4317 — rare and non-standard, but possible. In that case disable the rule for that exporter.
Related Rules
- OTEL-044 — OTLP gRPC exporter endpoint has
http(s)://scheme - OTEL-045 — OTLP gRPC endpoint missing port number
- OTEL-046 — OTLP HTTP endpoint missing URL scheme
Version
Available since augur v0.1.0.
Further Reading
Resources
- Rule source:
policy/main/exporter.rego