Repository navigation
getApplicationDefault is undefined. #121
Description
Activity
trying to use this with stackdriver.
Can you post your error? And did you set the
GCLOUD_PROJECTandGOOGLE_APPLICATION_CREDENTIALSenvironment variables? See https://github.com/GoogleCloudPlatform/nodejs-docs-samples#prerequisites@jmdobry yeah got it working now. I did not have the
GOOGLE_APPLICATION_CREDENTIALSenv set. now i'm trying to get the custom metric to be visible on a dashboard. Do you know where I can go to for that?Have you looked through https://app.google.stackdriver.com/ for your custom metric? You might have to write some data to the custom metric before it will show up. You also might have to create a new dashboard or alert targeting the metric. @waprin probably knows more.
You should see "Custom Metrics" as an option under "Resource Type". If you don't, you probably haven't successfully created any custom metric descriptors.
@waprin any documentation to show me on how to do that?
so I can successfully create it under the code but not see it in the UI until i make a descriptor?
You are creating a metric descriptor, you create metrics when you actually write values to it. As soon as you create it you should be able to see it, one guess at your problem is by default the sample code deletes the metric descriptor after creating it. This was in the interest of keeping projects cleaned up, check to make sure you've commented that part out.
Unfortunately I agree the docs no the UI are a bit sparse, working on improving that now but nothing's ready yet.
17 remaining items
- added a commit that references this issue
on Nov 16, 2022 - added 2 commits that reference this issue
on Nov 17, 2022 - added a commit that references this issue
on Nov 18, 2022 - added a commit that references this issue
on Nov 21, 2022 - added a commit that references this issue
on Nov 22, 2022 - added a commit that references this issue
on Jan 25, 2023

running the
create_custom_metricon line https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/monitoring/create_custom_metric.js#L218the object google.auth looks like
{ Compute: [Function], JWT: [Function], OAuth2: [Function] }no
getApplicationDefaultfunctionI'm supplying a project id, is there something i'm doing wrong here?
Thanks.