Skip to content

Commit abbe1aa

Browse files
psx95aabmass
andauthored
Update instrumentation-quickstart README (#315)
* Update README * Apply suggestions from code review Co-authored-by: Aaron Abbott <[email protected]> * Implement suggested changes --------- Co-authored-by: Aaron Abbott <[email protected]>
1 parent 50dfd01 commit abbe1aa

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

examples/instrumentation-quickstart/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,26 @@ oauth2 flow (read more about the command [here][auth_command]):
3939

4040
gcloud auth application-default login
4141

42-
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with `export GOOGLE_APPLICATION_CREDENTIALS="$HOME/.config/gcloud/application_default_credentials.json"`
43-
or manually set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to point to a service
44-
account key JSON file path.
42+
> [!CAUTION]
43+
> This method of authentication is not recommended for production environments.
44+
45+
Executing this command will save your application credentials to the default path which will depend on the type of machine -
46+
- Linux, macOS: `$HOME/.config/gcloud/application_default_credentials.json`
47+
- Windows: `%APPDATA%\gcloud\application_default_credentials.json`
48+
49+
Next, export the credentials to `GOOGLE_APPLICATION_CREDENTIALS` environment variable -
50+
51+
For Linux & MacOS:
52+
```shell
53+
export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.config/gcloud/application_default_credentials.json
54+
```
55+
56+
For Windows:
57+
```shell
58+
SET GOOGLE_APPLICATION_CREDENTIALS=%APPDATA%\gcloud\application_default_credentials.json
59+
```
60+
61+
You can also manually set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to point to a service account key JSON file path.
4562

4663
Learn more at [Setting Up Authentication for Server to Server Production Applications][ADC].
4764

@@ -60,4 +77,11 @@ export GOOGLE_CLOUD_PROJECT=<your project id>
6077
docker compose -f docker-compose.yaml -f docker-compose.creds.yaml up --abort-on-container-exit
6178
```
6279

80+
## Viewing the results
81+
82+
After a successful run of the example, you can see the generated metrics in the GCP console via Metrics Explorer. The generated metrics would be present under the `Prometheus Target` resource.
83+
84+
Similarly, to view the generated traces in the GCP console, use the Trace Explorer.
85+
6386
[auth_command]: https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default/login
87+
[ADC]: https://cloud.google.com/docs/authentication/application-default-credentials

0 commit comments

Comments
 (0)