Skip to content

chore: cloud-run e2e telemetry flow validation#2341

Merged
ava-silver merged 3 commits into
masterfrom
ava.silver/chore/cloud-run-e2e-telemetry-flow-validation
Jun 9, 2026
Merged

chore: cloud-run e2e telemetry flow validation#2341
ava-silver merged 3 commits into
masterfrom
ava.silver/chore/cloud-run-e2e-telemetry-flow-validation

Conversation

@ava-silver

@ava-silver ava-silver commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What and why?

The Cloud Run e2e tests previously only verified resource shape (sidecar injection, env vars, volume mounts) using the stock hello image, which emits no telemetry. This PR extends them to verify that spans and logs from the instrumented app actually reach the Datadog e2e org.

Note, we may want to migrate to dd-sts at some point to avoid having api/app keys stored in github

How?

  • Swaps the deploy image to gcr.io/datadog-serverless-gcp-dev/run-nodejs-sidecar (a real Node.js app with tracing), controlled via the new GCP_CLOUD_RUN_APP_IMAGE_E2E repo variable
  • Switches to --allow-unauthenticated so the test can hit the service URL without credentials
  • Adds --tracing to the instrument invocation to ensure DD_TRACE_ENABLED=true
  • Adds a new telemetry flows test case (between instrument and uninstrument) that:
    1. Resolves the service URL via gcloud run services describe
    2. Hits the endpoint with fetch to generate a trace
    3. Polls the DD v2 Spans and Logs APIs in parallel (20 × 15s, 5 min max) until both return results filtered by service name
  • Adds e2e/helpers/cloud-run-telemetry-checker.ts (mirrors the pattern from junit-upload-checker.ts) with explicit DATADOG_API_KEY/DATADOG_APP_KEY auth -- the e2e org keys already flow in from DATADOG_API_KEY_E2E/DATADOG_APP_KEY_E2E in CI
  • Threads GCP_CLOUD_RUN_APP_IMAGE_E2E through CI env and adds the helper file to the cloud-run paths filter

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@datadog-prod-us1-6

This comment has been minimized.

@ava-silver ava-silver added serverless Related to [aas, cloud-run, lambda, stepfunctions] chores Related to the CI or developer experience labels Jun 5, 2026
@ava-silver
ava-silver marked this pull request as ready for review June 8, 2026 16:44
@ava-silver
ava-silver requested review from a team as code owners June 8, 2026 16:44
@ava-silver
ava-silver requested a review from nina9753 June 8, 2026 16:44
@ava-silver
ava-silver merged commit 58b9b84 into master Jun 9, 2026
59 of 61 checks passed
@ava-silver
ava-silver deleted the ava.silver/chore/cloud-run-e2e-telemetry-flow-validation branch June 9, 2026 15:27
@GabrielAnca GabrielAnca mentioned this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chores Related to the CI or developer experience serverless Related to [aas, cloud-run, lambda, stepfunctions]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants