Skip to content

feat(mise): opt-in Datadog metrics for app token usage#1129

Merged
malept merged 2 commits intomainfrom
malept/dt-5281/feat/gh-app-token-datadog-metrics
Apr 17, 2026
Merged

feat(mise): opt-in Datadog metrics for app token usage#1129
malept merged 2 commits intomainfrom
malept/dt-5281/feat/gh-app-token-datadog-metrics

Conversation

@malept
Copy link
Copy Markdown
Member

@malept malept commented Apr 17, 2026

What this PR does / why we need it

Adds best-effort Datadog telemetry to run_mise so we can see how our
GitHub app token's rate-limit budget is spent across CI, sliced by
mise subcommand, repo, and CI job.

Opt-in via DATADOG_API_KEY in the CI environment; silent no-op
otherwise.

Jira ID

DT-5281

Notes for your reviewers

Per-invocation granularity is intentional — it's what lets us attribute
API usage to specific mise subcommands rather than aggregate per-job.


Rovo Dev code review: Rovo Dev has reviewed this pull request
Any suggestions or improvements have been posted as pull request comments.

@malept malept requested a review from a team as a code owner April 17, 2026 01:43
Comment thread shell/lib/mise.sh
{
"series": [
{
"metric": "devbase.github.app.rate_limit_used",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔎 Acceptance Criteria

The code does not distinguish between Personal Access Token (PAT) and GitHub App token usage. All metrics are reported under 'devbase.github.app.rate_limit_*' metric names, which specifically reference GitHub App tokens rather than PATs. There is no focus on PAT usage as defined in the acceptance criteria.

Details

📖 Explanation: The implementation reports rate limit metrics for any GitHub token without differentiating token types. The metric names (lines 315, 321) use 'github.app' naming, suggesting GitHub App tokens only. No special handling or logging exists for PAT usage as defined in the acceptance criteria.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It does, that's why it's github.app. (mise only uses the app tokens since they have more allowed API calls per hour.) A future PAT metric would be github.pat.

@atlassian

This comment was marked as low quality.

@malept malept merged commit ac177da into main Apr 17, 2026
12 checks passed
@malept malept deleted the malept/dt-5281/feat/gh-app-token-datadog-metrics branch April 17, 2026 15:34
@getoutreach-ci-1
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.37.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants