Skip to content

confighttp: add support for binding unix sockets#14248

Merged
mx-psi merged 8 commits intoopen-telemetry:mainfrom
axw:confighttp-addrconfig
Jan 14, 2026
Merged

confighttp: add support for binding unix sockets#14248
mx-psi merged 8 commits intoopen-telemetry:mainfrom
axw:confighttp-addrconfig

Conversation

@axw
Copy link
Copy Markdown
Contributor

@axw axw commented Dec 3, 2025

Description

Embed confignet.AddrConfig in confighttp.ServerConfig, replacing the Endpoint field. This introduces the "transport" config attribute, which can be set to "unix" for binding a Unix domain socket.

Link to tracking issue

Fixes #8752
Fixes #14187

Testing

$ ./bin/otelcorecol_linux_amd64 \
    --config examples/local/otel-config.yaml \
    --set receivers::otlp::protocols::http::transport=unix \
    --set receivers::otlp::protocols::http::endpoint=\"@otlphttp\"
$ curl --abstract-unix-socket otlphttp http://testing.invalid:1234/v1/traces
405 method not allowed, supported: [POST]

Documentation

Updated README.md

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 3, 2025

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing axw:confighttp-addrconfig (b7cc95a) with main (1e5f5cf)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 64 untouched benchmarks
⏩ 20 skipped benchmarks1

Footnotes

  1. 20 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@axw axw force-pushed the confighttp-addrconfig branch 2 times, most recently from 7151a66 to fd31906 Compare December 4, 2025 01:42
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.77%. Comparing base (fbd5d3f) to head (b7cc95a).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14248      +/-   ##
==========================================
- Coverage   91.79%   91.77%   -0.02%     
==========================================
  Files         676      677       +1     
  Lines       42419    42433      +14     
==========================================
+ Hits        38938    38943       +5     
- Misses       2422     2428       +6     
- Partials     1059     1062       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@axw axw marked this pull request as ready for review December 4, 2025 04:09
@axw axw requested review from a team and dmitryax as code owners December 4, 2025 04:09
@axw
Copy link
Copy Markdown
Contributor Author

axw commented Dec 4, 2025

This is a breaking change for the API, but not for user configuration. Naturally there are a bunch of compilation errors in contrib, which I can fix if/when this is accepted.

@axw axw marked this pull request as draft December 11, 2025 02:38
@axw axw force-pushed the confighttp-addrconfig branch 5 times, most recently from 7ebb5f2 to c30b023 Compare December 12, 2025 05:13
@axw
Copy link
Copy Markdown
Contributor Author

axw commented Dec 12, 2025

@dmitryax and I discussed this in a recent Collector SIG meeting, and Dmitry wanted me to look into phasing out Endpoint so it wouldn't be immediately breaking. I can't see a way to do this without breaking (API) changes.

Some components are directly constructing confighttp.ServerConfig, rather than using confighttp.NewDefaultServerConfig, so there's no way to guarantee that the NetAddr field is initialised. Then the Validate method on the NetAddr field fails because "" is not a valid transport.

I thought of adding an Unmarshal method to ServerConfig, but that doesn't work because ServerConfig is typically if not always squashed: see #13273 (comment)

I also thought of making the NetAddr field optional with configoptional, so it wouldn't cause a validation error when uninitialised, but that would be a bandaid fix; it wouldn't make sense for the field to be optional once the Endpoint field is removed.

So I think we should keep it simple, and make a breaking change and just fix up the contrib components immediately after.

Embed confignet.AddrConfig in confighttp.ServerConfig,
replacing Endpoint. This introduces the "transport"
config attribute, which can be set to "unix" for
binding a Unix domain socket.
@axw axw force-pushed the confighttp-addrconfig branch from c30b023 to 5dd38a9 Compare December 12, 2025 06:20
@axw axw marked this pull request as ready for review December 12, 2025 06:39
Copy link
Copy Markdown
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

This change looks good to me as is. Especially given that it brings consistency with the configgrpc. I'll wait for another approval from @open-telemetry/collector-approvers before merging

@atoulme
Copy link
Copy Markdown
Contributor

atoulme commented Dec 12, 2025

Changes look ok to me. I also was in the SIG meeting of 12/9 when we discussed this. The intent behind this PR makes sense.

axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 9, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 9, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 9, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 12, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
@mx-psi
Copy link
Copy Markdown
Member

mx-psi commented Jan 12, 2026

cc @open-telemetry/collector-approvers I will merge this by Wednesday unless there are comments by then

@mx-psi mx-psi added this pull request to the merge queue Jan 14, 2026
Merged via the queue into open-telemetry:main with commit a162c7f Jan 14, 2026
52 of 62 checks passed
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 14, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
axw added a commit to axw/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing
the Endpoint field with NetAddr (confignet.AddrConfig).
mx-psi pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Jan 15, 2026
#### Description

open-telemetry/opentelemetry-collector#14248
introduces a breaking change to confighttp.ServerConfig, replacing the
Endpoint field with NetAddr (confignet.AddrConfig).

#### Link to tracking issue

Relates to
open-telemetry/opentelemetry-collector#14248

#### Testing

`make gotest`

#### Documentation

None at this stage. Code owners can update docs if/when they want to
declare support.
@axw axw deleted the confighttp-addrconfig branch January 15, 2026 09:30
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/datadog-agent that referenced this pull request Jan 23, 2026
### What does this PR do?
bump otel versions to 0.144

### Motivation
routine otel dependency updates

### Describe how you validated your changes
modified unit & e2e tests

### Additional Notes
There's a big breaking change from upstream OTel on HTTP config: open-telemetry/opentelemetry-collector#14248 so I have to update everything that depends on OTel confignet

Co-authored-by: yang.song <yang.song@datadoghq.com>
dd-octo-sts Bot added a commit to DataDog/datadog-agent that referenced this pull request Jan 23, 2026
… PR do? bump otel versions to 0.144

### Motivation
routine otel dependency updates

### Describe how you validated your changes
modified unit & e2e tests

### Additional Notes
There's a big breaking change from upstream OTel on HTTP config: open-telemetry/opentelemetry-collector#14248 so I have to update everything that depends on OTel confignet

Co-authored-by: yang.song <yang.song@datadoghq.com>
(cherry picked from commit f525012)

___

Co-authored-by: Yang Song <songy23@users.noreply.github.com>
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/datadog-agent that referenced this pull request Jan 26, 2026
Backport f525012 from #45287.

 ___

### What does this PR do?
bump otel versions to 0.144

### Motivation
routine otel dependency updates

### Describe how you validated your changes
modified unit & e2e tests

### Additional Notes
There's a big breaking change from upstream OTel on HTTP config: open-telemetry/opentelemetry-collector#14248 so I have to update everything that depends on OTel confignet

Co-authored-by: songy23 <yang.song@datadoghq.com>
Co-authored-by: axel.vonengel <axel.vonengel@datadoghq.com>
dmathieu added a commit to elastic/opentelemetry-collector-components that referenced this pull request Jan 26, 2026
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.

confighttp: embed confignet.AddrConfig in confighttp.ServerConfig [confighttp] Support http+unix

6 participants