Skip to content

Support short-lived token authentication for Stackdriver #1155

@donkey-roll

Description

@donkey-roll

Is this a BUG REPORT or a FEATURE REQUEST?

This is a FEATURE REQUEST.

Problem Description

Currently, the Stackdriver exporter is tightly coupled with the Google Compute Engine (GCE) environment. It fetches required metadata, such as project-id and instance-id, directly from the GCE metadata server. For authentication, it relies on Application Default Credentials (ADC), which are typically discovered automatically from the environment (e.g., an attached service account on a GCE VM).

This implementation prevents the Stackdriver exporter from functioning in non-GCE environments, such as on-premises deployments or other cloud platforms, where the GCE metadata server and default service accounts are not available.

Proposed Solution

To enable the Stackdriver exporter to run in a wider range of environments, this issue proposes adding support for authentication using short-lived OAuth2 tokens.

This would allow users to provide credentials explicitly, decoupling the exporter from the underlying infrastructure and enabling it to authenticate with the Google Cloud Monitoring API from any environment.

Additional Context

I see there is an ongoing effort to migrate the Stackdriver exporter to OpenTelemetry in issue #1008. I believe this feature would be a valuable addition to the new OpenTelemetry-based implementation as well, ensuring it is flexible and supports various deployment scenarios from the start.

I would love to contribute to this issue.

cc @daveoy @dashpole @wangzhen127

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions