Skip to content

fix(gateway): map OTLP mode to valid protocol for Caddy#482

Merged
sofiasimdianova merged 1 commit into
mainfrom
fix/otlp-protocol-mapping
Jun 25, 2026
Merged

fix(gateway): map OTLP mode to valid protocol for Caddy#482
sofiasimdianova merged 1 commit into
mainfrom
fix/otlp-protocol-mapping

Conversation

@sofiasimdianova

Copy link
Copy Markdown
Contributor

No description provided.

@sofiasimdianova sofiasimdianova requested a review from a team as a code owner June 24, 2026 18:52
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@sofiasimdianova, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 31 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 510a6ee4-da94-4f4d-8d3e-beb838e93af4

📥 Commits

Reviewing files that changed from the base of the PR and between 79419c3 and 2c9d454.

⛔ Files ignored due to path filters (3)
  • tests/e2e/chainsaw/09-observability/chainsaw-test.yaml is excluded by !**/*.yaml
  • tests/e2e/chainsaw/09-observability/resources/otelexporterendpoint.yaml is excluded by !**/*.yaml
  • tests/e2e/chainsaw/09-observability/resources/stack.yaml is excluded by !**/*.yaml
📒 Files selected for processing (1)
  • internal/resources/caddy/caddy.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/otlp-protocol-mapping

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Changes requested — automated review

The code change leaves an existing e2e test assertion expecting the previous protocol value, so the repository's test suite can fail even though the runtime mapping may be intended.

Comment thread internal/resources/caddy/caddy.go Outdated
@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from 59959e8 to 025aef2 Compare June 25, 2026 08:57

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Changes requested — automated review

The new protocol mapping fixes the basic HTTP mode case, but pathful HTTP OTLP DSNs that already include the traces endpoint are malformed by the added suffix logic.

Comment thread internal/resources/caddy/caddy.go Outdated
@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from 025aef2 to bb1a3a3 Compare June 25, 2026 10:21

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Changes requested — automated review

The protocol mapping is mostly correct, but the new endpoint rewriting breaks supported OTLP DSNs that already specify a custom/full trace path.

Comment thread internal/resources/caddy/caddy.go Outdated
@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from bb1a3a3 to 0bbc1cc Compare June 25, 2026 10:44

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Changes requested — automated review

The protocol mapping is mostly correct, but base HTTP endpoints with a trailing slash are routed to the wrong path and will fail to export traces through Caddy.

Comment thread internal/resources/caddy/caddy.go
@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from 0bbc1cc to cbf6dc8 Compare June 25, 2026 11:04

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Changes requested — automated review

The new protocol mapping generally addresses the intended Caddy value, but it mishandles full HTTP endpoints that include a trailing slash by generating a double-slash OTLP traces path.

Comment thread internal/resources/caddy/caddy.go
@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from cbf6dc8 to 79419c3 Compare June 25, 2026 13:19

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Changes requested — automated review

The new e2e step expects the gateway deployment to update after only an OtelExporterEndpoint is applied, but no gateway reconcile is triggered by that resource, so the test will time out.

Comment thread tests/e2e/chainsaw/09-observability/chainsaw-test.yaml
@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from 79419c3 to eeb511b Compare June 25, 2026 13:28

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approve — automated review

No discrete correctness issues were identified in the changed code. The OTLP mode mapping and endpoint path handling appear consistent with the intended Caddy/OpenTelemetry protocol values.

No findings.

@sofiasimdianova sofiasimdianova force-pushed the fix/otlp-protocol-mapping branch from eeb511b to 2c9d454 Compare June 25, 2026 13:54

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approve — automated review

The OTLP protocol mapping and endpoint path handling appear consistent with the existing environment variable generation and the added test coverage. I did not find any discrete regressions introduced by this patch.

No findings.

@sofiasimdianova sofiasimdianova merged commit 419e394 into main Jun 25, 2026
11 checks passed
@sofiasimdianova sofiasimdianova deleted the fix/otlp-protocol-mapping branch June 25, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants