Skip to content

Add Interface Names in IP and MAC Attributes #39419

Open
@naman-jain-15

Description

@naman-jain-15

Component(s)

processor/resourcedetection

Is your feature request related to a problem? Please describe.

In the current implementation of resource detection and metadata providers, host.ip and host.mac do not include interface name details. However, including this information could be beneficial in certain scenarios.

Describe the solution you'd like

// HostIPs returns the host's IP interfaces
HostIPs() ([]InterfaceIP, error)

// HostMACs returns the host's MAC addresses
HostMACs() ([]InterfaceMAC, error)

type InterfaceIP struct {
	IP            net.IP
	InterfaceName string
}

// Define a new struct for interface MACs
type InterfaceMAC struct {
	MAC           net.HardwareAddr
	InterfaceName string
}

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions