Skip to content

feat(alloy): expose OTLP ports by default - #91

Draft
jtslear wants to merge 1 commit into
skarbek/alloy-default-port-annotationfrom
skarbek/alloy-default-otlp-ports
Draft

jtslear wants to merge 1 commit into
skarbek/alloy-default-port-annotationfrom
skarbek/alloy-default-otlp-ports

Conversation

@jtslear

@jtslear jtslear commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Declare the OTLP ports (4317, 4318) in the chart defaults for Alloy. They are inert until alloy.withOTLPReceiver is true.

Review of coder/dogfood#702 (v0.8.0 bump) asked for dogfood settings to become chart defaults. Dogfood sets withOTLPReceiver and alloy.extraPorts together. If only withOTLPReceiver is set, nothing exposes the ports. That is how the OTLP receiver was lost silently in the first revision of that PR. Source: https://github.com/coder/dogfood/pull/702#pullrequestreview-5547941289

withOTLPReceiver stays false. This PR does not open the receiver for existing users.

Stacked PR

Base: #90 (skarbek/alloy-default-port-annotation). Merge #90 first, then retarget this PR to main.

Reason: declared ports become scrape targets. Without the prometheus.io/port annotation from #90, they share their labels with the Alloy HTTP port target. See test 1.

Test

Kind cluster testing results.

This branch with --set alloy.withOTLPReceiver=true:

  • svc/alloy and svc/alloy-cluster list 12345,4317,4318.
  • Through svc/alloy: POST :4318/v1/metrics returns 200. A TCP connection to :4317 succeeds.
  • up stays 1.

Notes

  • compiled/resources.yaml and README.md regenerated with make build and make readme.

Dogfood sets withOTLPReceiver and alloy.extraPorts together. The chart
ignores the receiver ports if an operator sets only withOTLPReceiver.

Declare the OTLP gRPC and HTTP ports in the chart defaults. They are
inert until withOTLPReceiver is true. An operator now sets one value to
enable the receiver.

This depends on the default prometheus.io/port annotation. Without it,
the new ports become scrape targets that share their labels with the
Alloy HTTP port target, and the up series for Alloy flaps.
@jtslear
jtslear force-pushed the skarbek/alloy-default-port-annotation branch from 443c4f9 to e704cdd Compare October 16, 2026 15:04
@jtslear
jtslear force-pushed the skarbek/alloy-default-otlp-ports branch from c071330 to 8e48a35 Compare October 16, 2026 15:04
@jtslear
jtslear changed the base branch from skarbek/alloy-default-port-annotation to main October 16, 2026 15:08
@jtslear jtslear closed this Oct 16, 2026
@jtslear jtslear reopened this Oct 16, 2026
@jtslear
jtslear changed the base branch from main to skarbek/alloy-default-port-annotation October 16, 2026 15:14
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.

1 participant