File tree Expand file tree Collapse file tree
examples/instrumentation-quickstart
src/test/java/com/example/demo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ cd java-docs-samples/opentelemetry/spring-boot-instrumentation/
5858export USERID=" $( id -u) "
5959# Specify the project ID
6060export 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
Original file line number Diff line number Diff line change 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
2325version : " 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 3535public 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 (
You can’t perform that action at this time.
0 commit comments