Open JaredTan95 opened 1 month ago
Pinging code owners:
processor/resourcedetection: @Aneurysm9 @dashpole
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Our customer has a use case: they want to add some attributes from a remote HTTP Server. We found that the case is more likely how the resource detection processor works. We think it's a common use case and would be happy to contribute it if this is accepted.
Component(s)
processor/resourcedetection
Is your feature request related to a problem? Please describe.
Currently
resourcedetectionprocessor
has built-in aws, azure, consul, docker, k8snode, system and so on rich out-of-the-box detection. Those detectors all rely on third-party components, and adding new detectors requires the user to add an implementation of the new detector in the otel-col-contrib library. Therefore, a more flexible approach is needed.Describe the solution you'd like
This proposal is intended to refer to a more flexible, general-purpose approach to detection, similar to the prometheus HTTP SD config, where users simply implement a custom interface and return it in a specified format.
This feature will be on the
processor/resourcedetectionprocessor/internal/http
directory, and the following configuration items are provided:the response of the http should be returned as json(contains real attributes and their values) , Examples:
Based on the above results, the
http detector
will append or overridedatacenter=idc01
in the resource value in telemetry data.Describe alternatives you've considered
No response
Additional context
No response