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

[receiver/googlecloudmonitoring, receiver/googlecloudspanner] Add optional config for credentials #37349

Open
PaulBernier opened this issue Jan 20, 2025 · 5 comments

Comments

@PaulBernier
Copy link
Contributor

Component(s)

receiver/googlecloudmonitoring, receiver/googlecloudspanner

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

I'd like to add the ability to explicitly specify credentials in the receiver config instead of relying on implicit default credentials defined in the environment of the otel collector. We don't always have the possibility to set the credentials in env variables, also we might already have other GCP app running with a different set of credentials. We should offer the flexibility to specify either a path to creds file or the JSON of the creds.

Describe the solution you'd like

I already made this change for receiver/googlecloudpubsub #37255. The maintainer would prefer for that change to be first added to the Google maintained receiver, which is why I open this issue.

Describe alternatives you've considered

No response

Additional context

No response

Copy link
Contributor

Pinging code owners:

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

@PaulBernier PaulBernier changed the title Add optional config for credentials [receiver/googlecloudmonitoring, receiver/googlecloudspanner] Add optional config for credentials Jan 20, 2025
@dashpole dashpole self-assigned this Jan 21, 2025
@dashpole dashpole added extension/googleclientauth and removed needs triage New item requiring triage labels Jan 21, 2025
Copy link
Contributor

Pinging code owners for extension/googleclientauth: @dashpole @aabmass @jsuereth @punya @psx95. See Adding Labels via Comments if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label.

@dashpole
Copy link
Contributor

I would like to try to consolidate these configuration options in the googleclientauth extension's config, if possible, rather than add them to all of the exporters and receivers individually. The exporters and receivers would need to be updated to use the auth extension as a library, and embed the googleclientauth's Config.

@PaulBernier
Copy link
Contributor Author

PaulBernier commented Jan 21, 2025

@dashpole That would make sense, I was not aware of this extension. But currently I don't see any receiver or exporter in open-telemetry/opentelemetry-collector-contrib having a dependency on googleclientauthextension, is that WIP?

If I follow correctly, it would have to be a contribution to this repo first https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/main/extension/googleclientauthextension and then to https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/googleclientauthextension (that is just a shallow wrapper?), is that correct?

@dashpole
Copy link
Contributor

the googleclientauth extension works (is implemented), but isn't used by the google exporters today. It currently can only be used by components that support pluggable auth.

Yeah... I should move the entire implementation into contrib. But for now, starting with https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/main/extension/googleclientauthextension is the way to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants