Skip to content
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

🚀 Feature: cost metrics across all instrumentations #1042

Open
1 task done
nirga opened this issue May 14, 2024 · 2 comments
Open
1 task done

🚀 Feature: cost metrics across all instrumentations #1042

nirga opened this issue May 14, 2024 · 2 comments

Comments

@nirga
Copy link
Member

nirga commented May 14, 2024

Which component is this feature for?

All Packages

🔖 Feature description

Add span attributes and metrics for total cost for each model we instrument. Right now we only send token usage but we can easily extend this and send cost as well - we just need to define a prices const in each instrumentation and multiple the prompt/completion token usage.

🎤 Why is this feature needed ?

Better visibility into the cost for OpenLLMetry usage. Right now we only provide token usage which is basically just a proxy for cost.

✌️ How do you aim to achieve this?

See feature decsription

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

@apuwk
Copy link

apuwk commented May 15, 2024

Is this available to work on? Im going to go ahead and give it a shot if no one else is already working on it

@kocobee
Copy link

kocobee commented Jun 6, 2024

Might be able to re-use an existing mapping: https://github.com/openlit/openlit/blob/main/assets/pricing.json

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

No branches or pull requests

3 participants