-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for MPP-3467: add googlecloudprofiler to PrivateRelayConfig.ready
Also moves get_version_info to privaterelay.apps
- Loading branch information
1 parent
1fdb597
commit 15548d1
Showing
12 changed files
with
123 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,6 @@ junit.xml | |
state.json | ||
har/ | ||
allure-results/ | ||
allure-report/ | ||
allure-report/ | ||
gcp_key.json | ||
version.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo "${GOOGLE_CREDENTIALS_B64}" | base64 -d > gcp_key.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo "${GOOGLE_CREDENTIALS_B64}" | base64 -d > gcp_key.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Profiler | ||
|
||
This doc describes how we profile Relay code. | ||
|
||
## Google Cloud Profiler | ||
|
||
We use Google Cloud Profiler: https://cloud.google.com/profiler/docs/about-profiler | ||
|
||
### Setup | ||
|
||
Our google cloud profiler agent uses a service account with `roles/cloudprofiler.agent` | ||
role. So, you need a JSON key file for the account, and you need to set the | ||
`GOOGLE_APPLICATION_CREDENTIALS` environment variable to the fully qualified name of the | ||
JSON key file. | ||
|
||
#### Local servers | ||
|
||
1. Get the JSON key file from another Relay ENGR | ||
2. Update your `.env` `GOOGLE_APPLICATION_CREDENTIALS` value to the fully-qualified name | ||
of the JSON key file. | ||
|
||
#### Dev server | ||
|
||
For the dev server, we use a `.profile` (and/or `bin/pre_compile`) script which copies | ||
the `GOOGLE_CREDENTIALS_B64` environment variable value into a `gcp_key.json` file at | ||
build time. | ||
|
||
#### Stage & Prod | ||
|
||
TBD: Figure out if we should use Compute Engine, GKE, Flexible Environment, or Standard | ||
Environment instructions from https://cloud.google.com/profiler/docs/profiling-python#using-profiler | ||
|
||
### Viewing profiler data | ||
|
||
Go to https://console.cloud.google.com/profiler/fxprivaterelay-nonprod/cpu?project=moz-fx-fxprivate-nonprod-6df0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters