Skip to content

[receiver/apache] send port number as an attribute #14791

Closed
@aboguszewski-sumo

Description

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

Currently, the receiver only sends the server's name (which is the hostname) as an attribute. It would be useful to send also the port (for example, Sumo Logic app for Apache uses it).
The important thing to note here is that the port can't be deduced solely from the endpoint - the default port is different when we use http (80) and when we use https (443).

Describe the solution you'd like

An additional attribute should be sent with the metrics.
The solution will be short and easy to implement, here is how Telegraf does it: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/apache/apache.go#L190

Describe alternatives you've considered

No response

Additional context

The hostname is currently being sent as a separate attribute, not a resource attribute - it would be cool to change that, but I'm not sure if it should be done in the same PR. I'm not sure, how to add the port here. Ideally, I think that both attributes should be resource attributes. If we shouldn't change now how the hostname is sent, should the port be sent as a normal attribute (to keep the convention) or as a resource attribute (as it actually should be)?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions