opentelemetry-collector
opentelemetry-collector copied to clipboard
[confmap/httpmapprovider] An Implementation of ConfigMapProvider for HTTP data source
Is your feature request related to a problem? Please describe. No. I suggest this new feature to allow OTEL Collector the ability to load configuration for itself by fetching and reading config files returned by HTTP servers.
Describe the solution you'd like
Create a new folder httpprovider under confmap, with files provider.go and provider_test.go. For the provider.go, I in a way keep the same as what yaml/file/envproviders do, but need a HTTP client to send HTTP requests. For the provider_test.go, I did unit tests for multiple possible cases (Empty urls, invalid config files, non-exist config files, and so on).
Additional context I've implemented the code for this feature. Passed both unit tests and integration tests.
Sponsor @Aneurysm9
I think this is great.
Done.