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

Use GCLOUD_PROJECT instead of GCLOUD_PROJECT_NUM #237

Merged
merged 1 commit into from
Apr 14, 2016
Merged

Use GCLOUD_PROJECT instead of GCLOUD_PROJECT_NUM #237

merged 1 commit into from
Apr 14, 2016

Conversation

matthewloring
Copy link
Contributor

Fixes #236

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 13, 2016
@matthewloring
Copy link
Contributor Author

@ofrobots PTAL.

@ofrobots
Copy link
Contributor

Looking at https://www.npmjs.com/package/gcloud, they are using GCLOUD_PROJECT_ID

@matthewloring matthewloring changed the title Use GCLOUD_PROJECT instead of GCLOUD_PROJECT_NUM Use GCLOUD_PROJECT_ID instead of GCLOUD_PROJECT_NUM Apr 13, 2016
@matthewloring
Copy link
Contributor Author

Fixed.

@matthewloring matthewloring changed the title Use GCLOUD_PROJECT_ID instead of GCLOUD_PROJECT_NUM Use GCLOUD_PROJECT instead of GCLOUD_PROJECT_NUM Apr 13, 2016
@ofrobots
Copy link
Contributor

For posterity, that was a bug in gcloud's README file. The correct env. var. to use is GCLOUD_PROJECT.

@@ -24,17 +24,17 @@ This module provides Cloud Trace support for Node.js applications. [Google Cloud

npm install --save @google/cloud-trace

2. Include and start the library at the *top of the main script of your application*. It's important that Cloud Trace is the first thing executed so that it can accurately gather data:
2. If you are running locally, or not on the Google Cloud Platform, set the GCLOUD_PROJECT environment variable. Your project ID is visible in the [Google Cloud Console Console](https://console.cloud.google.com/project?_ga=1.258049870.576536942.1443543237), it may be something like `particular-future-12345`. If your application is [running on Google Cloud Platform](running-on-google-cloud-platform), you don't need to specify the project ID.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@JustinBeckwith
Copy link
Contributor

This is looking a lot better folks. LGTM. Lets get the GCLOUD_PROJECT change in, and then if needed we can bikeshed the readme prose.

@matthewloring
Copy link
Contributor Author

@ofrobots @JustinBeckwith I've taken another editing pass at this.

@@ -24,17 +24,24 @@ This module provides StackDriver Trace support for Node.js applications. [StackD

npm install --save @google/cloud-trace

2. Include and start the library at the *top of the main script of your application*. It's important that the trace agent is the first thing executed so that it can accurately gather data:
2. Set the GCLOUD_PROJECT environment variable. You can find your Project ID in the [Google Cloud Developers Console](https://console.cloud.google.com/project?_ga=1.258049870.576536942.1443543237), or by running the command `gcloud projects list`. You can ensure this environment variable is set at startup time by placing it in your startup script in `package.json`:

This comment was marked as spam.

This comment was marked as spam.

@ofrobots
Copy link
Contributor

LGTM w/ nit, once the CI is green.

@matthewloring matthewloring merged commit f2e65a2 into googleapis:master Apr 14, 2016
@matthewloring matthewloring deleted the env-var branch April 14, 2016 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants