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

bug: Exchange rate not working #5

Open
sossickd opened this issue Dec 20, 2023 · 8 comments
Open

bug: Exchange rate not working #5

sossickd opened this issue Dec 20, 2023 · 8 comments

Comments

@sossickd
Copy link

sossickd commented Dec 20, 2023

Describe the bug
Exchange rate doesn't appear to be working.

To Reproduce
Steps to reproduce the behavior:

  1. Install OpenCost with any image or helm chart version on AWS.

Check the Opencost UI dashboard.

In this instance i am selecting TTD

image

When i switch to THB

image

The price is the same.

I now compare that to the AWS Cost Explorer and i don't get a selection for currency.

image

Is AWS plugged into the exchange. Profound right?

image

image

image

@mattray
Copy link
Collaborator

mattray commented Dec 21, 2023

There is no currency calculation being performed in OpenCost, we're simply recording what's exposed in the API for the value of the cost and recording it. The currency drop-down in the UI is cosmetic and there is no currency associated with the recorded values in Prometheus.

I can see how this is an issue if you were doing multiple clusters across multiple currencies and consolidating them to a single database, but that's currently outside our primary scope.

That said, is Cost Explorer showing values different from what we're displaying? That would be an interesting bug, since we're getting costs from their pricing API but it's showing you something different. What currency are you paying your bill in vs. what are you looking at in their UI? I'm not sure how we'd tackle that if it's an issue, but please report back.

@sossickd
Copy link
Author

sossickd commented Dec 21, 2023

If you did tie into the exchange rate would this help?

https://exchangeratesapi.io/
or
https://aws.amazon.com/marketplace/pp/prodview-htng2kh3d236o

From a cosmetic principle would it be a nice idea to use currency symbols?

https://www.xe.com/symbols/

@sossickd
Copy link
Author

I really feel like we need this feature

@sossickd
Copy link
Author

Well done me know one else, Hope you have a very lovely Christmas

@sossickd
Copy link
Author

This is could be very important If the the AWS business model
Doesn't allow to move to
An exchange rate that is more financially beneficial to the customer, might be worth more investmention

@AjayTripathy
Copy link
Contributor

Currency in opencost is currently only for display; whatever comes out of the pricing URL will be what's in the application, from the time at which it was selected going forward. An actual conversion module would be interesting though, I think we could take a PR there.

@mattray mattray transferred this issue from opencost/opencost May 23, 2024
@nishikant
Copy link

As I understand default currency, not changeable, is USD and opencost team is avoiding adding any thirdparty dependency on currency conversion api.

But on changing currency, a simple input box asking the currency conversion rate from user,(with basic validation of input) and use it to calculate cost. This way no hard dependency on thirdparty conversion rate api and easy fix for a critical issue.

@AjayTripathy
Copy link
Contributor

Would support a PR for conversion on the frontend!

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

No branches or pull requests

4 participants