influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.32k stars 5.53k forks source link

inputs.eventhub_consumer: Support setting a proxy #15588

Open kpdo opened 3 weeks ago

kpdo commented 3 weeks ago

Use Case

I want to be able to set a proxy for inputs.eventhub_consumer to able to consume an Azure event hub from behind a corporate proxy.

Expected behavior

I expected to be able to set a proxy in the telegraf config.

Actual behavior

Such a setting does not exist for inputs.eventhub_consumer

Additional info

The currently used library "azure-event-hubs-go" seems to not support that, see: https://github.com/Azure/azure-event-hubs-go/issues/163

However, this answer suggests that it is possible using the newer "azeventhubs": https://github.com/Azure/azure-event-hubs-go/issues/163#issuecomment-2124205621

powersj commented 3 weeks ago

We already have two other issues documenting the need to migrate away from the current library and to azeventhubs. I'd rather not have a third:

However, the suggestion here is to start using a custom connection to also grab the proxy from the environment. This addition is a bit more than just moving libraries, so we can keep this one open for now.

Happy to see a PR migrating to the new library.