-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(prometheus): add AI metrics and fix #9320 #13148
Conversation
should we use |
@fffonion agree I will use llm in the metrics name so "kong_ai_llm_tokens_total" to avoid increasing the cardinality of the metrics as it impacts performance for every new addition. Thanks |
@fffonion , I spend more time on this. Actually the tokens/cost logic is currently the same even with multi modal api. Let's keep |
@AntoineJac Multi-modal or text only can all be called "LLMs", I was looking at something like image or audio only, say I send some texts to let some service to generate a TTS audio, and there might be not a standard API format (like currently those LLM models have) yet. Both LLMs and others can be categorized as "AI". So I would like keep the naming constraints |
@fffonion noted thanks. I have made the changes and fixed the conflicts with the new init.lua file |
Co-authored-by: Wangchong Zhou <[email protected]>
Co-authored-by: Wangchong Zhou <[email protected]>
Co-authored-by: Wangchong Zhou <[email protected]>
Co-authored-by: Zachary Hu <[email protected]>
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13148-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13148-to-master-to-upstream
git checkout -b cherry-pick-13148-to-master-to-upstream
ancref=$(git merge-base 99cb0608050cbd14611e7795960aade9fc6360cc 486f6ebeb03811300129d5ca10b65108dfee7633)
git cherry-pick -x $ancref..486f6ebeb03811300129d5ca10b65108dfee7633 |
Here is the cherry pick: |
Summary
This PR is:
Logs format will be:
Promotheus metrics:
Here is the Grafana AI template for these metrics:
https://grafana.com/grafana/dashboards/21162-kong-cx-ai/
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix AG-56