Open c-kruse opened 1 year ago
As noted by @rnishtala-sumo, the collector already has a facility for getting the collector's hostname, the resource detection processor.
I think there is value in finding a way to allow for some consistency between this extension and what is configured in resourcedetection. As I understand, when installed and configured by sumo it should be consistent https://github.com/SumoLogic/sumologic-otel-collector/blob/v0.88.0-sumo-0/examples/sumologic.yaml#L81 (try to resolve fqdn then us os.hostname), but the resourcedetection processor is configurable in ways this extension is not.
https://github.com/SumoLogic/sumologic-otel-collector/pull/1296/files#r1369182047
Discovered by observing the github actions hosted darwin amd64 tests. Though this is most apparent in test environments, it could happen in a live deployment just the same, so we will need a way to resolve this.
The https://github.com/Showmax/go-fqdn library does not have an interface that allows us to pass a context in order to effectively resolve with timeout. We should probably set a timeout for this action, and maybe have some way to limit depth of whatever lookup it may be doing.