confighttp: add support for binding unix sockets#14248
confighttp: add support for binding unix sockets#14248mx-psi merged 8 commits intoopen-telemetry:mainfrom
Conversation
CodSpeed Performance ReportMerging this PR will not alter performanceComparing
|
7151a66 to
fd31906
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
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. |
7ebb5f2 to
c30b023
Compare
|
@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 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.
c30b023 to
5dd38a9
Compare
dmitryax
left a comment
There was a problem hiding this comment.
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
|
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. |
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
|
cc @open-telemetry/collector-approvers I will merge this by Wednesday unless there are comments by then |
a162c7f
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
open-telemetry/opentelemetry-collector#14248 introduces a breaking change to confighttp.ServerConfig, replacing the Endpoint field with NetAddr (confignet.AddrConfig).
#### 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.
### 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>
… 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>
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>
Description
Embed
confignet.AddrConfiginconfighttp.ServerConfig, replacing theEndpointfield. 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\"Documentation
Updated README.md