<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
Promotes `component.UseLocalHostAsDefaultHost` feature gate to beta.
#### Link to tracking issue
Updates #8510
**Description:**
This PR removes the top level if/else in `component.UnmarshalConfig`,
handling recursive state in the confmap.Conf object instead.
This PR deprecates `component.UnmarshalConfig` in favor of calling
directly `Unmarshal` on the confmap.Conf object.
**Link to tracking Issue:**
Fixes#7102Fixes#7101
---------
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
**Description:**
Changes `Transport` from a `string` to a new `TransportType`. Implements
`UnmarshalText` for `TransportType` to enforce values.
This PR may be too much - it introduces a breaking change a lot of new
public APIs that may not be worth it for such a small module. If we
don't like the surface area this creates or the breaking change, but we
still want to enforce transport type values, I think implementing
`Validate` keeps the API footprint smaller and isn't breaking.
**Link to tracking Issue:** <Issue number if applicable>
Closes
https://github.com/open-telemetry/opentelemetry-collector/issues/9364
**Documentation:** <Describe the documentation added.>
Added godoc comments
---------
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
**Description:**
Simply renames a few structs in the `configtls` package for consistence.
`TLSClientSetting` to `ClientConfig`
`TLSServerSetting` to `ServerConfig`
`TLSSetting` to `Config`
**Link to tracking Issue:** Fixes#9474
**Description:** Make the configuration for the OTLP Receiver
httpServerSettings to be public
Fixing the bug opened #8175
**Link to tracking Issue:**#8175
---------
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
* [chore] use license shortform
To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052
Signed-off-by: Alex Boten <aboten@lightstep.com>
* make goporto
Signed-off-by: Alex Boten <aboten@lightstep.com>
---------
Signed-off-by: Alex Boten <aboten@lightstep.com>
* Deprecate Config.Validate() in favor of component.ValidateConfig
This PR is "split" from https://github.com/open-telemetry/opentelemetry-collector/pull/6544, to avoid breaking changes and go via deprecation.
It is a bit hacky, but better than breaking everyone who uses this interface.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Update config/receiver.go
Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
The main reason is to remove the circular dependency between the config (including sub-packages) and component. Here is the current state:
* component depends on config
* config/sub-package[grpc, http, etc.] depends on config & component
Because of this "circular" dependency, we cannot split for example "config" into its own module, only if all the other config sub-packages are also split.
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
The main motivation for this is to allow components (including tests) to not depend on the "service" configuration and be reusable without the otelcol service.
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
* Support CORS Max-Age on oltphttp receiver
* Encapsulate CORS config in its own struct
* Update changelog
* Fixes to CORS docs
* Use CORSSettings in TestHttpCors
* Clarify behavior when cors.max_age is unset
* Move changelog updates to the unreleased section
This PR is to rename `config.NewID` to `config.NewComponentID` and `config.NewIDFromString` to `config.NewComponentIDFromString` for naming consistency.
**Link to tracking Issue:**
Fixes#4105
This implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/1839
To make transition to new port numbers less painful OTLP receiver will
also accept data on the legacy port numbers when it is configured to
use the default endpoint. Users who use the default Collector config
can continue sending data to the legacy ports and have a graceful period
to update their senders to start sending to the new ports.
* Add cors_allowed_headers option to confighttp
* Enable CORS only when origin is defined
* Remove WithLogger option
The capability is out of scope of the PR
This implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/1221
To make transition to new port numbers less painful OTLP receiver will
also accept data on the legacy port numbers when it is configured to
use the default endpoint. Users who use the default Collector config
can continue sending data to the legacy ports and have a graceful period
to update their senders to start sending to the new ports.
Note that OTLP/HTTP continues using a separate port number from OTLP/gRPC.
There is separate work in progress to use one port for both.
Adding `ProtocolServerSettings` was a bit of a rush. We determined that `endpoint` has different meaning based on protocol, also not all the protocols support TLS.
In this PR we revert embedding `ProtocolServerSettings` in the GRPCServerSettings and make it consistent with HttpServerSettings.
Work left: Consistent config name for TLS settings `tls_settings` or `tls_credentials`.