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

[AWS] Add tags to events based on parsed identifier #33472

Merged
merged 4 commits into from
Nov 1, 2022

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Oct 27, 2022

What does this PR do?

Check if the identifier includes dimensionSeparator , before the event is initialized. With this change, tags will be added into events when the target identifier is a subset of the whole string. For example: without this PR, tags will be added to only identifier database-1. With this PR, tags will be added to not only database-1, but also WRITER,database-1.

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.

Screenshots

Screen Shot 2022-10-27 at 4 08 10 PM

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 27, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @kaiyan-sheng? 🙏.
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

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 27, 2022

💚 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: 2022-10-31T14:48:56.234+0000

  • Duration: 79 min 33 sec

Test stats 🧪

Test Results
Failed 0
Passed 1318
Skipped 107
Total 1425

💚 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!)

@cjr125
Copy link
Contributor

cjr125 commented Oct 28, 2022

@kaiyan-sheng i tested these changes locally and they solve the problem. thank you very much. i will close my PR: #33040

@kaiyan-sheng kaiyan-sheng added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label Oct 31, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 31, 2022
@kaiyan-sheng kaiyan-sheng marked this pull request as ready for review October 31, 2022 14:48
@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner October 31, 2022 14:48
@kaiyan-sheng kaiyan-sheng added backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.5.0 Automated backport with mergify labels Nov 1, 2022
@kaiyan-sheng kaiyan-sheng merged commit 50c6ae5 into elastic:main Nov 1, 2022
@kaiyan-sheng kaiyan-sheng deleted the tags_filter branch November 1, 2022 14:49
mergify bot pushed a commit that referenced this pull request Nov 1, 2022
(cherry picked from commit 50c6ae5)

# Conflicts:
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch.go
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_test.go
mergify bot pushed a commit that referenced this pull request Nov 1, 2022
(cherry picked from commit 50c6ae5)

# Conflicts:
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch.go
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_test.go
kaiyan-sheng added a commit that referenced this pull request Nov 1, 2022
…ifier (#33518)

* [AWS] Add tags to events based on parsed identifier (#33472)

(cherry picked from commit 50c6ae5)

# Conflicts:
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch.go
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_test.go

* Update CHANGELOG.next.asciidoc

* fix merge conflict

Co-authored-by: kaiyan-sheng <[email protected]>
kaiyan-sheng added a commit that referenced this pull request Nov 1, 2022
…tifier (#33517)

* [AWS] Add tags to events based on parsed identifier (#33472)

(cherry picked from commit 50c6ae5)

# Conflicts:
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch.go
#	x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_test.go

* Update CHANGELOG.next.asciidoc

* fix merge conflict

Co-authored-by: kaiyan-sheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.5.0 Automated backport 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