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

[Metricbeat][GCP] instance event should contain all resource and metric labels #35090

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

Conversation

kwinstonix
Copy link
Contributor

@kwinstonix kwinstonix commented Apr 15, 2023

  • Bug

What does this PR do?

Why is it important?

gcp.labels.resource and gcp.labels.metrics should keep original timeSeries labels, that should be a fixed behavior for all metircs. We should not filter out some labels: instance_name, instance_id, zone, project_id.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

#29573

@kwinstonix kwinstonix requested a review from a team as a code owner April 15, 2023 01:30
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 15, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 15, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @kwinstonix? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@kwinstonix kwinstonix force-pushed the gcp_instance_labels branch from c3c99e0 to 8f98d82 Compare April 15, 2023 01:32
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 15, 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-06-29T13:17:57.911+0000

  • Duration: 50 min 54 sec

Test stats 🧪

Test Results
Failed 0
Passed 1533
Skipped 90
Total 1623

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@tommyers-elastic
Copy link
Contributor

hey @kwinstonix. the intention here is that any metadata that can be mapped to ECS fields is done so. the four fields mentioned here are included in events in the following fields:

instance_name => cloud.instance.name
instance_id => cloud.instance.id
zone => cloud.availability_zone
project_id => cloud.account.id

this is typical behaviour. what is the rationale behind keep original timeSeries labels, that should be a fixed behavior for all metircs ?

@kwinstonix
Copy link
Contributor Author

kwinstonix commented Apr 17, 2023

@tommyers-elastic ,

  1. GCP timeseries API response data model is clear. https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries

  2. It maybe confusing that some metric events have no gcp.labels.resource and gcp.labels.metrics field, or region and zone label are missing . That two labels clearly indicate which resource metric belongs to. The purpose of these two labels is the same as the aws.dimensions in aws metric event.

  3. Event data model should be fixed

@endorama endorama added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label Apr 17, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 17, 2023
@mergify
Copy link
Contributor

mergify bot commented Jun 27, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b gcp_instance_labels upstream/gcp_instance_labels
git merge upstream/main
git push upstream gcp_instance_labels

Copy link
Contributor

mergify bot commented Feb 5, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @kwinstonix? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Feb 7, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b gcp_instance_labels upstream/gcp_instance_labels
git merge upstream/main
git push upstream gcp_instance_labels

Copy link
Contributor

mergify bot commented Dec 26, 2024

backport-8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Dec 26, 2024
Copy link
Contributor

mergify bot commented Dec 26, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b gcp_instance_labels upstream/gcp_instance_labels
git merge upstream/main
git push upstream gcp_instance_labels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants