Skip to content

Commit

Permalink
Merge branch 'main' into fix-build
Browse files Browse the repository at this point in the history
  • Loading branch information
psx95 authored Jan 31, 2024
2 parents 52f1680 + b62568e commit 0c8d927
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/instrumentation-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ cd java-docs-samples/opentelemetry/spring-boot-instrumentation/
export USERID="$(id -u)"
# Specify the project ID
export GOOGLE_CLOUD_PROJECT=<your project id>
docker compose -f docker-compose.yaml -f docker-compose.adc.yaml up --abort-on-container-exit
docker compose -f docker-compose.yaml -f docker-compose.creds.yaml up --abort-on-container-exit
```

[auth_command]: https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default/login
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

version: "3"
Expand All @@ -26,8 +28,8 @@ services:
otelcol:
# If the collector does not have permission to read the mounted volumes, set
# USERID=$(id -u) to run the container as the current user
user: ${USERID}
user: $USERID
volumes:
- ${GOOGLE_APPLICATION_CREDENTIALS:-/dev/null}:/tmp/keys/gcp-credentials.json:ro
- ${GOOGLE_APPLICATION_CREDENTIALS?}:${GOOGLE_APPLICATION_CREDENTIALS}:ro
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/gcp-credentials.json
- GOOGLE_APPLICATION_CREDENTIALS
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ exporters:
# Export logs and traces using the standard googelcloud exporter
googlecloud:
project: $GOOGLE_CLOUD_PROJECT
# Needed when using Application Default Credentials in Cloud Shell to call Cloud Trace
# destination_project_quota: true
log:
default_log_name: "opentelemetry.io/collector-exported-log"
# Export metrics to Google Managed service for Prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class DockerComposeTestsIT {
@ClassRule
public static ComposeContainer environment =
new ComposeContainer(new File("docker-compose.yaml"), new File("docker-compose.adc.yaml"))
new ComposeContainer(new File("docker-compose.yaml"), new File("docker-compose.creds.yaml"))
.withEnv("USERID", System.getenv("USERID"))
.withEnv("GOOGLE_CLOUD_PROJECT", getenvNotNull("GOOGLE_CLOUD_PROJECT"))
.withEnv(
Expand Down

0 comments on commit 0c8d927

Please sign in to comment.