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

[GCP] Add billing additional fields #8343

Merged
merged 12 commits into from
Nov 22, 2023
Merged

Conversation

gpop63
Copy link
Contributor

@gpop63 gpop63 commented Oct 31, 2023

Overview

This change introduces new billing fields and fixes the aggregation functions in the billing dashboard lenses.

Previously, the max aggregation was used, since the granularity of the billing data was low. Due to increased granularity which produces multiple documents per day, the sum aggregation is appropriate for accurately displaying total costs.

Fields added:

  • sku_id
  • sku_description
  • service_id
  • service_description
  • effective_price
  • tags (nested)
    • key
    • value

With these additional fields, we can add new lenses to improve the insight into billing data. This should be handled in a separate enhancement PR.

Following the merge of elastic/beats#36902, we can proceed with this PR.

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

scrnli_10_31_2023_1-34-56 AM

@gpop63 gpop63 self-assigned this Oct 31, 2023
@gpop63 gpop63 added the Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] label Oct 31, 2023
@elasticmachine
Copy link

elasticmachine commented Oct 31, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-11-22T12:46:10.438+0000

  • Duration: 20 min 12 sec

Test stats 🧪

Test Results
Failed 0
Passed 69
Skipped 0
Total 69

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Oct 31, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (6/6) 💚
Files 100.0% (6/6) 💚
Classes 100.0% (6/6) 💚
Methods 87.826% (101/115) 👎 -8.559
Lines 95.124% (1502/1579) 👎 -4.876
Conditionals 100.0% (0/0) 💚

@ishleenk17
Copy link
Contributor

Lets add the sample data here

@ishleenk17
Copy link
Contributor

Lets add the sample data here

@gpop63 : Please do the needful

@gpop63 gpop63 marked this pull request as ready for review November 15, 2023 22:03
@gpop63 gpop63 requested review from a team as code owners November 15, 2023 22:03
Copy link
Contributor

@ishleenk17 ishleenk17 left a comment

Choose a reason for hiding this comment

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

Looks good!

@gpop63
Copy link
Contributor Author

gpop63 commented Nov 21, 2023

/test

Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

The change looks good; I only have one question and one nit.

Question

The PR on Beats introduced a detailed usage cost table alongside the existing standard table. IIRC, users must use the detailed table pattern to get the extra fields.

How do integration users get standard vs. detailed usage cost data? Should they use the detailed table pattern as well?

If users get standard vs. detailed usage cost data by setting the table pattern, we should describe this behavior in the docs and give a hint in the setting description in the UI.

Nit

We should include tag values in the sample document.

"sku_description": "Network Inter Region Ingress from Jakarta to Americas",
"service_description": "Compute Engine",
"effective_price": 0.00292353,
"tags": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It would be helpful to include tag values in the sample event.

Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

Thanks for the docs update!

feature is available in 8.12.0
@gpop63 gpop63 merged commit 7fa6cab into elastic:main Nov 22, 2023
4 checks passed
@elasticmachine
Copy link

Package gcp - 2.32.0 containing this change is available at https://epr.elastic.co/search?package=gcp

@andrewkroh andrewkroh added the Integration:gcp Google Cloud Platform label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:gcp Google Cloud Platform Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants