Skip to content

Commit b62568e

Browse files
authored
Quota project fix (#286)
1 parent c272314 commit b62568e

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

examples/instrumentation-quickstart/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ cd java-docs-samples/opentelemetry/spring-boot-instrumentation/
5858
export USERID="$(id -u)"
5959
# Specify the project ID
6060
export GOOGLE_CLOUD_PROJECT=<your project id>
61-
docker compose -f docker-compose.yaml -f docker-compose.adc.yaml up --abort-on-container-exit
61+
docker compose -f docker-compose.yaml -f docker-compose.creds.yaml up --abort-on-container-exit
6262
```
6363

6464
[auth_command]: https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default/login

examples/instrumentation-quickstart/docker-compose.adc.yaml renamed to examples/instrumentation-quickstart/docker-compose.creds.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Use this compose file along with docker-compose.yaml to pass Application Default
16-
# Credentials from the host into the collector container:
15+
# Use this compose file along with docker-compose.yaml to pass a credentials file from the host
16+
# into the collector container:
1717
#
1818
# ```
19-
# export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.config/gcloud/application_default_credentials.json
20-
# docker compose -f docker-compose.yaml -f docker-compose.adc.yaml up
19+
# GOOGLE_CLOUD_PROJECT="otel-quickstart-demos" \
20+
# GOOGLE_APPLICATION_CREDENTIALS="$HOME/.config/gcloud/application_default_credentials.json" \
21+
# USERID="$(id -u)" \
22+
# docker compose -f docker-compose.yaml -f docker-compose.creds.yaml up --abort-on-container-exit
2123
# ```
2224

2325
version: "3"
@@ -26,8 +28,8 @@ services:
2628
otelcol:
2729
# If the collector does not have permission to read the mounted volumes, set
2830
# USERID=$(id -u) to run the container as the current user
29-
user: ${USERID}
31+
user: $USERID
3032
volumes:
31-
- ${GOOGLE_APPLICATION_CREDENTIALS:-/dev/null}:/tmp/keys/gcp-credentials.json:ro
33+
- ${GOOGLE_APPLICATION_CREDENTIALS?}:${GOOGLE_APPLICATION_CREDENTIALS}:ro
3234
environment:
33-
- GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/gcp-credentials.json
35+
- GOOGLE_APPLICATION_CREDENTIALS

examples/instrumentation-quickstart/otel-collector-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ exporters:
7272
# Export logs and traces using the standard googelcloud exporter
7373
googlecloud:
7474
project: $GOOGLE_CLOUD_PROJECT
75-
# Needed when using Application Default Credentials in Cloud Shell to call Cloud Trace
76-
# destination_project_quota: true
7775
log:
7876
default_log_name: "opentelemetry.io/collector-exported-log"
7977
# Export metrics to Google Managed service for Prometheus

examples/instrumentation-quickstart/src/test/java/com/example/demo/DockerComposeTestsIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
public class DockerComposeTestsIT {
3636
@ClassRule
3737
public static ComposeContainer environment =
38-
new ComposeContainer(new File("docker-compose.yaml"), new File("docker-compose.adc.yaml"))
38+
new ComposeContainer(new File("docker-compose.yaml"), new File("docker-compose.creds.yaml"))
3939
.withEnv("USERID", System.getenv("USERID"))
4040
.withEnv("GOOGLE_CLOUD_PROJECT", getenvNotNull("GOOGLE_CLOUD_PROJECT"))
4141
.withEnv(

0 commit comments

Comments
 (0)