Skip to content

ci(ai-review): send each review's cost to Dash0 - #429

Open
marckong wants to merge 1 commit into
mainfrom
marckong/ai-review-dash0
Open

marckong wants to merge 1 commit into
mainfrom
marckong/ai-review-dash0

Conversation

@marckong

Copy link
Copy Markdown
Contributor

Summary

Sends each AI review's tokens and cost to Kong's Dash0. Until now nothing reached Dash0. In a public repository, the cost job was skipped entirely, so spend there was not recorded anywhere.

ai-review.yml and ai-review-retarget-override.yml now pass otlp_endpoint: https://ingress.us-west-2.aws.dash0.com, plus otlp_headers built from DASH0_INGEST_TOKEN with the volcano dataset. These are the same endpoint and dataset as volcano-hosting's workflow trace export. Kong/volcano-actions#51 makes the same change to the stubs every repository copies.

If DASH0_INGEST_TOKEN is missing, the export answers 401 and the cost step logs a warning. The review and the cost comment are unaffected.

Before merge

  • Add DASH0_INGEST_TOKEN (an ingest-only Dash0 token) to this repository's Actions secrets, or as an org secret shared with the volcano repositories.

Test plan

  • actionlint is clean.
  • These workflows run on pull_request_target from main, so this PR's own review still uses the old callers. After merge, the next review's cost job runs and its metrics appear in Dash0 under service.name=gha-ai-review.

@marckong
marckong requested a review from a team as a code owner November 16, 2026 02:23
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown

AI review: no P0-P2 findings

Reviewed 0a36fcc. Run log

Both AI review caller workflows now pass a Dash0 OTLP endpoint and an otlp_headers secret built from DASH0_INGEST_TOKEN to the shared Kong/volcano-actions reusable workflow, so each review's token count and cost are exported to Dash0. The YAML change is small and consistent across both files. The risk is that the review workflow gets a new credential and sends data to an external service, and the change depends on the reusable workflow already declaring the new input and secret.

Not checked: The AI review read the diff, the code, and the PR's text; it ran no tests or builds and read nothing outside this repository.

  • Whether Kong/volcano-actions ai-review.yml@​main declares the otlp_endpoint input and otlp_headers secret; if not, both callers fail validation and AI review stops on every PR.
  • Which jobs in the reusable workflow receive otlp_headers, and whether its OTLP exporter accepts the unencoded space in Authorization=Bearer <token>.
  • Whether the DASH0_INGEST_TOKEN secret exists for this repository or org, and whether metrics show up in Dash0 under service.name=gha-ai-review after merge.
  • Verify that Kong/volcano-actions accepts otlp_endpoint and otlp_headers and handles export failures as described.
  • Verify that DASH0_INGEST_TOKEN is configured with ingest-only access and that the next review exports metrics successfully.

Human review: needed

  • Should AI review on pull_request_target in this public repo (including fork PRs) get DASH0_INGEST_TOKEN, and is it limited to the cost job in Kong/volcano-actions ai-review.yml?
  • Is DASH0_INGEST_TOKEN ingest-only and limited to the volcano dataset, and is it acceptable to send per-PR review token and cost data to Dash0?
  • Should .github/workflows/ai-review.yml and .github/workflows/ai-review-retarget-override.yml pass DASH0_INGEST_TOKEN to the shared workflow and export review telemetry to Dash0’s volcano dataset?

The AI review found no P0-P2 problems at 0a36fcc, so the code needs no second review for bugs. Decide the points above: approve to accept them, or request changes.

Suggested reviewer: swkeever (wrote most recent changes to both AI review caller workflows). Any collaborator with write access other than the author can approve.

@github-actions
github-actions Bot requested a review from swkeever November 16, 2026 02:25

This branch has not been deployed

No deployments
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.

2 participants