Skip to content

Does not respect GOOGLE_CLOUD_QUOTA_PROJECT env variable #432

@michaelbannister

Description

@michaelbannister

The monitoring.Service is constructed with a http.Client based on google.DefaultClient from golang.org/x/oauth2/google.

It seems this does not respect the environment variable GOOGLE_CLOUD_QUOTA_PROJECT to set the X-goog-user-project request header (GCP docs). The use of WithHTTPClient takes precedence and so the code that would otherwise set up the client in a way that respected the quota project is not used.

I can't see a straightforward way to fix this without specifically adding something into stackdriver_exporter to configure the quota project – but I'm not an expert in Go or the GCP client libraries.

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