Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[processor/resourcedetectionprocessor] Add a more general and flexible detector #34556

Open
JaredTan95 opened this issue Aug 9, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request processor/resourcedetection Resource detection processor Sponsor Needed New component seeking sponsor Stale

Comments

@JaredTan95
Copy link
Member

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:

processors:
  resourcedetection/http:
    detectors: [http]
    http:
      endpoint: http://my-http-resourcedetection:8080 # external http url
      interval: 1h # the interval of requests
      headers:
        my-token: xxxxxxxxxxx
        tanent: one
      .......more options......

the response of the http should be returned as json(contains real attributes and their values) , Examples:

[
    {
        "datacenter": "idc01",
        "enabled": true
    },
    {
        "zone": "zone01",
        "enabled": false
    }
]

Based on the above results, the http detector will append or override datacenter=idc01 in the resource value in telemetry data.

Describe alternatives you've considered

No response

Additional context

No response

@JaredTan95 JaredTan95 added enhancement New feature or request needs triage New item requiring triage labels Aug 9, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Aug 9, 2024
@JaredTan95 JaredTan95 added the Sponsor Needed New component seeking sponsor label Aug 9, 2024
@JaredTan95 JaredTan95 self-assigned this Aug 9, 2024
@Frapschen
Copy link
Contributor

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.

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor/resourcedetection Resource detection processor Sponsor Needed New component seeking sponsor Stale
Projects
None yet
Development

No branches or pull requests

2 participants