#### Description
This PR renames `TimeoutSettings` and `QueueSettings` (as well as the
corresponding `NewDefault` functions) to `TimeoutConfig` and
`QueueConfig`, for naming consistency reasons.
The previous struct/function names are kept as deprecated aliases of the
new ones for now.
#### Link to tracking issue
Updates #6767 (edit: reworded by @mx-psi)
#### Testing
No behavior changes were made, so no additional testing should be
necessary.
The references to the aforementioned structs/functions in existing tests
have been renamed as well. This means the deprecated function aliases
are not tested, lowering the coverage a bit.
#### Documentation
The new functions are documented identically to the previous ones.
This allows users to continue using the recommended
dns://authority/host:port notation when needing to specify a custom
authority.
Fixes#10449
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
**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:** This PR updates the otlp exporter config validation to
ensure that the "endpoint" specified for the exporter includes a port.
The goal of this is to fail fast if the configuration is invalid instead
of waiting for an error to arise. The PR adds a function to the
ClientConfig defined in configgrpc that parses the port defined in the
endpoint. The otlp exporter uses this port parsing to validate that
**Link to tracking Issue:** [Issue
9505](https://github.com/open-telemetry/opentelemetry-collector/issues/9505)
**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:**
- Adds `component.MustNewType` to create a type. This function panics if
the type has invalid characters. Add similar functions
`component.MustNewID` and `component.MustNewIDWithName`.
- Adds `component.Type.String` to recover the string
- Use `component.MustNewType`, `component.MustNewID`,
`component.MustNewIDWithName` and `component.Type.String` everywhere in
this codebase. To do this I changed `component.Type` into an opaque
struct and checked for compile-time errors.
Some notes:
1. All components currently on core and contrib follow this rule. This
is still breaking for other components.
2. A future PR will change this into a struct, to actually validate this
(right now you can just do `component.Type("anything")` to bypass
validation). I want to do this in two steps to avoid breaking contrib
tests: we first introduce this function, and after that we change into a
struct.
**Link to tracking Issue:** Updates #9208
* [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>
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>
* fix: refactored configgrpc and tests
* fix: dealt with zlib and deflate and add tests
* chore: add changelog
* fix: make getGRPCCompressionName private
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 PR is a port of the configfrpc's ToDialOptions() and confighttp ToClient() from PR #3128 in a piece meal fashion.
The following are the changes
- Refactored configgrpc.PerRPCAuth as extension implementing configauth.GrpcClientAuthenticator
- Plugged in extensions configuration to all the grpc based clients in the core (OTLP, OpenCensus, Jaeger, JaegerReceiver)
- Plugged in extensions configuration to all the HTTP based clients in the core (Zipkin, OTLPHTTP)
Link to tracking Issue:
#3282#3276
Testing:
Unit tests, [manual test described (for only oidc)](#3128 (comment))
This PR adds support to add client side (exporter) authenticators for HTTP and gRPC clients through extension based authenticators. This is built of top of what was added for receiver (server) side authenticators via extensions in #2603
**Link to tracking Issue:** #3115
**Testing:**
- Did a manual testing for static bearer token.
- Added unit tests
* Add support for queued retry in the exporter helper.
Changed only the OTLP exporter for the moment to use the new settings.
Timeout is enabled for all the exporters. Fixes#1193
There are some missing features that will be added in a followup PR:
1. Enforcing errors. For the moment added the Throttle error as a hack to keep backwards compatibility with OTLP.
2. Enable queued and retry for all exporters.
3. Fix observability metrics for the case when requests are dropped because the queue is full.
* First round of comments addressed
* Added round_robin balancer as an option to gRPC client settings
* Added documentation changes`
* Changed the balancerName setting from bool to string to accomodate new balancers in future
Setting invalid balancer is panicking. Hence validated the same & thrown an error
* Fixed test
* Fixed tests
* Replaced grpc.WithBalancerName with grpc.WithDefaultServiceConfig
* Validated the balancerName using a var string array instead of error control flow
* Fixed lint errors
* Fixed lint errors
* typo fix in documentation
* Added PerRPCCredentials for gRPC settings
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
* Changes based on the reviews
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
* Fixed per-RPC auth type in error message
Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
* Removed support for reading bearer token from file
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
* Allow to tune the read/write buffers for gRPC clients
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Increase the memory size since we increased the write buffer size
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>