Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Stackdriver exporters: automatically determine project_id #324

Open

Description

@g-easy

When running on GCE, this should be doable via the metadata server: https://cloud.google.com/compute/docs/storing-retrieving-metadata#default

Activity

  1. mandarjog commented on Jul 3, 2019

    @mandarjog

    /subscribe

  2. alichnewsky commented on Jun 20, 2020

    @alichnewsky

    sample implementation in a test program here. Uses cpr as an idiomatic wrapper to libcurl.

    • needs to be encapsulated, moved to a library ( in opencensus/common/internal/cloud ? ). Unless a dedicated, idiomatic library is provided by google-cloud-cpp.
    • needs to make the distinction between GCE VM, GKE container/pod, ( a docker container inside GCE VM? inside AppEngine flex ? inside Cloud Run ? they will have different well known google.api.MonitoredResource objects and labels...)
    • a lingering question remains in my mind on the difference between the project id at the monitored resource level and as a monitored resource label (lines 210-213) . Are they the same when on GCE VM? if a workspace monitors multiple project, does the code submitting the metric need to know a 'stackdriver project id ?'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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