-
Notifications
You must be signed in to change notification settings - Fork 0
docs(rfc): commit the RFC0041.6 FinOps dashboard artifact #661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Perses FinOps dashboard (RFC 0041) | ||
|
|
||
| The committed dashboard definition required by RFC0041.6: agent spend by | ||
| model over time (`sum(attr.cost_usd)`), token throughput, tool-decision | ||
| mix, and a raw event log — all against a dogfood capture of Claude Code's | ||
| own telemetry. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A running Ourios querier with the RFC 0042 typed promotions configured | ||
| (the repo's `dogfood-config.yaml` promotes `cost_usd` as `f64` and | ||
| `input_tokens`/`output_tokens` as `i64`). | ||
| - A Perses instance (≥ 0.53) with the | ||
| [`ourios-perses-plugin`](https://github.com/jensholdgaard/ourios-perses-plugin) | ||
| archive installed — it provides `OuriosDatasource`, `OuriosLogQuery`, | ||
| and `OuriosTimeSeriesQuery`. | ||
|
|
||
| ## Import | ||
|
|
||
| ```sh | ||
| # from the repository root; adjust url + tenant header for your deployment first | ||
| percli apply -f examples/perses/datasource.example.json | ||
| percli apply -f examples/perses/agent-finops.json | ||
| ``` | ||
|
|
||
| `datasource.example.json` proxies `POST /v1/query` (panel queries) and | ||
| `POST /mcp` (the query editor's schema suggestions, RFC 0032) to the | ||
| querier, injecting the tenant header server-side so the browser never | ||
| handles credentials. | ||
|
|
||
| ## What to expect | ||
|
|
||
| Every panel renders from the capture with no edits to this definition | ||
| (the RFC0041.6 clause). Hours where the agent was idle produce no bucket, | ||
| and NULL aggregates render as gaps, never zeros — that is the RFC 0042 | ||
| null-propagation contract made visible. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,189 @@ | ||
| { | ||
| "kind": "Dashboard", | ||
| "metadata": { | ||
| "name": "agent-finops", | ||
| "project": "ourios" | ||
| }, | ||
| "spec": { | ||
| "display": { | ||
| "name": "Agent FinOps \u2014 Ourios dogfood" | ||
| }, | ||
| "duration": "24h", | ||
| "panels": { | ||
| "spend": { | ||
| "kind": "Panel", | ||
| "spec": { | ||
| "display": { | ||
| "name": "Spend by model (USD)", | ||
| "description": "sum(attr.cost_usd) from the RFC 0042 typed Float64 column; NULL aggregates render as gaps, never zeros" | ||
| }, | ||
| "plugin": { | ||
| "kind": "TimeSeriesChart", | ||
| "spec": { | ||
| "legend": { | ||
| "position": "bottom" | ||
| }, | ||
| "visual": { | ||
| "connectNulls": false | ||
| } | ||
| } | ||
| }, | ||
| "queries": [ | ||
| { | ||
| "kind": "TimeSeriesQuery", | ||
| "spec": { | ||
| "plugin": { | ||
| "kind": "OuriosTimeSeriesQuery", | ||
| "spec": { | ||
| "query": "scope == \"com.anthropic.claude_code.events\" | sum(attr.cost_usd) by attr.model, bucket(1h)" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "tokens": { | ||
| "kind": "Panel", | ||
| "spec": { | ||
| "display": { | ||
| "name": "Output tokens", | ||
| "description": "sum(attr.output_tokens) from the typed Int64 column" | ||
| }, | ||
| "plugin": { | ||
| "kind": "TimeSeriesChart", | ||
| "spec": { | ||
| "legend": { | ||
| "position": "bottom" | ||
| }, | ||
| "visual": { | ||
| "connectNulls": false | ||
| } | ||
| } | ||
| }, | ||
| "queries": [ | ||
| { | ||
| "kind": "TimeSeriesQuery", | ||
| "spec": { | ||
| "plugin": { | ||
| "kind": "OuriosTimeSeriesQuery", | ||
| "spec": { | ||
| "query": "scope == \"com.anthropic.claude_code.events\" | sum(attr.output_tokens) by bucket(1h)" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "decisions": { | ||
| "kind": "Panel", | ||
| "spec": { | ||
| "display": { | ||
| "name": "Tool decisions", | ||
| "description": "count by the promoted decision attribute" | ||
| }, | ||
| "plugin": { | ||
| "kind": "TimeSeriesChart", | ||
| "spec": { | ||
| "legend": { | ||
| "position": "bottom" | ||
| }, | ||
| "visual": { | ||
| "connectNulls": false | ||
| } | ||
| } | ||
| }, | ||
| "queries": [ | ||
| { | ||
| "kind": "TimeSeriesQuery", | ||
| "spec": { | ||
| "plugin": { | ||
| "kind": "OuriosTimeSeriesQuery", | ||
| "spec": { | ||
| "query": "scope == \"com.anthropic.claude_code.events\" | count by attr.decision, bucket(1h)" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "events": { | ||
| "kind": "Panel", | ||
| "spec": { | ||
| "display": { | ||
| "name": "Recent agent events", | ||
| "description": "RFC0002.21: the severity floor admits unspecified-severity GenAI events" | ||
| }, | ||
| "plugin": { | ||
| "kind": "LogsTable", | ||
| "spec": { | ||
| "allowWrap": true, | ||
| "enableDetails": true, | ||
| "showTime": true | ||
| } | ||
| }, | ||
| "queries": [ | ||
| { | ||
| "kind": "LogQuery", | ||
| "spec": { | ||
| "plugin": { | ||
| "kind": "OuriosLogQuery", | ||
| "spec": { | ||
| "query": "scope == \"com.anthropic.claude_code.events\" and severity >= trace | limit 100" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| } | ||
| } | ||
| }, | ||
| "layouts": [ | ||
| { | ||
| "kind": "Grid", | ||
| "spec": { | ||
| "items": [ | ||
| { | ||
| "x": 0, | ||
| "y": 0, | ||
| "width": 12, | ||
| "height": 10, | ||
| "content": { | ||
| "$ref": "#/spec/panels/spend" | ||
| } | ||
| }, | ||
| { | ||
| "x": 12, | ||
| "y": 0, | ||
| "width": 12, | ||
| "height": 10, | ||
| "content": { | ||
| "$ref": "#/spec/panels/tokens" | ||
| } | ||
| }, | ||
| { | ||
| "x": 0, | ||
| "y": 10, | ||
| "width": 12, | ||
| "height": 10, | ||
| "content": { | ||
| "$ref": "#/spec/panels/decisions" | ||
| } | ||
| }, | ||
| { | ||
| "x": 12, | ||
| "y": 10, | ||
| "width": 12, | ||
| "height": 10, | ||
| "content": { | ||
| "$ref": "#/spec/panels/events" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| { | ||
| "kind": "Datasource", | ||
| "metadata": { | ||
| "name": "ourios-ds", | ||
| "project": "ourios" | ||
| }, | ||
| "spec": { | ||
| "default": true, | ||
| "plugin": { | ||
| "kind": "OuriosDatasource", | ||
| "spec": { | ||
| "proxy": { | ||
| "kind": "HTTPProxy", | ||
| "spec": { | ||
| "allowedEndpoints": [ | ||
| { | ||
| "endpointPattern": "/v1/query", | ||
| "method": "POST" | ||
| }, | ||
| { | ||
| "endpointPattern": "/mcp", | ||
| "method": "POST" | ||
| } | ||
| ], | ||
| "headers": { | ||
| "x-ourios-tenant": "agent-dogfood" | ||
| }, | ||
| "url": "http://127.0.0.1:4319" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.