Repository navigation
fix: enforce transport policy for automatic OTLP logs and metrics - #1523
Conversation
Signed-off-by: Will Killian <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Generic transport validator and trace integration crates/core/src/observability/header_file.rs, crates/core/src/observability/otel.rs, crates/core/tests/unit/observability/header_file_tests.rs |
The transport validator accepts a signal name and includes it in HTTPS policy errors. Trace validation uses the generic typed validator. Tests cover signal-specific errors, error types, and endpoint redaction. |
Automatic signal endpoint validation crates/core/src/observability/otel_logs.rs, crates/core/src/observability/otel_metrics.rs, crates/core/src/observability/otel_signal.rs, crates/core/src/observability/plugin_component.rs, crates/core/tests/unit/observability/plugin_component_tests.rs, docs/configure-plugins/observability/opentelemetry.mdx |
Automatic log and metric configuration now requires nonblank endpoints and validates transport regardless of headers. Preflight checks trace, log, and metric endpoints and reports skips for each signal. Tests and documentation reflect the transport policy. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- NVIDIA/NeMo-Relay#1489: Introduced typed automatic exporter errors and the trace-specific transport validator that this change generalizes.
- NVIDIA/NeMo-Relay#1487: Added diagnostics for skipped automatic OpenTelemetry exporters, which this change updates for all three signals.
- NVIDIA/NeMo-Relay#1477: Added plaintext-destination preflight validation, which this change extends to automatic logs and metrics without headers.
Merge Risk: 
Minimal · up to 65bd2
-
The transport-policy change appears mergeable after normal checks; no actionable issue was established.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title uses the conventional type "fix:" and summarizes the main change: enforcing the transport policy for automatic OTLP logs and metrics, which matches the changeset (otel_logs.rs, otel_metrics.rs, header_file.rs, and the related tests and docs). It is 65 characters, under the 72-character limit, has no trailing period, and is written in imperative form with lowercase type. It is not a breaking change, so no '!' is needed.
Full details: Description check
-
Explanation
The description follows the repository template. It includes the Overview with both checkboxes marked, the Details section listing the changes, the Where should the reviewer start section pointing to specific files and tests, and the Related Issues section with 'Fixes [RELAY-1141]'. It also adds a Validation section, which the template does not require but which does not conflict with it. The Overview states the problem and the fix clearly.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 23.53% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 7 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Overview
Automatic OpenTelemetry logs and metrics could export payloads to remote plaintext HTTP collectors when no OTLP headers were configured. Apply the same transport policy as traces, rejecting disallowed destinations with signal-specific diagnostics.
Details
Validation:
just test-rust: 6,533 passed, one unrelated CLI assertion failed, four skipped.invocation_diagnostic_does_not_preflight_live_launchesexpectserror_kind=iobut receives JSON containing"error_kind":"io". One gateway timeout test passed on retry.just docs-linkcheck: passed; the published-redirect comparison was skipped because FDR returned HTTP 403.cargo denyfailed on existing zstd/zstd-safe advisories RUSTSEC-2026-0391, RUSTSEC-2026-0398, RUSTSEC-2026-0403, and RUSTSEC-2026-0410;Cargo.lockis unchanged from upstream.Where should the reviewer start?
Start with automatic endpoint validation in
crates/core/src/observability/otel_logs.rsandotel_metrics.rs, then the signal-specific transport errors inheader_file.rs. The regression tests incrates/core/tests/unit/observability/plugin_component_tests.rscover rejection without headers, activation warnings, preflight diagnostics, and allowed hosts.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit