Skip to content

[Azure OpenAI] Update billing dashboard panel #13481

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

muthu-mps
Copy link
Contributor

@muthu-mps muthu-mps commented Apr 9, 2025

  • Enhancement

Proposed commit message

This PR changes the panel to display the cost over the time and updates the decimal places by 5 to show the actual costs which is lower.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • Install the Azure OpenAI integration
  • View the billing dashboard panel that should display the costs between 0-1.

Screenshots

azure_open_ai_billing

@muthu-mps muthu-mps self-assigned this Apr 9, 2025
@elastic-vault-github-plugin-prod
Copy link

elastic-vault-github-plugin-prod bot commented Apr 9, 2025

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @muthu-mps

@muthu-mps muthu-mps marked this pull request as ready for review April 9, 2025 08:27
@muthu-mps muthu-mps requested a review from a team as a code owner April 9, 2025 08:27
@agithomas
Copy link
Contributor

The first thing that comes to my mind is the need for having a currency value in the Y-axis. Is this doable?

@agithomas
Copy link
Contributor

Suggestion: While it is good to see the trend , showing the information of on-going month's usage cost / on-going day's usage cost would benefit the users, i think, which could be represented as a Single-stat / metric panel.

@muthu-mps
Copy link
Contributor Author

The first thing that comes to my mind is the need for having a currency value in the Y-axis. Is this doable?

This is discussed earlier and currently we cannot add currency to the Y-axis. Even the Azure Billing integration dashboard doesn't include details related to the currency. When making changes to the Azure Billing integration dashboard I will check for some alternative ways to represent.

@muthu-mps muthu-mps added Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] Integration:azure_openai Azure OpenAI dashboard Relates to a Kibana dashboard bug, enhancement, or modification. labels Apr 9, 2025
@muthu-mps
Copy link
Contributor Author

Suggestion: While it is good to see the trend , showing the information of on-going month's usage cost / on-going day's usage cost would benefit the users, i think, which could be represented as a Single-stat / metric panel.

Do you mean adding one more metric panel to show the overall cost for the selected time? Can we take this in a separate ticket, WDYT?

@@ -340,7 +341,7 @@
"shouldTruncate": true,
"showSingleSeries": true
},
"preferredSeriesType": "bar_stacked",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason why we went from bar_stacked to line? Generally i observe stacked bar chart to represent cost and usage details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we use the line chart with line interpolation to smooth this looks nice when compared to bar chart. Its also useful to represent to flow of cost.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniela-elastic , please share your thoughts.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pros and cons for both.
Bar char: pros - you can see the daily cost. cons - you don't see how the fluctuations throughout the day
line chart: pros - you can see the daily fluctuations. cons - harder to convert this into a single daily number
I think either one is fine as long as we can have an additional widget which is for the total cost for the selected time period. Bonus points if we add an average daily cost for the selected time period.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line chart: cons - harder to convert this into a single daily number.

The API provides the data on a daily basis and for every 24 hours. We also would not be able to get average daily costs as well. So I think we can make it as a bar chart itself.

I have made couple of changes.

  • The chart names changed to Daily usage from Overall usage.
  • Added two new charts to show the total costs and total costs breakdown by models.
Screenshot 2025-04-15 at 3 02 51 PM

Let me know if there is any comments. I will update and commit the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank Muthu. Agree that it makes sense to use bar charts if we have a 24 hour granularity. COuple of comments/questions:

  • For total costs we show 3 numbers after the decimal point. If it's a large number (larger than 0.009) we might want to show only 2 digits after the decimal point. However if we need to account for very small numbers (eg 0.009) then showing more numbers after the decimal point would make sense
  • For total costs - what is the unit? Dollars? Yen?
  • It's not clear what is the name of the second widget (the one to the right of the "Total cost" widget). Is there a way to make it more obvious what it is?
  • The bar chart widgets - they seem to have two parts - I think it's because of the vertical bar separating the months of March and April but it could also be easily interpreted as two widgets. Do we need to have this vertical bar?
  • The daily usage widgets - what units are those in? The first one says "EUR" but I would expect the unit to the shown somewhere close to the name of what this unit applies to (the y axis). ALso, is the other daily usage widget also in EUR?
  • If my bill is in USD will I see the USD currency instead of the EUR currency on the dashboard?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniela-elastic - Please find my updates,

  • For total costs - what is the unit? Dollars? Yen?

    This is the currency associated with the billing account. I have provided a breakdown by costs to identify the currency in the bar chart.

    Do we need to also include the currency in Total costs as well?

    we cannot do this for the charts which is grouped by model.

    Screenshot 2025-04-15 at 3 02 51 PM
  • It's not clear what is the name of the second widget (the one to the right of the "Total cost" widget). Is there a way to make it more obvious what it is?

    I have modified the name to Daily usage costs and we already have the description(i icon)

  • The bar chart widgets - they seem to have two parts - I think it's because of the vertical bar separating the months of March and April but it could also be easily interpreted as two widgets. Do we need to have this vertical bar?

    The charts can be converted from stacked chart to un-stacked so that the separation line will disappear.

  • The daily usage widgets - what units are those in? The first one says "EUR" but I would expect the unit to the shown somewhere close to the name of what this unit applies to (the y axis). ALso, is the other daily usage widget also in EUR?

    Yes, all the data shown in the dashboard are in EUR. This isn't doable to show in Y-axis, This has been raised by @agithomas in the previous comment as well.

  • If my bill is in USD will I see the USD currency instead of the EUR currency on the dashboard?

    Yes, The billing currency associated with the Azure account will be showed in dashboard.

@agithomas
Copy link
Contributor

Do you mean adding one more metric panel to show the overall cost for the selected time? Can we take this in a separate ticket, WDYT?

I do not mind.

Copy link

@daniela-elastic daniela-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some suggestions. LMK what you think

@daniela-elastic daniela-elastic self-requested a review April 12, 2025 11:53
@daniela-elastic
Copy link

I also don't mind splitting the work in two tickets - the current one for the trend and another one for the totals

@daniela-elastic
Copy link

we don't need a second panel for billing. we can add everything billing related to the same link panel

@muthu-mps
Copy link
Contributor Author

we don't need a second panel for billing. we can add everything billing related to the same link panel

No, we are not going to create one more dashboard for billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Integration:azure_openai Azure OpenAI Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants