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

Dataflow cost metrics #3

Open
fpeter8 opened this issue Apr 24, 2018 · 8 comments · May be fixed by #16
Open

Dataflow cost metrics #3

fpeter8 opened this issue Apr 24, 2018 · 8 comments · May be fixed by #16
Assignees
Labels

Comments

@fpeter8
Copy link
Collaborator

fpeter8 commented Apr 24, 2018

Dataflow job detail page (https://console.cloud.google.com/dataflow?project=projectId -> go to any job), on the right hand panel, under "Resource metrics", add two new rows:

  • Current cost: how much this job is costing us with the current machine number
  • Total cost: how much it has already cost us since the beginning

Note that the page looks different for batch/streaming jobs (and possibli for SDK1/2 jobs as well)

@gsipos gsipos added this to the 1.0 - Initial release milestone Jun 29, 2018
@gsipos
Copy link
Member

gsipos commented Jun 29, 2018

@fpeter8
Copy link
Collaborator Author

fpeter8 commented Jul 2, 2018

table is updated regularly for running jobs (you cannot calculate the cost once, you have to subscribe to the changes / update regularly)

@fpeter8
Copy link
Collaborator Author

fpeter8 commented Jul 2, 2018

json is obsolete, you have to use this api: https://cloud.google.com/billing/v1/how-tos/catalog-api

@fpeter8
Copy link
Collaborator Author

fpeter8 commented Jul 2, 2018

usage:

Relevant entries:

  • "vCPU Time Batch"
  • "vCPU Time Streaming"
  • "Local Disk Time PD Standard"
  • "Local Disk Time PD SSD"
  • "RAM Time"

each region might have different prices, the API returns the regions in the "serviceRegions" field. Dataflow region is in the table below the "Resource metrics" table.

For "Current" fields the value is {price} * {current value} / {time period}
e.g. "Current vCPU" = 1
"vCPU Time Streaming" = 0.00054 USD / hour
calculated value: 0.00054 USD / hour

For "Total" fields the value is {price} * {total value}
e.g. "Total vCPU" = 5.14 vCPU h
"vCPU Time Streaming" = 0.00054 USD / hour
calculated value: 0,0027756 USD

For development, you can use API key 'AIzaSyBZVfVwDKpduSuNOJlvWildIeQ5AsNtnWM' (not sure if we should use this for prod, or get it from the user via config)

@gsipos
Copy link
Member

gsipos commented Aug 7, 2018

✅ Currency code can be specified.
❓ pricingInfo array is a chronological ordering of price history.

https://cloud.google.com/billing/reference/rest/v1/services.skus/list

@gsipos
Copy link
Member

gsipos commented Aug 8, 2018

The cost metrics should be displayed in a user preferred currency format.
The user should be able to define what is his preferreed currency, and should be able to define project specific currency format as well.

@csabakassai
Copy link
Member

I think the project specific configuration is over-engineering. I believe a global GCPimp level configuration is more than enough

@fpeter8
Copy link
Collaborator Author

fpeter8 commented Aug 9, 2018

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

Successfully merging a pull request may close this issue.

3 participants