Skip to content

Commit cfce1ed

Browse files
Merge pull request #4909 from linuxfoundation/unicron-add-opentelemetry-datadog-api-logging
Add OpenTelemetry/DataDog API logging [prod]
2 parents 73aeedf + 320a709 commit cfce1ed

47 files changed

Lines changed: 3653 additions & 897 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,50 @@ updates:
1212
- package-ecosystem: "npm" # See documentation for possible values
1313
directory: "/cla-landing-page" # Location of package manifests
1414
schedule:
15-
interval: "weekly"
15+
interval: "monthly"
16+
open-pull-requests-limit: 3
17+
ignore:
18+
- dependency-name: "serverless"
19+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
20+
- dependency-name: "serverless-domain-manager"
21+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
1622
- package-ecosystem: "npm" # See documentation for possible values
1723
directory: "/cla-backend" # Location of package manifests
1824
schedule:
19-
interval: "weekly"
25+
interval: "monthly"
26+
open-pull-requests-limit: 3
27+
ignore:
28+
- dependency-name: "serverless"
29+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
30+
- dependency-name: "serverless-domain-manager"
31+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
2032
- package-ecosystem: "pip" # See documentation for possible values
2133
directory: "/cla-backend" # Location of package manifests
2234
schedule:
23-
interval: "weekly"
35+
interval: "monthly"
36+
open-pull-requests-limit: 3
37+
ignore:
38+
- dependency-name: "serverless"
39+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
40+
- dependency-name: "serverless-domain-manager"
41+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
2442
- package-ecosystem: "npm" # See documentation for possible values
2543
directory: "/cla-backend-go" # Location of package manifests
2644
schedule:
27-
interval: "weekly"
45+
interval: "monthly"
46+
open-pull-requests-limit: 3
47+
ignore:
48+
- dependency-name: "serverless"
49+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
50+
- dependency-name: "serverless-domain-manager"
51+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
2852
- package-ecosystem: "gomod" # See documentation for possible values
2953
directory: "/cla-backend-go" # Location of package manifests
3054
schedule:
31-
interval: "weekly"
55+
interval: "monthly"
56+
open-pull-requests-limit: 3
57+
ignore:
58+
- dependency-name: "serverless"
59+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
60+
- dependency-name: "serverless-domain-manager"
61+
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]

.github/workflows/build-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ permissions:
1616
env:
1717
AWS_REGION: us-east-1
1818
STAGE: dev
19+
DD_VERSION: ${{ github.sha }}
1920

2021
jobs:
2122
build-test-lint:

.github/workflows/codeql-analysis.yml

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,42 @@ name: "CodeQL"
55

66
on:
77
push:
8-
branches: [main, ]
8+
branches: [main]
99
pull_request:
10-
# The branches below must be a subset of the branches above
1110
branches: [main]
1211
schedule:
1312
- cron: '0 5 * * 4'
1413

1514
jobs:
1615
analyse:
17-
name: Analyse
16+
name: Analyze (${{ matrix.language }})
1817
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
1922

20-
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v3
23-
with:
24-
# We must fetch at least the immediate parents so that if this is
25-
# a pull request then we can checkout the head.
26-
fetch-depth: 2
27-
28-
# If this run was triggered by a pull request event, then checkout
29-
# the head of the pull request instead of the merge commit.
30-
# Note: git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.
31-
#- run: git checkout HEAD^2
32-
# if: ${{ github.event_name == 'pull_request' }}
33-
34-
# Initializes the CodeQL tools for scanning.
35-
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v1
37-
# Override language selection by uncommenting this and choosing your languages
38-
# with:
39-
# languages: go, javascript, csharp, python, cpp, java
40-
41-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
42-
# If this step fails, then you should remove it and run the build manually (see below)
43-
- name: Autobuild
44-
uses: github/codeql-action/autobuild@v1
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ['go', 'python', 'javascript']
4527

46-
# ℹ️ Command-line programs to run using the OS shell.
47-
# 📚 https://git.io/JvXDl
48-
49-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
50-
# and modify them (or add more) to build your code if your project
51-
# uses a compiled language
52-
53-
#- run: |
54-
# make bootstrap
55-
# make release
56-
57-
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@v1
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 2
33+
34+
# Initializes the CodeQL tools for scanning.
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v4
37+
with:
38+
languages: ${{ matrix.language }}
39+
40+
- name: Autobuild
41+
uses: github/codeql-action/autobuild@v4
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v4
45+
with:
46+
category: "/language:${{ matrix.language }}"

.github/workflows/deploy-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ permissions:
1616
env:
1717
AWS_REGION: us-east-1
1818
STAGE: dev
19+
DD_VERSION: ${{ github.sha }}
1920

2021
jobs:
2122
build-deploy-dev:

.github/workflows/deploy-prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ permissions:
1818
env:
1919
AWS_REGION: us-east-1
2020
STAGE: prod
21+
DD_VERSION: ${{ github.sha }}
2122

2223
jobs:
2324
build-deploy-prod:

.github/workflows/yarn-scan-backend-go-pr.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
branches:
1111
- dev
12+
paths:
13+
- "cla-backend-go/package.json"
14+
- "cla-backend-go/yarn.lock"
15+
- ".github/workflows/yarn-scan-backend-go-pr.yml"
1216

1317
jobs:
1418
yarn-scan-backend-go-pr:
@@ -25,4 +29,5 @@ jobs:
2529
- name: Yarn Audit
2630
working-directory: cla-backend-go
2731
run: |
28-
yarn audit
32+
yarn audit --json > audit.json || true
33+
node ../scripts/yarn-audit-filter.mjs audit.json ../.yarn-audit-allowlist.json

.github/workflows/yarn-scan-backend-pr.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
branches:
1111
- dev
12+
paths:
13+
- "cla-backend/package.json"
14+
- "cla-backend/yarn.lock"
15+
- ".github/workflows/yarn-scan-backend-pr.yml"
1216

1317
jobs:
1418
yarn-scan-backend-pr:
@@ -25,4 +29,5 @@ jobs:
2529
- name: Yarn Audit
2630
working-directory: cla-backend
2731
run: |
28-
yarn audit
32+
yarn audit --json > audit.json || true
33+
node ../scripts/yarn-audit-filter.mjs audit.json ../.yarn-audit-allowlist.json

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,7 @@ cla-backend/python-api.log
266266
cla-backend/python-api.err
267267
cla-backend-go/golang-api.err
268268
cla-backend-go/golang-api.log
269+
utils/otel_dd_go/otel_dd
270+
audit.json
271+
spans*.json
272+
api_usage.csv

.yarn-audit-allowlist.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"minSeverity": "high",
3+
"allowlist": [
4+
1111997
5+
],
6+
"notes": {
7+
"1111997": "aws-sdk v2 advisory flagged as 'No patch available' in our current baseline; accepted until migration."
8+
}
9+
}

cla-backend-go/bootstrap

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
# AWS Lambda custom runtime entrypoint (provided.al2 / provided.al2023).
5+
# AWS executes /var/task/bootstrap. The configured Lambda "Handler" is exposed
6+
# via the $_HANDLER env var. We exec that handler binary (which is our Go
7+
# executable) so we don't need to rename every binary to 'bootstrap'.
8+
9+
if [ -z "${_HANDLER:-}" ]; then
10+
echo "bootstrap: _HANDLER is not set" >&2
11+
exit 1
12+
fi
13+
14+
HANDLER_PATH="/var/task/${_HANDLER}"
15+
if [ ! -x "${HANDLER_PATH}" ]; then
16+
echo "bootstrap: handler '${HANDLER_PATH}' not found or not executable" >&2
17+
ls -la /var/task >&2 || true
18+
exit 1
19+
fi
20+
21+
exec "${HANDLER_PATH}"

0 commit comments

Comments
 (0)