Skip to content

Conversation

@geekdave
Copy link
Contributor

Description

Implements a resource detection processor for Oracle Cloud Infrastructure (OCI) to enrich telemetry with environment metadata.

Uses semantic conventions for OCI: open-telemetry/semantic-conventions#1720

Link to tracking issue

Fixes #35091

Testing

  • Added unit tests following existing conventions
  • Built custom otel collector using ocb, ran on Oracle Kubernetes Engine (OKE) cluster, and verified that resulting metrics are enriched with these labels:
Explore_-_Prometheus_-_Grafana

Documentation

  • Updated processor documentation (processor/resourcedetectionprocessor/README.md) to describe Oracle Cloud detection usage and configuration.
  • Added Go docstrings and inline comments for maintainability.

@geekdave geekdave requested review from a team and dashpole as code owners September 11, 2025 00:19
@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Sep 11, 2025
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@atoulme
Copy link
Contributor

atoulme commented Sep 12, 2025

Will you be owning this code moving forward?

@geekdave
Copy link
Contributor Author

@atoulme Yes! I, along with two of my colleagues at Oracle, @tonychoe and @raphaelfan can be the codeowners.

We discussed ownership and project sponsorship with @dashpole (who volunteered to be the project sponsor) in this linked issue:
#35091

@dashpole
Copy link
Contributor

Feel free to ping me on slack once tests are passing

@atoulme atoulme added the Accepted Component New component has been sponsored label Sep 17, 2025
@atoulme atoulme marked this pull request as draft September 17, 2025 06:35
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@atoulme
Copy link
Contributor

atoulme commented Sep 17, 2025

Moving to draft while you work out the issues, please mark ready for review when CI passes.

@geekdave geekdave marked this pull request as ready for review September 18, 2025 21:08
@geekdave
Copy link
Contributor Author

@atoulme Tests are now passing! I've been working with @dashpole who has been helping to manually trigger test runs. The most recent run passed. However, when I clicked on Ready for Review it seems to have cleared the recent test results. It may require a re-trigger?

@geekdave
Copy link
Contributor Author

Also wanted to mention that I tried to add myself and my Oracle teammates as codeowners in our metadata.yaml file, but CI failed because we are not members of the OTel GitHub Org. @dashpole mentioned this is a classic "chicken and egg" problem. For now I removed us from the list. But I wanted to reiterate that we are committed to maintaining and supporting this component. I'm looking forward to participating in meaningful ways to work towards earning org membership (and codeowner status)!

@atoulme
Copy link
Contributor

atoulme commented Sep 18, 2025

@geekdave you can add yourself to the allowlist under cmd/githubgen/allowlist.txt one username per line if you would like to be codeowners ahead of joining as members. Or we can add you post facto.

I have triggered the build.

@atoulme
Copy link
Contributor

atoulme commented Sep 18, 2025

@dashpole please review

@geekdave
Copy link
Contributor Author

@atoulme Thanks for the tip! If it's alright I will hold my breath and back away slowly from this PR's green CI status, and update the allowlist as a follow-up PR after-the-fact. 😉

// Detect detects system metadata and returns a resource with the available ones
func (d *Detector) Detect(ctx context.Context) (resource pcommon.Resource, schemaURL string, err error) {
compute, err := d.provider.Metadata(ctx)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is OK, but you may want to try and differentiate between the case where someone is not on oracle cloud (where return pcommon.NewResource(), "", nil is correct), and the case where someone is on oracle cloud, but the request failed (e.g. a timeout?). Currently, it is possible for a user to end up with missing resource attributes in the latter case.

Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback above is non-blocking, but I would recommend filing an issue to track fixing it if you choose not to address it in this PR.

@atoulme
Copy link
Contributor

atoulme commented Sep 19, 2025

@geekdave please file an issue or fix it here, and we can merge.

@geekdave
Copy link
Contributor Author

@atoulme @dashpole I've created an issue addressing the above feedback, and suggesting a few approaches. I'll investigate further. In the meantime if any of the possible approaches in the issue stand out as preferable, please feel free to comment: #42794

@dashpole dashpole added the ready to merge Code review completed; ready to merge by maintainers label Sep 22, 2025
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@songy23 songy23 merged commit 3d381f2 into open-telemetry:main Sep 23, 2025
322 of 324 checks passed
@otelbot
Copy link
Contributor

otelbot bot commented Sep 23, 2025

Thank you for your contribution @geekdave! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

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 first-time contributor PRs made by new contributors internal/metadataproviders processor/resourcedetection Resource detection processor ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Oracle Cloud with Resource Detection Processor

6 participants