Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Added keyFilename/credentials to config object #169

Merged
merged 4 commits into from
Nov 3, 2016
Merged

Conversation

kjin
Copy link
Contributor

@kjin kjin commented Nov 1, 2016

Clients may use config.keyFilename and config.credentials to supply a key file or its contents in lieu of GCLOUD_APPLICATION_CREDENTIALS.

See also: googleapis/cloud-trace-nodejs#315

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 1, 2016
@kjin
Copy link
Contributor Author

kjin commented Nov 1, 2016

PTAL

Only makes sense when start() is documented.
2. Copy the key somewhere your application can access it. Be sure not to expose the key publicly.
3. Set the environment variable `GOOGLE_APPLICATION_CREDENTIALS` to the full path to the key. The debug agent will automatically look for this environment variable.
* If you are running your application on a machine where your are using the [`gcloud` command line tools][gcloud-sdk], and are logged using `gcloud auth login`, you already have sufficient credentials, and a service account key is not required.
* Alternatively, you may set the keyFilename or credentials configuration field to the full path or contents to the key file, respectively. Setting either of these fields will override either setting GOOGLE_APPLICATION_CREDENTIALS or logging in using gcloud. (See the [default configuration](https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/blob/master/config.js) for more details.)

This comment was marked as spam.

This comment was marked as spam.

* If you are running your application on a machine where your are using the [`gcloud` command line tools][gcloud-sdk], and are logged using `gcloud auth login`, you already have sufficient credentials, and a service account key is not required.
* Alternatively, you may set the keyFilename or credentials configuration field to the full path or contents to the key file, respectively. Setting either of these fields will override either setting GOOGLE_APPLICATION_CREDENTIALS or logging in using gcloud. (See the [default configuration](https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/blob/master/config.js) for more details.)

3. Generate a `source-context.json` file which contains information about the version of the source code used to build the application. This file should be located in the root directory of your application. When you open the Stackdriver Debugger in the Cloud Platform Console, it uses the information in this file to display the correct version of the source.

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants