Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/reusable-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ on:
required: true
FULLSEND_GCP_PROJECT_ID:
required: true
OTEL_EXPORTER_OTLP_TRACES_HEADERS:
required: false

concurrency:
group: fullsend-code-agent-${{ inputs.source_repo }}-${{ fromJSON(inputs.event_payload).issue.number || fromJSON(inputs.event_payload).pull_request.number }}
Expand Down Expand Up @@ -206,6 +208,9 @@ jobs:
REPO_FULL_NAME: ${{ inputs.source_repo }}
CODE_ALLOWED_TARGET_BRANCHES: ''
TARGET_BRANCH: main
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: code
version: ${{ inputs.fullsend_version }}
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/reusable-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ on:
required: true
OTEL_EXPORTER_OTLP_TRACES_HEADERS:
description: >-
OTLP headers for ADR 0050 Level 2 trace export, forwarded to the
triage stage (baggage-style k=v,k=v; may carry auth, hence a
secret). Optional — unset leaves export disabled unless the
OTLP headers for ADR 0050 Level 2 trace export, forwarded to all
agent stages (baggage-style k=v,k=v; may carry auth, hence a
secret). Optional; unset leaves export disabled unless the
endpoint variable alone suffices.
required: false

Expand Down Expand Up @@ -744,6 +744,9 @@ jobs:
REPO_FULL_NAME: ${{ github.repository }}
CODE_ALLOWED_TARGET_BRANCHES: ''
TARGET_BRANCH: main
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: code
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
Expand Down Expand Up @@ -853,6 +856,9 @@ jobs:
PRIOR_REVIEW_SHA: ${{ steps.prior-review.outputs.prior_sha }}
PRIOR_REVIEW_FILE: ${{ steps.prior-review.outputs.prior_review_file }}
PRIOR_REVIEW_PROVENANCE: ${{ steps.prior-review.outputs.prior_review_provenance }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: review
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
Expand Down Expand Up @@ -1143,6 +1149,9 @@ jobs:
FIX_ITERATION: ${{ steps.context.outputs.iteration }}
REVIEW_BODY_FILE: ${{ steps.review-body.outputs.review_file }}
PRE_AGENT_HEAD: ${{ steps.pre-agent.outputs.head }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: fix
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
Expand Down Expand Up @@ -1235,6 +1244,9 @@ jobs:
RETRO_COMMENT: ${{ fromJSON(needs.route.outputs.event_payload).comment.body || '' }}
REPO_FULL_NAME: ${{ github.repository }}
MINT_REPOS: ${{ steps.workspace.outputs.repo_name != '' && (inputs.install_mode == 'per-repo' && steps.workspace.outputs.repo_name || format('{0},.fullsend', steps.workspace.outputs.repo_name)) || '' }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: retro
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
Expand Down Expand Up @@ -1312,6 +1324,9 @@ jobs:
env:
GITHUB_ISSUE_URL: ${{ fromJSON(needs.route.outputs.event_payload).issue.html_url }}
REPO_FULL_NAME: ${{ github.repository }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: prioritize
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
Expand Down Expand Up @@ -1616,6 +1631,9 @@ jobs:
env:
GITHUB_ISSUE_URL: ${{ steps.dispatch-env.outputs.issue_url }}
REPO_FULL_NAME: ${{ matrix.source_repo }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: ${{ matrix.agent }}
version: ${{ inputs.fullsend_version }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ on:
required: true
FULLSEND_GCP_PROJECT_ID:
required: true
OTEL_EXPORTER_OTLP_TRACES_HEADERS:
required: false

concurrency:
group: >-
Expand Down Expand Up @@ -407,6 +409,9 @@ jobs:
FIX_ITERATION: ${{ steps.context.outputs.iteration }}
REVIEW_BODY_FILE: ${{ steps.review-body.outputs.review_file }}
PRE_AGENT_HEAD: ${{ steps.pre-agent.outputs.head }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: fix
version: ${{ inputs.fullsend_version }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable-prioritize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ on:
required: true
FULLSEND_GCP_PROJECT_ID:
required: true
OTEL_EXPORTER_OTLP_TRACES_HEADERS:
required: false

concurrency:
group: fullsend-prioritize-agent-${{ inputs.source_repo }}-${{ fromJSON(inputs.event_payload).issue.number || fromJSON(inputs.event_payload).pull_request.number }}
Expand Down Expand Up @@ -161,6 +163,9 @@ jobs:
env:
GITHUB_ISSUE_URL: ${{ fromJSON(inputs.event_payload).issue.html_url }}
REPO_FULL_NAME: ${{ inputs.source_repo }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: prioritize
version: ${{ inputs.fullsend_version }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable-retro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ on:
required: true
FULLSEND_GCP_PROJECT_ID:
required: true
OTEL_EXPORTER_OTLP_TRACES_HEADERS:
required: false

concurrency:
group: fullsend-retro-agent-${{ inputs.source_repo }}-${{ fromJSON(inputs.event_payload).pull_request.number || fromJSON(inputs.event_payload).issue.number }}
Expand Down Expand Up @@ -172,6 +174,9 @@ jobs:
RETRO_COMMENT: ${{ fromJSON(inputs.event_payload).comment.body || '' }}
REPO_FULL_NAME: ${{ inputs.source_repo }}
MINT_REPOS: ${{ steps.repo-parts.outputs.name != '' && (inputs.install_mode == 'per-repo' && steps.repo-parts.outputs.name || format('{0},.fullsend', steps.repo-parts.outputs.name)) || '' }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: retro
version: ${{ inputs.fullsend_version }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ on:
required: true
FULLSEND_GCP_PROJECT_ID:
required: true
OTEL_EXPORTER_OTLP_TRACES_HEADERS:
required: false

concurrency:
group: fullsend-review-agent-${{ inputs.source_repo }}-${{ fromJSON(inputs.event_payload).pull_request.number || fromJSON(inputs.event_payload).issue.number }}
Expand Down Expand Up @@ -188,6 +190,9 @@ jobs:
PRIOR_REVIEW_SHA: ${{ steps.prior-review.outputs.prior_sha }}
PRIOR_REVIEW_FILE: ${{ steps.prior-review.outputs.prior_review_file }}
PRIOR_REVIEW_PROVENANCE: ${{ steps.prior-review.outputs.prior_review_provenance }}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
OTEL_RESOURCE_ATTRIBUTES: ${{ vars.OTEL_RESOURCE_ATTRIBUTES }}
with:
agent: review
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
Expand Down
16 changes: 7 additions & 9 deletions docs/guides/infrastructure/distributed-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,9 @@ Fullsend-specific attributes:

### Managed workflows

Only the **triage** stage forwards OTEL configuration in this release; the
other agents (code, fix, review, retro, prioritize) do not export yet.

To enable export for triage runs, set on the org (or repo) that hosts the
fullsend caller workflows:
All agent stages (triage, code, review, fix, retro, prioritize, harness)
forward OTEL configuration. To enable export, set on the org (or repo)
that hosts the fullsend caller workflows:

1. Actions **variable** `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` — the backend's
full traces URL (e.g. `https://mlflow.example.com/v1/traces`).
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
Resolved
Expand All @@ -217,10 +215,10 @@ fullsend caller workflows:
`k=v,k=v` trace tags. The value is used verbatim: `${{ github.* }}`
expressions evaluate only in workflow YAML, not in variables.

Installations scaffolded before this release must also forward the secret
(add `OTEL_EXPORTER_OTLP_TRACES_HEADERS` under `secrets:`) until the scaffold
is re-synced: in the `.fullsend` repo's `triage.yml` (per-org), or in the
fullsend shim workflow's dispatch job (per-repo).
Installations scaffolded before OTEL support was added must also forward the
secret (add `OTEL_EXPORTER_OTLP_TRACES_HEADERS` under `secrets:`) until the
scaffold is re-synced: in the `.fullsend` repo's stage workflows (per-org),
or in the fullsend shim workflow's dispatch job (per-repo).

### Bring your own workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ jobs:
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ jobs:
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ jobs:
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ jobs:
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ jobs:
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
26 changes: 18 additions & 8 deletions internal/scaffold/workflow_call_alignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ func TestReusableWorkflowsShareCommonInputs(t *testing.T) {
commonSecrets := []string{
"FULLSEND_GCP_WIF_PROVIDER",
"FULLSEND_GCP_PROJECT_ID",
"OTEL_EXPORTER_OTLP_TRACES_HEADERS",
}

stages := []string{"triage", "code", "review", "fix", "retro", "prioritize"}
Expand Down Expand Up @@ -320,24 +321,33 @@ func TestReusableDispatchProjectNumberInput(t *testing.T) {
}

// TestOTELHeadersSecretThreading validates that the optional OTLP headers
// secret (#2862) is forwarded along both installation-mode chains to
// reusable-triage.yml. TestWorkflowCallInputAlignment only enforces required
// secrets — an omitted optional forward silently arrives empty, which turns
// into a 401 at authenticated backends instead of failing loudly.
// secret (#2862) is forwarded along both installation-mode chains to every
// reusable stage workflow. TestWorkflowCallInputAlignment only enforces
// required secrets; an omitted optional forward silently arrives empty,
// which turns into a 401 at authenticated backends instead of failing loudly.
func TestOTELHeadersSecretThreading(t *testing.T) {
const forward = "OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}"

cases := []struct {
name string
content func(t *testing.T) []byte
}{
// consumer: env injection on the agent step
{"reusable-triage.yml", loadRepoFile(".github/workflows/reusable-triage.yml")},
// per-repo chain: shim → reusable-dispatch → reusable-triage
// per-repo chain: shim → reusable-dispatch (covers all inlined stages)
{"scaffold/templates/shim-per-repo.yaml", loadScaffoldFile("templates/shim-per-repo.yaml")},
{"reusable-dispatch.yml", loadRepoFile(".github/workflows/reusable-dispatch.yml")},
// per-org chain: thin caller → reusable-triage
// per-org chain: thin caller → reusable-{stage}
{"reusable-triage.yml", loadRepoFile(".github/workflows/reusable-triage.yml")},
{"scaffold/triage.yml", loadScaffoldFile(".github/workflows/triage.yml")},
{"reusable-code.yml", loadRepoFile(".github/workflows/reusable-code.yml")},
{"scaffold/code.yml", loadScaffoldFile(".github/workflows/code.yml")},
{"reusable-review.yml", loadRepoFile(".github/workflows/reusable-review.yml")},
{"scaffold/review.yml", loadScaffoldFile(".github/workflows/review.yml")},
{"reusable-fix.yml", loadRepoFile(".github/workflows/reusable-fix.yml")},
{"scaffold/fix.yml", loadScaffoldFile(".github/workflows/fix.yml")},
{"reusable-retro.yml", loadRepoFile(".github/workflows/reusable-retro.yml")},
{"scaffold/retro.yml", loadScaffoldFile(".github/workflows/retro.yml")},
{"reusable-prioritize.yml", loadRepoFile(".github/workflows/reusable-prioritize.yml")},
{"scaffold/prioritize.yml", loadScaffoldFile(".github/workflows/prioritize.yml")},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
Expand Down
Loading