Skip to content

Read OTel secrets in demo apps CD GitHub actions (#12573)#12574

Closed
yasmoradi wants to merge 2 commits into
bitfoundation:developfrom
yasmoradi:12573
Closed

Read OTel secrets in demo apps CD GitHub actions (#12573)#12574
yasmoradi wants to merge 2 commits into
bitfoundation:developfrom
yasmoradi:12573

Conversation

@yasmoradi

@yasmoradi yasmoradi commented Jul 4, 2026

Copy link
Copy Markdown
Member

closes #12573

Summary by CodeRabbit

  • Chores
    • Updated deployment workflows to pass additional OpenTelemetry settings during app configuration.
    • Telemetry export can now be configured through environment-backed secrets, improving observability for deployed apps.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 732dcb79-68c9-4cd8-b722-3e18b22fb4bc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Three GitHub Actions CD workflow files (admin-sample, sales-module-demo, todo-sample) had their "Update core appsettings.json" step updated to include two new environment variables, OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS, sourced from repository secrets.

Changes

CD Workflow OTel Configuration

Layer / File(s) Summary
Add OTLP exporter secrets to appsettings substitution step
.github/workflows/admin-sample.cd.yml, .github/workflows/sales-module-demo.cd.yml, .github/workflows/todo-sample.cd.yml
Each workflow's build_blazor_hybrid_windows job env block gains OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS, sourced from corresponding GitHub secrets.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

Three workflows hum a brand-new tune,
Secrets whispered 'neath the moon,
OTLP endpoints, headers too,
Hop, hop, telemetry shining through! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The workflows add the requested OTel secret env vars, but the todo-sample entries appear malformed with extra braces, so #12573 is not fully met. Fix the todo-sample YAML expressions so both OTel env vars reference the secrets correctly, then re-verify all demo CD workflows.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding OTel secret usage in demo app CD GitHub Actions.
Out of Scope Changes check ✅ Passed All changes stay within demo CD workflow updates for OTel secret injection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/admin-sample.cd.yml:
- Around line 191-192: The OTLP environment variable assignments in the workflow
contain extra trailing braces, so the substituted secret values for
OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS are malformed. Update
the env entries in the workflow block to remove the stray closing braces after
the secrets, and verify the same pattern is not repeated elsewhere in the
workflow.

In @.github/workflows/sales-module-demo.cd.yml:
- Around line 121-122: The OTEL secret expressions in the workflow still have
extra trailing braces, which makes the values invalid for the substitution step.
Update the `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
entries in the workflow so they reference the secrets cleanly, using the same
secret syntax as the surrounding environment variables without the extra `}}`.

In @.github/workflows/todo-sample.cd.yml:
- Around line 335-336: The OTEL secret expressions in the workflow env block
have an extra trailing brace, so both OTEL_EXPORTER_OTLP_ENDPOINT and
OTEL_EXPORTER_OTLP_HEADERS are being rendered with literal braces. Update the
workflow entries in this env section to use the correct GitHub Actions secret
expression syntax, and apply the same fix anywhere else in the workflow set
where the same typo appears.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 738f1784-f125-4d40-83fd-2e42a5c15d50

📥 Commits

Reviewing files that changed from the base of the PR and between fdc46a8 and fb11315.

📒 Files selected for processing (3)
  • .github/workflows/admin-sample.cd.yml
  • .github/workflows/sales-module-demo.cd.yml
  • .github/workflows/todo-sample.cd.yml

Comment thread .github/workflows/admin-sample.cd.yml Outdated
Comment on lines +191 to +192
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}}}
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '180,200p' .github/workflows/admin-sample.cd.yml | cat -n

Repository: bitfoundation/bitplatform

Length of output: 1521


🏁 Script executed:

rg -n "OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|WebApplicationBuilderExtensions|appsettings" .github AdminPanel -g '!**/bin/**' -g '!**/obj/**'

Repository: bitfoundation/bitplatform

Length of output: 5408


🏁 Script executed:

rg -n "OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|WebApplicationBuilderExtensions" . -g '!**/bin/**' -g '!**/obj/**'

Repository: bitfoundation/bitplatform

Length of output: 1676


🏁 Script executed:

sed -n '1,260p' .github/workflows/admin-sample.cd.yml | cat -n | sed -n '180,196p'

Repository: bitfoundation/bitplatform

Length of output: 1184


Remove the trailing }} from both OTLP env values
The extra characters become part of the substituted secret value, so the generated OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS values are invalid and OTLP export breaks.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/admin-sample.cd.yml around lines 191 - 192, The OTLP
environment variable assignments in the workflow contain extra trailing braces,
so the substituted secret values for OTEL_EXPORTER_OTLP_ENDPOINT and
OTEL_EXPORTER_OTLP_HEADERS are malformed. Update the env entries in the workflow
block to remove the stray closing braces after the secrets, and verify the same
pattern is not repeated elsewhere in the workflow.

Comment on lines +121 to +122
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}}}
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== sales-module-demo.cd.yml (around lines 121-122) ==\n'
sed -n '110,130p' .github/workflows/sales-module-demo.cd.yml

printf '\n== admin-sample.cd.yml (matching area if present) ==\n'
if [ -f .github/workflows/admin-sample.cd.yml ]; then
  sed -n '110,130p' .github/workflows/admin-sample.cd.yml
fi

printf '\n== Search for OTEL_EXPORTER_OTLP_* secret expressions in workflows ==\n'
rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|secrets\.(OTEL_EXPORTER_OTLP_ENDPOINT|OTEL_EXPORTER_OTLP_HEADERS)' .github/workflows

Repository: bitfoundation/bitplatform

Length of output: 3118


Remove the trailing }} from the OTEL secret expressions. OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS still append extra braces, so the substitution action receives invalid values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/sales-module-demo.cd.yml around lines 121 - 122, The OTEL
secret expressions in the workflow still have extra trailing braces, which makes
the values invalid for the substitution step. Update the
`OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` entries in the
workflow so they reference the secrets cleanly, using the same secret syntax as
the surrounding environment variables without the extra `}}`.

Comment on lines +335 to +336
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}}}
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the workflow files and the exact secret expressions.
git ls-files '.github/workflows/*' | sed -n '1,200p'
printf '\n--- matches ---\n'
rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|\$\{\{ secrets\.' .github/workflows -n

printf '\n--- target file excerpt ---\n'
sed -n '326,342p' .github/workflows/todo-sample.cd.yml

printf '\n--- other workflow excerpts ---\n'
for f in .github/workflows/*.yml .github/workflows/*.yaml; do
  [ -f "$f" ] || continue
  if rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)' "$f" >/dev/null; then
    echo "FILE: $f"
    sed -n '1,220p' "$f" | rg -n 'OTEL_EXPORTER_OTLP_(ENDPOINT|HEADERS)|\$\{\{ secrets\.'
    echo
  fi
done

Repository: bitfoundation/bitplatform

Length of output: 15251


Remove the trailing braces from the OTEL secret expressions
The same }} typo appears here and in the other two workflow files, so both OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS end up with literal braces appended.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/todo-sample.cd.yml around lines 335 - 336, The OTEL secret
expressions in the workflow env block have an extra trailing brace, so both
OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS are being rendered
with literal braces. Update the workflow entries in this env section to use the
correct GitHub Actions secret expression syntax, and apply the same fix anywhere
else in the workflow set where the same typo appears.

@yasmoradi yasmoradi closed this Jul 4, 2026
@yasmoradi yasmoradi deleted the 12573 branch July 4, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CD GitHub Actions must use OTel secrets

1 participant