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

Support Oracle Cloud with Resource Detection Processor #35091

Open
tonychoe opened this issue Sep 10, 2024 · 7 comments
Open

Support Oracle Cloud with Resource Detection Processor #35091

tonychoe opened this issue Sep 10, 2024 · 7 comments
Assignees
Labels
Accepted Component New component has been sponsored enhancement New feature or request processor/resourcedetection Resource detection processor Stale

Comments

@tonychoe
Copy link

Component(s)

processor/resourcedetection

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

The Resource Detection Processor do not support Oracle's Cloud ("Oracle Cloud Infrastructure" or "OCI") yet.

Describe the solution you'd like

We propose to develop this processor to support detecting OCI compute node and (Oracle Kubernetes Engine) node resources.

OCI offers the Instance Metadata Service which works like the one from AWS.

We're from Oracle and happy to contribute to implement and maintain this feature.

Describe alternatives you've considered

No response

Additional context

No response

@tonychoe tonychoe added enhancement New feature or request needs triage New item requiring triage labels Sep 10, 2024
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Sep 10, 2024
Copy link
Contributor

Pinging code owners:

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

@dashpole dashpole removed the needs triage New item requiring triage label Sep 10, 2024
@dashpole
Copy link
Contributor

This works for me. This isn't a "new component" exactly, since it is part of an existing one, but it would be helpful to still roughly follow the new component process: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-new-components. I'll act as your sponsor, and will review PRs.

Before we get started, it would be good to know:

  • what will the name of the detector be?
  • Who will the codeowners be (2 codeowners would be ideal)
  • Which resource attributes will it detect?

@tonychoe
Copy link
Author

tonychoe commented Sep 10, 2024

Thanks @dashpole

  • We'd like to call it "OCI Metadata"
  • codeowners are @tonychoe @raphaelfan (both are from Oracle)
  • The resource attributes we'd like to collect are:

I wrote this to explain that

OCI Metadata
uses OCI SDK for Go to read resource information from the OCI instance metadata API to retrieve the resource attributes of OCI Compute instances and OKE worker nodes.

OCI Metadata

  • cloud.provider ("oci")
  • cloud.platform ("oci_compute")
  • cloud.region (e.g. us-phoenix-1)
  • cloud.availability_zone (e.g. aOft:PHX-AD-1)
  • host.id (instance id)
  • host.name (instance display name)
  • host.type (instance shape)

OKE Metadata

  • cloud.provider ("oci")
  • cloud.platform ("oci_kubernetes engine")
  • cloud.region (e.g. us-phoenix-1)
  • cloud.availability_zone (e.g. aOft:PHX-AD-1)
  • k8s.cluster.name (cluster display name)
  • k8s.cluster.id (cluster id)
  • host.id (instance id)
  • host.name (instance display name)
  • host.type (instance shape)

@dashpole
Copy link
Contributor

We'd like to call it "OCI Metadata"

It would likely be "oci", "oracle", or "oracle_cloud_infrastructure", based on naming of other detectors: https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-collector-contrib+%22type%3A+resourcedetectionprocessor%22&type=code

We might want to stay away from OCI, as that is currently used for the open container initiative in the conventions: https://github.com/open-telemetry/semantic-conventions/blob/156daec14fe8ca12d3fd8c3fad9602e4f80493b2/model/registry/oci.yaml

I would also encourage you to update the list of providers, platforms, etc in the conventions so we get constants we can use from the semconv package: https://github.com/open-telemetry/semantic-conventions/blob/156daec14fe8ca12d3fd8c3fad9602e4f80493b2/model/registry/cloud.yaml#L101. It doesn't need to block the initial release, but we should have those eventually.

@tonychoe
Copy link
Author

Thanks for the pointers. "oracle_cloud_infrastructure" makes sense.

@dashpole
Copy link
Contributor

Cool, you will have a folder in https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor/internal. You should be able to follow https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#vendor-specific-components, and open the "First PR". You won't need to do every part of that. Just look at other detectors if you aren't sure.

@dashpole dashpole added the Accepted Component New component has been sponsored label Sep 11, 2024
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.

@github-actions github-actions bot added the Stale label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored enhancement New feature or request processor/resourcedetection Resource detection processor Stale
Projects
None yet
Development

No branches or pull requests

2 participants