diff --git a/samples/instrumentation-quickstart/cloudbuild-integration.yaml b/samples/instrumentation-quickstart/cloudbuild-integration.yaml index 1d6f1255..cfacb444 100644 --- a/samples/instrumentation-quickstart/cloudbuild-integration.yaml +++ b/samples/instrumentation-quickstart/cloudbuild-integration.yaml @@ -13,13 +13,15 @@ # limitations under the License. steps: - - name: golang:1.23 + - name: golang:1.25 dir: samples/instrumentation-quickstart/integrationtest env: - COMPOSE_OVERRIDE_FILE=../docker-compose.cloudbuild.yaml # https://github.com/testcontainers/testcontainers-go/issues/2754 - TESTCONTAINERS_RYUK_CONNECTION_TIMEOUT=10m - TESTCONTAINERS_RYUK_RECONNECTION_TIMEOUT=10m + - GOOGLE_CLOUD_PROJECT=${_GOOGLE_CLOUD_PROJECT} + - GOOGLE_CLOUD_QUOTA_PROJECT=${_GOOGLE_CLOUD_PROJECT} script: go test -v logsBucket: gs://opentelemetry-ops-e2e-cloud-build-logs diff --git a/samples/instrumentation-quickstart/integrationtest/go.mod b/samples/instrumentation-quickstart/integrationtest/go.mod index 5b03d579..5d1a4b4a 100644 --- a/samples/instrumentation-quickstart/integrationtest/go.mod +++ b/samples/instrumentation-quickstart/integrationtest/go.mod @@ -2,7 +2,7 @@ module integrationtest go 1.24.9 -require github.com/GoogleCloudPlatform/opentelemetry-operations-e2e-testing/quickstarttest v0.0.0-20250114143142-e149ed7094ab +require github.com/GoogleCloudPlatform/opentelemetry-operations-e2e-testing/quickstarttest v0.0.0-20251208180208-d58ab0851963 require ( dario.cat/mergo v1.0.2 // indirect @@ -138,7 +138,7 @@ require ( github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.2 // indirect + github.com/prometheus/common v0.67.4 // indirect github.com/prometheus/procfs v0.19.2 // indirect github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/secure-systems-lab/go-securesystemslib v0.9.1 // indirect @@ -150,8 +150,8 @@ require ( github.com/spf13/cobra v1.10.1 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/stretchr/testify v1.11.1 // indirect - github.com/testcontainers/testcontainers-go v0.39.0 // indirect - github.com/testcontainers/testcontainers-go/modules/compose v0.39.1 // indirect + github.com/testcontainers/testcontainers-go v0.40.0 // indirect + github.com/testcontainers/testcontainers-go/modules/compose v0.40.0 // indirect github.com/theupdateframework/notary v0.7.0 // indirect github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect github.com/tklauser/go-sysconf v0.3.15 // indirect diff --git a/samples/instrumentation-quickstart/integrationtest/go.sum b/samples/instrumentation-quickstart/integrationtest/go.sum index 20cccdad..8bf78229 100644 --- a/samples/instrumentation-quickstart/integrationtest/go.sum +++ b/samples/instrumentation-quickstart/integrationtest/go.sum @@ -8,8 +8,8 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DefangLabs/secret-detector v0.0.0-20250811234530-d4b4214cd679 h1:qNT7R4qrN+5u5ajSbqSW1opHP4LA8lzA+ASyw5MQZjs= github.com/DefangLabs/secret-detector v0.0.0-20250811234530-d4b4214cd679/go.mod h1:blbwPQh4DTlCZEfk1BLU4oMIhLda2U+A840Uag9DsZw= -github.com/GoogleCloudPlatform/opentelemetry-operations-e2e-testing/quickstarttest v0.0.0-20250114143142-e149ed7094ab h1:9OXXzInvP4VS3HDWKffd3VWj4R4AF2GAtk32UZpeQGM= -github.com/GoogleCloudPlatform/opentelemetry-operations-e2e-testing/quickstarttest v0.0.0-20250114143142-e149ed7094ab/go.mod h1:rO1zHFu/xDhYgOK4xQWzwwrmyegPn7ywl7R90t7zPcE= +github.com/GoogleCloudPlatform/opentelemetry-operations-e2e-testing/quickstarttest v0.0.0-20251208180208-d58ab0851963 h1:nx9rAzzDqVtOxqULGTGqWCKC51x1f94h3rtczqLFg48= +github.com/GoogleCloudPlatform/opentelemetry-operations-e2e-testing/quickstarttest v0.0.0-20251208180208-d58ab0851963/go.mod h1:3Le6vNcFeKawDXnVmGnk08p2eaxn0U9ZPb+CYyolpD8= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= @@ -424,8 +424,8 @@ github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvM github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.67.2 h1:PcBAckGFTIHt2+L3I33uNRTlKTplNzFctXcWhPyAEN8= -github.com/prometheus/common v0.67.2/go.mod h1:63W3KZb1JOKgcjlIr64WW/LvFGAqKPj0atm+knVGEko= +github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= +github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -479,10 +479,10 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/testcontainers/testcontainers-go v0.39.0 h1:uCUJ5tA+fcxbFAB0uP3pIK3EJ2IjjDUHFSZ1H1UxAts= -github.com/testcontainers/testcontainers-go v0.39.0/go.mod h1:qmHpkG7H5uPf/EvOORKvS6EuDkBUPE3zpVGaH9NL7f8= -github.com/testcontainers/testcontainers-go/modules/compose v0.39.1 h1:/3kEZY3xH/ibgnUGAACmEcqVIqfXzqD1LdXnJqfsBrM= -github.com/testcontainers/testcontainers-go/modules/compose v0.39.1/go.mod h1:qxH8QmljpneFWkGJ7RzjPOnoyRN760OZdq3bE0aG/bg= +github.com/testcontainers/testcontainers-go v0.40.0 h1:pSdJYLOVgLE8YdUY2FHQ1Fxu+aMnb6JfVz1mxk7OeMU= +github.com/testcontainers/testcontainers-go v0.40.0/go.mod h1:FSXV5KQtX2HAMlm7U3APNyLkkap35zNLxukw9oBi/MY= +github.com/testcontainers/testcontainers-go/modules/compose v0.40.0 h1:Bj8W7GieY56sRbVJx1yLh0JVEtOQ8SQMhX+jRtzenLA= +github.com/testcontainers/testcontainers-go/modules/compose v0.40.0/go.mod h1:fEEGqtsoH1KS+sUi1WG4+vH3fqdCyip1U9Hd8P3SRMA= github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c= github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw= github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA= @@ -655,9 +655,8 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/samples/instrumentation-quickstart/otel-collector-config.yaml b/samples/instrumentation-quickstart/otel-collector-config.yaml index 90fda8c0..dccf63ea 100644 --- a/samples/instrumentation-quickstart/otel-collector-config.yaml +++ b/samples/instrumentation-quickstart/otel-collector-config.yaml @@ -91,6 +91,17 @@ exporters: # Export metrics to Google Managed service for Prometheus googlemanagedprometheus: project: ${GOOGLE_CLOUD_PROJECT} + otlphttp: + encoding: proto + endpoint: https://telemetry.googleapis.com + # Use the googleclientauth extension to authenticate with Google credentials + auth: + authenticator: googleclientauth + +extensions: + googleclientauth: + project: ${GOOGLE_CLOUD_PROJECT} + quota_project: ${GOOGLE_CLOUD_PROJECT} processors: # Batch telemetry together to more efficiently send to GCP @@ -109,8 +120,14 @@ processors: # If running on GCP (e.g. on GKE), detect resource attributes from the environment. resourcedetection: detectors: ["env", "gcp"] + resource/gcp_project_id: + attributes: + - key: gcp.project_id + value: ${GOOGLE_CLOUD_PROJECT} + action: insert service: + extensions: [googleclientauth] telemetry: metrics: readers: @@ -122,8 +139,8 @@ service: pipelines: traces: receivers: ["otlp"] - processors: ["batch", "resourcedetection"] - exporters: ["googlecloud"] + processors: ["batch", "resourcedetection", "resource/gcp_project_id"] + exporters: ["otlphttp"] metrics: receivers: ["otlp"] processors: ["batch", "resourcedetection", "resource"]