opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[confmap/httpmapprovider] An Implementation of ConfigMapProvider for HTTP data source

Open junhaoyu-aws opened this issue 3 years ago • 1 comments
trafficstars

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

junhaoyu-aws avatar Aug 04 '22 04:08 junhaoyu-aws

I think this is great.

bogdandrutu avatar Aug 05 '22 21:08 bogdandrutu

Done.

bogdandrutu avatar Aug 18 '22 16:08 bogdandrutu