Add OpenTelemetry/DataDog API logging [prod]#4909
Add OpenTelemetry/DataDog API logging [prod]#4909lukaszgryglicki wants to merge 2 commits intomainfrom
Conversation
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adds OpenTelemetry (OTLP/HTTP) tracing + Datadog Lambda Extension wiring to capture low-cardinality API route spans (and tag Cypress E2E traffic), along with supporting SSM/env tooling and dependency/audit updates.
Changes:
- Implement OTel span creation/export for inbound API requests (Python + Go backends) with route sanitization and E2E markers.
- Update Serverless configs to inject Datadog/OTel env vars, attach Datadog extension layer, and switch Go Lambdas to
provided.al2using a custombootstrap. - Add helper scripts for SSM parameter management and local OTEL collector/Datadog validation; tighten Yarn audit in CI with an allowlist filter.
Reviewed changes
Copilot reviewed 35 out of 40 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/set_ssm_value.sh | New helper to set arbitrary SSM parameters via AWS CLI. |
| utils/set_ssm_logging_params.sh | New helper to populate SSM logging-related params (Datadog site/keys/layer, logging toggles). |
| utils/otel_dd_py/otel_dd.py | Standalone Python OTLP/HTTP span emitter for Datadog extension testing. |
| utils/otel_dd_go/otel_dd.go | Standalone Go OTLP/HTTP span emitter for Datadog extension testing. |
| utils/otel_dd_go/go.mod | Go module definition for the standalone OTel/DD test tool. |
| utils/otel_dd_go/go.sum | Dependency lockfile for the standalone Go OTel/DD test tool. |
| utils/otel_dd_go/build.sh | Convenience build/vet/fmt script for the standalone Go tool. |
| utils/otel_dd/validate_dd_keys.sh | Script to validate Datadog API/application keys against Datadog API. |
| utils/otel_dd/run_collector.sh | Script to run a local OTEL collector configured to export to Datadog. |
| utils/otel_dd/otelcol-dd.yaml | OTEL collector config (OTLP HTTP receiver -> Datadog exporter). |
| utils/otel_dd/check_spans_in_ddog.sh | Script to query spans from Datadog and optionally filter E2E-tagged spans. |
| utils/otel_dd/check_spans.sh | Script to check local collector metrics for accepted/sent/failed spans. |
| utils/get_ssm_value.sh | Minor reordering so strict mode is enabled after usage validation. |
| utils/check_ssm_logging_params.sh | Script to inspect SSM params and related SecretsManager values across stage/region combos. |
| tests/functional/cypress/support/commands.js | Inject low-cardinality E2E marker headers into all cy.request() calls. |
| setenv.sh | Add local env exports for logging toggles and Datadog/OTel configuration. |
| scripts/yarn-audit-filter.mjs | New script to enforce a severity threshold + allowlist for yarn audit --json. |
| cla-backend/package.json | Bump/select dependency versions/resolutions (axios, qs, fast-xml-parser, minimatch). |
| cla-backend/yarn.lock | Lockfile updates corresponding to dependency/resolution changes. |
| cla-backend/serverless.yml | Add Datadog/OTel env vars, attach extension layer, change Go runtimes to provided.al2, and adjust IAM policies. |
| cla-backend/requirements.txt | Add OpenTelemetry Python deps for OTLP/HTTP exporting. |
| cla-backend/cla/routes.py | Add OTel span creation/export around requests + feature flags + E2E markers; gate DynamoDB API logging. |
| cla-backend/bootstrap | Custom runtime bootstrap to exec the configured handler binary. |
| cla-backend-go/telemetry/datadog_otlp.go | New Go OTel SDK init + OTLP/HTTP exporter + HTTP handler wrapper for route templating/E2E tagging. |
| cla-backend-go/cmd/server.go | Gate DynamoDB API logging; initialize and optionally wrap HTTP handler with OTel/DD tracing. |
| cla-backend-go/serverless.yml | Add Datadog/OTel env vars, attach extension layer, switch runtime to provided.al2, add secret-read policy. |
| cla-backend-go/go.mod | Add/update deps for OTel HTTP instrumentation/export; bump several indirect deps. |
| cla-backend-go/go.sum | Sum updates corresponding to new/updated Go module deps. |
| cla-backend-go/package.json | Update dependency resolutions (axios, qs, fast-xml-parser). |
| cla-backend-go/yarn.lock | Lockfile updates corresponding to dependency/resolution changes. |
| cla-backend-go/bootstrap | Custom runtime bootstrap to exec the configured handler binary. |
| .yarn-audit-allowlist.json | New allowlist policy for filtering yarn audit results in CI. |
| .gitignore | Ignore the built standalone Go binary under utils/otel_dd_go/otel_dd. |
| .github/workflows/yarn-scan-backend-pr.yml | Make Yarn audit run only when backend manifests change; enforce policy via new filter script. |
| .github/workflows/yarn-scan-backend-go-pr.yml | Same as above for cla-backend-go. |
| .github/workflows/deploy-dev.yml | Export DD_VERSION from GitHub SHA for deploy workflow. |
| .github/workflows/deploy-prod.yml | Export DD_VERSION from GitHub SHA for deploy workflow. |
| .github/workflows/build-pr.yml | Export DD_VERSION from GitHub SHA for PR build workflow. |
| .github/workflows/codeql-analysis.yml | Modernize CodeQL workflow and run analysis per-language via a matrix. |
| .github/dependabot.yml | Reduce update cadence to monthly and limit PRs; ignore serverless-related deps. |
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
Add OpenTelemetry/DataDog API logging .
Signed-off-by: Lukasz Gryglicki lgryglicki@cncf.io
Assisted by OpenAI
Assisted by GitHub Copilot